From 4461d91c64dea19ca53d01f4b940edd9272226b0 Mon Sep 17 00:00:00 2001 From: TsXor Date: Mon, 5 Sep 2022 00:11:35 +0800 Subject: [PATCH] fix(example): add missing import of am Signed-off-by: TsXor --- examples/import_image_as_layer.py | 1 + examples/replace_images.py | 1 + examples/session_smart_sharpen.py | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/import_image_as_layer.py b/examples/import_image_as_layer.py index c2a77aed..41eab47f 100644 --- a/examples/import_image_as_layer.py +++ b/examples/import_image_as_layer.py @@ -5,6 +5,7 @@ # Import local modules from photoshop import Session +import photoshop.api.action_manager as am with Session(action="new_document") as ps: diff --git a/examples/replace_images.py b/examples/replace_images.py index 5f10a1fe..9ccf9952 100644 --- a/examples/replace_images.py +++ b/examples/replace_images.py @@ -9,6 +9,7 @@ # Import local modules from photoshop import Session +import photoshop.api.action_manager as am PSD_FILE = psd.get_psd_files() diff --git a/examples/session_smart_sharpen.py b/examples/session_smart_sharpen.py index e1e6ee5a..974d16af 100644 --- a/examples/session_smart_sharpen.py +++ b/examples/session_smart_sharpen.py @@ -11,6 +11,7 @@ # Import local modules from photoshop import Session +import photoshop.api.action_manager as am PSD_FILE = psd.get_psd_files() @@ -28,6 +29,6 @@ def SmartSharpen(inAmount, inRadius, inNoise): "blur": am.Enumerated(type="blurType", value="gaussianBlur"), } ss_desc = ps.ActionDescriptor.load(ss_dict) - app.ExecuteAction(am.str2id("smartSharpen"), ss_desc) + ps.app.ExecuteAction(am.str2id("smartSharpen"), ss_desc) SmartSharpen(300, 2.0, 20)