Merging ActionManager code
hello,
i think following isn't possible - yet i'd confirmed experts.
given these 2 functions:
var c2s, c2t; c2t = function(charid) { return app.charidtotypeid(charid); }; c2s = function(charid) { return app.typeidtostringid(c2t(charid)); }; // changes smart filter blend mode setsmartfilterblendmode = function(layer, blending) { var d, d2, d3, r; d = new actiondescriptor(); r = new actionreference(); r.putindex(s2t('filterfx'), 1); r.putenumerated(s2t('layer'), s2t('ordinal'), s2t('targetenum')); d.putreference(s2t('target'), r); d2 = new actiondescriptor(); d3 = new actiondescriptor(); d3.putunitdouble(s2t('opacity'), s2t('percentunit'), 100.000000); d3.putenumerated(s2t('mode'), s2t('blendmode'), psutils.getblendmode(blending)); d2.putobject(s2t('blendoptions'), s2t('blendoptions'), d3); d.putobject(s2t('filterfx'), s2t('filterfx'), d2); return executeaction(c2t('setd'), d, dialogmodes.no); }; // clone of .applyunsharpmask() psutils.applyunsharpmask = function(amount, radius, threshold) { var d; d = new actiondescriptor(); d.putunitdouble(s2t('amount'), s2t('percentunit'), amount); d.putunitdouble(s2t('radius'), s2t('pixelsunit'), radius); d.putinteger(s2t('threshold'), threshold); return executeaction(s2t('unsharpmask'), d, dialogmodes.no); };
would think it's possible merge them in 1 executeaction - is, apply unsharpmask smartobject *and* set blending mode @ same time?
i've part of script performance key factor, , 2 different operations on quite time consuming business.
thanks in advance,
davide
i doubt smart filter’s blending options seem not exist prior sf’s application.
but i’m curious hear others opinions or experiences on this, too.
maybe should creating proper filters if performance such significant factor task (and appreciate not easy, myself have far not pursued successfully).
More discussions in Photoshop Scripting
adobe
Comments
Post a Comment