Copy link to clipboard
Copied
Hi!
I'm pretty new on photoshop scripting. I see there's a rather obscure way I can't even understand 😅.
I've tried iterating though layers, detecting that it's a smart layer, but I can't seem to raster it. Ex, I tried this:
if(layerRef.kind == LayerKind.SMARTOBJECT) {
layerRef.rasterize(LayerKind.SMARTOBJECT)
}
And I'm getting:
Runtime Error: Error Code# 1227: Illegal argument - argument 1
- Wrong type of enumerated value @ file '' [line:0, col:NaN
Eventually, I would like to be able to raster smart objects, and then re-create that raster content into a smartobject again.
For the moment, I don't care much about performance, I just want this to work as readable as possible.
Thanks!!
1 Correct answer
Use instead
valid argument, e.g.
Explore related tutorials & articles
Copy link to clipboard
Copied
Use instead
valid argument, e.g.
Copy link to clipboard
Copied
haha! that made it work!
I've check the Photoshop Scripting Guide and Photoshop JavaScript Reference, I still don't see much info about the rasterize method.
Any help or directions on searching for creating a smart object from a given layer? 🙂
Copy link to clipboard
Copied

