I’ve searched the documentation and forum and just can’t seem to put together what I need.
I’m using the Alchemist suite (Thank you Jarda & Others!) and making great progress until I run into walls because of my gaps in knowledge.
I’m trying to create a button within my plugin that will perform an action from a set I made and I’ll describe the function below. But keep in mind I think the button breaks because of several reasons but let me break this down:
- Duplicate a layer/group
- Hide all other layer except the duplicate
- Create a smart object (“A”, we’ll call it) out of the duplicate
- Edit the newly created smart object (A)
- Within the new smart object (A), duplicate the included layer/group
- Convert the new duplicate into a smart object (B)
- Edit the new smart object (B)
- Within the new smart object (B), perform “Image/Mode/Greyscale” then “Image/Mode/Bitmap”
- Create a halftone screen using the dialog (Which I want users to eventually place their own input)
- Save Smart object (B) and close.
- Now within smart object (A) I need to perform some masking and then save and close.
- Then finish in the original document by rasterizing the currently selected layer (smart object A)
Issues I Think I’m having:
(Mind you, I’m not a JS guy yet, so I might not understand the proper terminolgy)
- I think I’m running into an issue when hiding and showing layers, the code is reliant on the actual names of the layers (What I think are ID’s) instead of “object” it’s self. So when it looks to hide layers, it’s looking for arbitrary names a user gives them, instead of the object?
- I when saving I’m running into a similar issue like above in where the ID given to a newly created smart object or it’s user provided layer name instead of the object?
I also get an invalid token when trying to accomplish the first save of a smart object (B) when trying to replay the batch of "listened’ steps in Alchemist which is what leads me to think the “IDs” begin generated arbitrarily are the issue.
I think the first two issues are my biggest hurdle to get me to my next stage. I’m sure I’m not using the correct terminology but hopefully someone will understand the concept of what I’m trying to accomplish.
I feel like these two ideas are what are just not landing for me in any explanations I have found so if anyone cares to jump in with some code ideas or learning links I’d be eternally grateful!