Page 1 of 1

ActionToJavascript rasterize layer

Posted: Mon Feb 28, 2011 5:27 am
by brettn
I have created a Javascript file from an action in PS 12 (CS5)

When running the script I get an error:
General Photoshop error occurred. This functionality may not be available in this version of Photoshop.
The command 'Rasterize' is not currently available.
Line 40:
executeAction(cTID('Rstr'), desc1, dialogMode);

Is there any conpatability issues I should be aware of with CS5?

This action runs fine as an atn.

Regards,

Brett

ActionToJavascript rasterize layer

Posted: Mon Feb 28, 2011 6:24 am
by xbytor
Is there any conpatability issues I should be aware of with CS5?

None that I know of. Make sure that you have downloaded the latest release from ps-scripts.com. Get the stuff from CVS; the zip file may not be current enough.

If that doesn't fix it, send me the atn file and I'll take a look.

ActionToJavascript rasterize layer

Posted: Mon Feb 28, 2011 10:04 pm
by brettn
I've downloaded the latest from cvs...still throws an error on the rasterize command.

The attached atn and the generated Javascript file only attempt to rasterise a text layer with the sasme error occurring.

Regards,

Brett

ActionToJavascript rasterize layer

Posted: Mon Feb 28, 2011 10:35 pm
by xbytor
I've confirmed the problem. It appears that PS is internally _not_ following rules WRT how ids are handled.

Replace this:
executeAction(cTID('Rstr'), desc1, dialogMode);

with this:
executeAction(sTID('rasterizeLayer'), desc1, dialogMode);


and you should be set. There is no simple fix for this and I don't have time, at the moment, for a complete fix.
The work-around is to manually fix the generated jsx files.

Let me know if you run into any other problems.

Re: ActionToJavascript rasterize layer

Posted: Tue Jan 23, 2018 7:03 pm
by MaxChroma
Thanks for posting the manual fix on this... the previous way I had of fixing it was to use a different method in the action, such as create a new layer and merge down in order to rasterize the previous layer.