That is normal behavior. When you open a file from within Camera Raw as an object, it will reopen ACR when double clicked. A lot of people want to be able to reedit the image in ACR, and use this method. If you want to do it the way you suggested, open the file normally, then convert it to a smart object.
I don't think there is a way to determine how the SO was created with a script, though.
layer descriptor > smartObject > fileReference: "myfile.ext"
You can have list of all Raw file extensions and check if filereference has this extension.
Can you show code for this?
Also I need to know more: Is this layer with simple Raw-file or with Raw-file with ACR-parameters that was opened as object
var smartObject_FileReference = desc.getObjectValue(stringIDToTypeID('smartObject')).getString(stringIDToTypeID('fileReference'))
I assume that in "desc" variable would be whole layer descriptor.
1 person found this helpful
Thank you. I resolved this task.
So I got result code:
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
var desc = executeActionGet(ref);
var fs = executeActionGet(ref).getObjectValue(stringIDToTypeID('smartObject')).getString(stringIDT oTypeID('fileReference'));
We have usual smart-object If this function returns <something>.pub and smart-object with ACR-parameters else (for example <something>.cr2)