Adobe 23101764 Scripting Guide - Page 78
Set newLayerSetRef = appRef.ActiveDocument.LayerSets.Add
UPC - 718659340025
View all Adobe 23101764 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 78 highlights
Scripting Photoshop 3 Layer objects The following examples show how to create a layer set after the first layer in the current document: AS: tell application "Adobe Photoshop CS" make new layer set after layer 1 of current document end tell VB: Dim appRef As Photoshop.Application Set appRef = CreateObject("Photoshop.Application") ' Get a reference to the first layer in the document Dim layerRef As Photoshop.Layer Set layerRef = appRef.ActiveDocument.Layers(1) ' Create a new LayerSet (it will be created at the beginning of the ' document) Dim newLayerSetRef As Photoshop.LayerSet Set newLayerSetRef = appRef.ActiveDocument.LayerSets.Add ' Move the new layer to after the first layer newLayerSetRef.Move layerRef, psPlaceAfter JS: // Get a reference to the first layer in the document var layerRef = app.activeDocument.layers[0]; // Create a new LayerSet (it will be created at the beginning of the // document) var newLayerSetRef = app.activeDocument.layerSets.add(); // Move the new layer to after the first layer newLayerSetRef.move(layerRef, ElementPlacement.PLACEAFTER); An existing art layer can also be changed to a text layer if the existing layer is empty. Conversely you can change a text layer to a normal layer. When you do this the text in the layer is rasterized. Photoshop CS Scripting Guide 74