Been working on a idea for some workflow tools for PS, but after looking at the scripting documatation I see no way to manipulate layerset masks or layer masks.
Anyone found a workaround?
All i really need to do is copy one mask into the mask of a other layerset.
i believe it gives a string or a layer index for a source/dest in the script dump. Try to decipher it. i did something similar before but no longer have access to the code
Ahhh yes. Photoshop scripting; where once you start using script listener your scripts look like code from the matrix.
All of the parameters for the functions you call will be accessible in the script listener output, so you can pass in your own values. It can just take a bit to figure out what corresponds to what.
thanks for all the help guys, i managed to get some time to take a peek at it today, and played with it a little, and was able to make a JS function that duplicates the layerMask of the active layer to a named layer, so proved it is doable and flexible enough. SO i will soon remake that in my python code, and add some convince functions like haveing it set and restore the activeLayer for me, and having it accept a layer object instead of just a string name.
Also a other question, is how would i set up event callbacks, such as triggering one of my methods every time a layerSet is renamed removed or added?
EDIT: just found the notifier object, but it dosnt allow me to give it a callback, but only lets me give it jsx file to execute anyone got ideas how i can get python to know when a notifier event happens.
All i can really think if is a socket server, set one up in python, on a new thread to watch for a message. Than find some kinda socket library for JS that would be in the file executed from the notifier object in PS.
@TheMaxx you mentioned in a other thread you got a api that can sub to events in PS, is it able to accept function objects from python, that it fires when the event happens?
notifiers will simply call jsx files, so python is out. You can use my api for it, but it requires CS5+. If that works for you, then yeah, use your normal python functions for callbacks
getting a little stuck again when dealing with extendScript.
Am trying to get the intersection of 2 arrays, but extendScript has no intersection method.
So far i tried makeing my own, only to find out, unlike javaScript extendScript has no array.filter() or array.indexOf() methods, so i managed to create my own array.IndexOf(), but am still trying to figure out how to make the filter method, or find a other way to get the intersection of 2 arrays that dosnt require it.