Skip to content

Commit

Permalink
Fix examples failed
Browse files Browse the repository at this point in the history
  • Loading branch information
hao.long authored and Hal committed Apr 7, 2020
1 parent b05133d commit 4bdddd1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/session_smart_sharpen.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

fileName = os.path.join(os.path.dirname(__file__), 'layer_comps.psd')

with Session(fileName) as ps:
with Session(fileName, action='open') as ps:
def SmartSharpen(inAmount, inRadius, inNoise):
idsmart_sharpen_id = ps.app.stringIDToTypeID(ps.smartSharpen)
desc37 = ps.ActionDescriptor()
Expand Down Expand Up @@ -42,4 +42,9 @@ def SmartSharpen(inAmount, inRadius, inNoise):
ps.app.ExecuteAction(idsmart_sharpen_id, desc37)


docRef = ps.active_document
nlayerSets = docRef.layerSets
nArtLayers = docRef.layerSets.item(nlayerSets.length)
docRef.activeLayer = nArtLayers.artLayers.item(nArtLayers.artLayers.length)

SmartSharpen(300, 2.0, 20)

0 comments on commit 4bdddd1

Please sign in to comment.