-
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): do monkey patch to support py37
It seems that hound still think a line should only have 80 chars though you set it to 120. Signed-off-by: TsXor <[email protected]>
- Loading branch information
Showing
33 changed files
with
841 additions
and
663 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.