How to rasterize smart object layers with scripting
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!!
