-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(action_manager): patch to support py37
change patching to (try eval + except), and now run black -l 80 to avoid hound warning There will be lots of violations in hound's eye which I cannot find out locally because hound's linter is not up to date. I will have to do some shattered commits, and for these commits, I will name them hop (hound oriented programming). Signed-off-by: TsXor <[email protected]>
- Loading branch information
Showing
33 changed files
with
777 additions
and
654 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
"""Import a image as a artLayer.""" | ||
|
||
# Import built-in modules | ||
import pathlib | ||
|
||
# Import local modules | ||
from photoshop import Session | ||
import pathlib | ||
import photoshop.api.action_manager as am | ||
|
||
|
||
with Session(action="new_document") as ps: | ||
import_dict = { | ||
'_classID':None, | ||
'null':pathlib.Path("your/image/path") # replace it with your own path here | ||
} | ||
# replace it with your own path here | ||
import_dict = {"_classID": None, "null": pathlib.Path("your/image/path")} | ||
import_desc = ps.ActionDescriptor.load(import_dict) | ||
ps.app.executeAction(am.str2id("Plc "), import_desc) # `Plc` need one space in here. | ||
ps.app.executeAction(am.str2id("Plc "), import_desc) | ||
# length of charID should always be 4, if not, pad with spaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,28 @@ | ||
from .ref_form_types import * | ||
from .desc_value_types import * | ||
from .utils import * | ||
from .desc_value_types import Enumerated | ||
from .desc_value_types import TypeID | ||
from .desc_value_types import UnitDouble | ||
from .jprint import jformat | ||
from .jprint import jprint | ||
from .js_converter import dump as dumpjs | ||
from .jprint import * | ||
from .ref_form_types import Identifier | ||
from .ref_form_types import Index | ||
from .ref_form_types import Offset | ||
from .ref_form_types import ReferenceKey | ||
from .utils import id2str | ||
from .utils import str2id | ||
|
||
|
||
__all__ = [ # noqa: F405 | ||
'str2id', | ||
'id2str', | ||
'Enumerated', | ||
'TypeID', | ||
'UnitDouble', | ||
'Identifier', | ||
'Index', | ||
'Offset', | ||
'ReferenceKey', | ||
'dumpjs', | ||
'jprint', | ||
'jformat', | ||
] | ||
"str2id", | ||
"id2str", | ||
"Enumerated", | ||
"TypeID", | ||
"UnitDouble", | ||
"Identifier", | ||
"Index", | ||
"Offset", | ||
"ReferenceKey", | ||
"dumpjs", | ||
"jprint", | ||
"jformat", | ||
] |
Oops, something went wrong.