Greetings every curious soul!
I am in a bit of a bind.
I would like to set the 3DLUT file of a ColorLookUp adjustment layer automatically.
Using the action recorder I have managed to extract that the batchplay action should look like this
const actionObj = [
{
_obj: "set",
_target: [
{
_enum: "ordinal",
_ref: "adjustmentLayer",
_value: "targetEnum",
},
],
to: {
_obj: "colorLookup",
lookupType: {
_enum: "colorLookupType",
_value: "3DLUT",
},
name: lutAbsolutePath,
LUTFormat: {
_enum: "LUTFormatType",
_value: "LUTFormatCUBE",
},
profile: {
_data: profile, // this is a variable
_rawData: "base64",
}
,
LUT3DFileData: {
_data: base64, // this is also a variable
_rawData: "base64",
},
LUT3DFileName: lutAbsolutePath,
},
_isCommand: true,
},
];
The three variables are:
-
lutAbsolutePathis the name you will see in the 3DLUT file input - The
base64, which is the .cube file encoded in base64. - The
profile, which is a the .icc file encoded in base64
The rest is static
The .cube was easy, read the file with uxp.storage, load the string, encode to base64 and stuff it in the action object.
But I cannot figure out how to get the .icc file.
Loading in the LUT manually is selecting the ColorLookUp adjustment layer and loading in the .cube.
I never even touch anything .icc related.
So I assume it is generated from the .cube
The profile cannot be any other .icc base64 encoded profile, it has to be one linked to the .cube.
But I have no idea how to generate that .icc file.
Any thoughts?
Thank you ![]()