-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add a image as a layer? #142
Comments
@Gaston2388 |
Hi @loonghao,
Thanks!!! |
@Gaston2388 Very strange, I tested your code to replace the image path it was successful on my side. May I ask what is your windows version and photoshop version? |
Hi @loonghao , I am using: Thanks!!! |
@Gaston2388 |
@loonghao |
Yeah frankly I have to concur, I would definitely upgrade to at least 2020. The improvements to Photoshop made since then are monumental, you won't believe the efficiency gains alone. |
BRUH THIS EXAMPLE IS WRONG! with Session(action="new_document") as ps:
desc = ps.ActionDescriptor # <-
desc.putPath(ps.app.charIDToTypeID("null"), "your/image/path.jpg")
event_id = ps.app.charIDToTypeID("Plc ") # `Plc` need one space in here.
ps.app.executeAction(event_id, desc) Look at that line with |
Well, it still won't work after you add the missing |
It turned out that in session they give an instance of ActionDescriptor to session object as attribute, so it can work (but maybe not properly) without that "give an instance of ActionDescriptor to session object as attribute" is like defining an empty dict at the top of a py file and use it EVERY time you need to use a dict without cleaning it. |
Hello,
I tried to use:
**_from photoshop import Session
But I get the following error:
Any idea why it could be?
Thanks!!!
The text was updated successfully, but these errors were encountered: