CS SDK doubts

General Discussion of Scripting for Flex, Flash & CS SDK

Moderators: Tom, Kukurykus

undavide

CS SDK doubts

Post by undavide »

Hello,
I'm just approaching the new CS SDK, but I'm not sure I've understood the "big plan" - so maybe those of you who got it may confirm my findings.

1) The Photoshop Panel Developer's Guide CS5 isn't that different from the previous version. We can code ExtendScript and call it (CSXS lib) from a Flash panel, which is made within Flash Builder.

2) CS SDK provides a way to access the Ps DOM via ActionScript (through CSAW libs), which will be embedded in the resulting .swf. The GUI is in Flash, and the IDE is Flash Builder (with or without Extension Builder plugin). ExtendScript is allowed.

I'll be coding Photoshop panels only, and I'm a bit hesitant to switch to CS SDK: frankly I can't get the plus side, while the drawbacks are more clear (rewrite in AS the code, find a way to put in there all the ScriptingListener calls, etc.)
Probably I'm missing some exciting feature: what do you think about it? Is there something new that you can do with CS SDK that's impossible to get through old style ExtendScript?
Or maybe, since CS future versions developing will be more and more in a CS SDK-like fashion, it's better to swim in deep water as soon as possible?
Thanks in advance for your suggestions and thoughts,

Davide
Mike Hale

CS SDK doubts

Post by Mike Hale »

Here is my understanding of the advantages. Setting aside cross-DOM because you only want to create Photoshop panels. I would think that if you are only making simple panels that call javascript functions without sending much data back and forth there is only a slight speed advantage in the new CS SDK. But the more data you need to send through the ExtendScript-XML-AS pipeline the faster and easier it is just to do it all in AS. You also avoid the dataType to String to dataType conversions because you no longer need XML to pass the data.

Paul has a script called Action Finder which lets users that have tons of actions find the action by name without hunting through the Action panel. I thought about making a panel to do the same thing using Paul's code as a base. Paul said that was fine with him but I gave up trying to work out how to get the arrays of actionsets with their arrays of actions from ExtendScript into ActionScript.

With the new libs AS seems to be able to anything ExtendScript can do and has access to a few events that ExtendScript doesn't. As far as scriptlistener goes, although we tend to treat is as something different it is really just a part of the Photoshop DOM. executeAction and executeActionGet and the ID conversions are methods of app. ActionDescriptor, Action Reference, and ActionList are DOM classes. You adapt scriptlistner code just like any ExtendScript code to ActionScript.

Now having said all that I should add that I have only made simple 'Hello World' type panels using the new CS SDK. I am in the process of converting my Links panel over. It is not as easy as it was to update the panel to the new Photoshop Panel SDK but most of the work is removing the parts of the code dealing with the XML transfer of data.