Is PS DOM extensible?
Hi,
apparently InDesign implementation of ExtendScript allows DOM extension (see this thread).
Basically you can add to a Class (say, an InDesign 'Cell') a new method.
I was wondering whether the same is theoretically possible. My goal is to fill PS DOM gaps with ActionManager functions, to be attached (say) to ArtLayers.
As an example, there's no DOM way to script a Hue/Saturation adjustment, and I can easily build my AM function for that matter. But it would run autonomously, and not as an actual ArtLayer method. E.g.
function applyHueSat(opt) {
// ... Long ActionManager implementation
}
Layer.prototype.applyHueSat = applyHueSat;
app.activeDocument.activeLayer.applyHueSat(/* whatever */);
Of course the above doesn't work (line 04 is the culprit). I know I can operator overload "classic" Classes, but I haven't been able to find a way in Photoshop to properly extend the DOM.
Is this possible?
Thank you,
Davide
