Answered
Check empty curves function broken photoshop 24.7.0
I have this function as part of a script for finalising photoshop files. It checks for any points on the curve
this.checkCurve = function(index){
//if(app.activeDocument.activeLayer.kind != LayerKind.CURVES ) return;
var ref = new ActionReference();
ref.putIndex(s2t("layer"), index)
var rawDesc = executeActionGet( ref ).getList( s2t( 'adjustment' ) ).getObjectValue( 0 ).getData( s2t( 'legacyContentData' ) );
var pointer = 2; // used to read rawData similar to reading a file
var flag = rawDesc.charCodeAt( pointer ); // char at offset 2 always == 1 so use to validate data
if( flag != 1 ) forceError; // unknown problem with rawData
pointer = 6;// update pointer to BCD byte
var bcd = rawDesc.charCodeAt( pointer );
if( bcd < 0 || bcd > 15 ) forceError;// check for valid value
if( bcd == 0 ) return false;// an empty adjustment - no curves to process
return true;
}. The current version of photoshop doesnt seem to allow you to get the rawData. Anybody got some sort of work around or way of determining if a curve has no points on any of composite and component curves?
