Skip to main content
Inspiring
November 2, 2023
Question

Javascript can't access legacyContentData of adjustment layer.

  • November 2, 2023
  • 1 reply
  • 303 views

Hey

 

I'm a little lost, this function used to work great to get the "internal" data of different adjustment layers. But now I just get null? What happen ? Old PS is not working either any more, I'm lost 😕😕

 

function getAdjLayOpts (id)
{
    try{
        var ref = new ActionReference();
        if (id == undefined)
             ref.putEnumerated( charIDToTypeID("AdjL"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        else
            ref.putIndex( charIDToTypeID( "Lyr " ), id );

        var desc = executeActionGet(ref);
        return desc.getList(stringIDToTypeID("adjustment")).getObjectValue(0).getData(stringIDToTypeID("legacyContentData"));
    }catch(e)
    {
        $.writeln(e)
        
        return undefined;
    }
}

 

 

Post from past that I used to learn it I think > https://community.adobe.com/t5/photoshop-ecosystem-discussions/how-to-access-and-change-any-adjustment-layer-properties-after-created/m-p/9953993

This topic has been closed for replies.

1 reply

Inspiring
November 2, 2023

Ok update to the issue, I tried on another pc with old 2023 photoshop that was not updated since release... Everything works just fine there. But latest ps 2023 or 2024 no longer run that function properly!