<FLAME>Photoshop development</FLAME>

python
photoshop

#1

Am I just dumb, or is Photoshop development just unforgivably lame?

Forget that the API dates to like 1996. Forget that the documentation starts you off with a discussion of what fricking Hypercard did for plugins. Forget that there is no obvious place to start, and that documentation is not sorted by year, and that it frequenly refers explicitly to out of date documents with a note like “out of date but still relevant”.

Instead, let’s focus on some fun facts:
[ul]
[li]The folder where the documentation says adobe CC installs extensions doesn’t exist. Neither does the parent folder!
[/li][li]And the folder name is different in other docs. But that’s ok because that one doesn’t exist either.
[/li][li]The introductory documentation encourage you to download and use an eclipse plugin to develop extensions. Except for the other documentation, which says that’s obsolete and doesn’t work with the current version
[/li][li]Of course, all the docs are PDF files, which makes it easy to follow links to “The adobe extension SDK” doc and get different versions of the same document.
[/li][li] And, of course, all the code sample have hard coded version numbers that refer to Adobe’s internal product codes – so you have dig those up if you want to make your extensions work with the version of Photoshop you have. So you get the power of javascript plus the easy distribution of compiled binary plugins!
[/li][li]
[/li][/ul]

I’ve been told that the big Adobe office in Seattle does Premiere or something, not photoshop. If not I’d be tempted to TP the whole place. They’ve made me appreciate Autodesk in ways I never thought possible!


#2

Oh, I forgot that all of the top level links on their site, like “Learn how to build an adobe creative suite extension in 5 minutes” link to a tool they deprecated last year and which is never going to be supported in future version. The hits keep coming!


#3

I’ve traversed the problems you’re speaking of, and I can help you if you’re stuck.


#4

i remember trying to follow the docs for writing a photoshop remote application thing. The docs were utter crap when i eventually found them. I had to dig and dig and some random google search led me to the right page on adobe’s site that linked the correct sdk. Once i had them it was bonkers. i had to use a java tutorial and translate that to python.

all of their “extending” stuff , plugins/jsx/node seem half baked at best. I really do appreciate the work that went into the maya python stuff. Even if it’s not “pythonic”, its done well enough to work.


#5

It seems like https://github.com/Adobe-CEP/Samples and https://github.com/undavide/PS-Panels-Boilerplate are the closest to correct documentation. It took all day just to get photoshop to recognize a plugin, now its time to start banging my head against their lame API.

Sigh.


#6

Am I correct, by, the way, in thinking that the extensions thing is still passing through the JavaScript API? The presence of node and whatnot doesn’t actually give us better/faster access to the internals?


#7


#8

i would imagine so, however the access to node gives us all the goodies of node like db access, etc


#9

TheMaxx, which db? I am not following you.


#10

http://nodejsdb.org/

there are a ton of modules for node and you should be able to use all(most?) of them. I just got my hands on CC so i havent gone into this yet.

What irks me is all of these cool features they add always seem to be ill guided. They added a tcp server to interact with and react to events in photoshop. Why? for a stupid ipad app to mix colors! really? They add in nodejs and all the goodness of that, why? to automate texture exports. holy shit! And their interfaces reflect their intentions. Forget having some good ideas, they are just poorly implemented or thought through.

Then they barely document any of it. Why cant they just open it up? use it as a platform? they just half ass that side of things and as long as i can use content aware fill, all is well.

sorry </rant>


#11

Has anybody been able to get photoshop’s node to install packages with npm? I cant’ figure out how.


#12

i installed node via the msi, then copied over the npm folders and files from the install dir in program file into the PS dir next to node.exe. Youre able to run npm install whatever and it will put it into the PS folder.

This is hacky to say the least, but im on windows

Now how can you use this for something useful


#13

ok so ive been tinkering with photoshop cc 2014 and the new html panels. Holy shit, it’s awesome! The only downside is the requirement of CC 2014. You have full access to PS via jsx, any nodejs modules, and any web based js libs (jquery, angular). I just wrote a simple panel that has some p4 stuff and a simple export function. its a small angular app that changes state based on the current document. for example the perforce checkout button will be disabled if the document is already checked out.

And its easy to distribute, its all in one nice folder, just drop that in the user folder and you’re off!


#14

we are still using python and comtypes to write tools for photoshop. I recently had to update our tools to work with both CS 5 and CC 2014. I am curious what you guys find out, I’d like to develop something that isn’t held together with duct tape and bubble gum…


#15

We use the COM interface through C# and it totally sucks. Having to use the Javascript logger and then invoking methods via the incredibly obtuse ActionDescription classes is not fun, but it feels like the only option because the intrinsic methods are all weakly typed in their arguments but throw exceptions with useless messages if you don’t pass the (secretly) correct type. I feel like we’d have better luck trying to tool around KidPix. At least then we’d get fun sound effects when everything inevitably blows up.


#16

Using com does suck as you get little feedback. You’re still just using the same api as you would in the jsx land. After working with the new panels for a bit, it feels like things are coming together. No more hacky configurator panels that are barely useful or trying to make a qt window “follow” photoshop. With node modules, all the modern web goodies and access and feedback from photoshop, it feels like its a real workflow.


#17

Well, it would feel like a real workflow if the actual photoshop api was not a 1990’s era dinosaur with Alzheimers.


#18

[QUOTE=TheMaxx;27014]ok so ive been tinkering with photoshop cc 2014 and the new html panels. Holy shit, it’s awesome! The only downside is the requirement of CC 2014. You have full access to PS via jsx, any nodejs modules, and any web based js libs (jquery, angular). I just wrote a simple panel that has some p4 stuff and a simple export function. its a small angular app that changes state based on the current document. for example the perforce checkout button will be disabled if the document is already checked out.

And its easy to distribute, its all in one nice folder, just drop that in the user folder and you’re off![/QUOTE]

What resources did you use to get started?


#19


http://www.davidebarranca.com/2014/07/html-panels-tips-11-externalobject-cep-events/

there was a bit of hunting and some things were assumed. Like the whole CEP thing isnt even there unless Bridge is installed. At least thats what eventually got it running for me. Other than that just follow the stuff there and that should get you into it. If you have any questions, shoot me a message

Also, configurator is discontinued and flash panels are disabled in CC 2014. Everything moving froward will be html based

Well, it would feel like a real workflow if the actual photoshop api was not a 1990’s era dinosaur with Alzheimers.

Which codebase would scare you the most to look at photoshop, maya, or max?


#20

Thanks!