There appears to be a problem using @jyoon’s code in the new Photoshop Beta version 24.6.0.
Based on the above code, I created the following:
const adjustment = batchPlay([{ "_obj": "get", "_target":{ "_ref": "layer", "_enum": "ordinal", "_value": "targetEnum" } }], { synchronousExecution: true })
var legacyArray = adjustment[0].adjustment[0].legacyContentData;
const typedArray = new Int8Array(legacyArray);
console.log(typedArray)
In the current product version of Photoshop (version 24.4.1) it produces the following output in the console for an un-adjustment Levels adjustment layer.
Int8Array(632) [0, 2, 0, 0, 0, -1, 0, 0, 0, -1, 0, 100, 0, 0, 0, -1, 0, 0, 0, -1, 0, 100, 0, 0, 0, -1, 0, 0, 0, -1, 0, 100, 0, 0, 0, -1, 0, 0, 0, -1, 0, 100, 0, 0, 0, -1, 0, 0, 0, -1, 0, 100, 0, 0, 0, -1, 0, 0, 0, -1, 0, 100, 0, 0, 0, -1, 0, 0, 0, -1, 0, 100, 0, 0, 0, -1, 0, 0, 0, -1, 0, 100, 0, 0, 0, -1, 0, 0, 0, -1, 0, 100, 0, 0, 0, -1, 0, 0, 0, -1, …]
This array is a list of all the different settings within the Levels adjustment layer.
However, in Photoshop Beta version 24.6.0, the output to the console is:
Int8Array [buffer: ArrayBuffer(0), byteLength: 0, byteOffset: 0, length: 0]
The problem appears to be that
var legacyArray = adjustment[0].adjustment[0].legacyContentData;
returns undefined
in the console. In other words, legacyContentData
is no longer available, it seems, in the newest version of Ps Beta.
Is this a bug, or is there going to be a new way to access “legacyContentData” going forward?
Right now I can’t find a way to access “legacyContentData” in Photoshop Beta version 24.6.0.