Skip to content

Commit e70936b

Browse files
committed
chore(examples): add new example
add new example for convert Smart Object to ArtLayer
1 parent 2ef6e32 commit e70936b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Convert Smart object to artLayer."""
2+
3+
# Import local modules
4+
from photoshop import Session
5+
6+
7+
# example 1
8+
with Session() as ps:
9+
js = """
10+
var idplacedLayerConvertToLayers = stringIDToTypeID( "placedLayerConvertToLayers" );
11+
executeAction( idplacedLayerConvertToLayers, undefined, DialogModes.NO );
12+
"""
13+
ps.app.doJavaScript(js)
14+
15+
# example 2
16+
with Session() as ps:
17+
descriptor = ps.ActionDescriptor
18+
idplacedLayerConvertToLayers = ps.app.stringIDToTypeID("placedLayerConvertToLayers")
19+
ps.app.executeAction(idplacedLayerConvertToLayers, descriptor)

0 commit comments

Comments
 (0)