Skip navigation
Currently Being Moderated

Which layer is the target layer?

Dec 19, 2013 4:45 PM

Tags: #layers

How can I determine which layer among those in the ->layersDescriptor structures corresponds to the target layer?


In photoshop cc x64 pc


-- all the read channel numbers seem to be unique

-- all channels have ->target=1


(edit after more work with layersDescriptor)


the information presented has a lot of errors and omissions, such that it's impossible

in principal to display layers the same way as photoshop does.  Invisible "pass through"

layers are listed as visible.  Layers with "stroke" special effects are indistinguishable

from normal layers.

  • Currently Being Moderated
    Jan 21, 2014 9:41 PM   in reply to ddyer00

    Layers with "stroke" special effects are indistinguishable

    from normal layers.

    Here is how to find stroke (keyFrameFX, descLayer is starting layer descriptor, in this case code also look if effects are visible)




        error = sPSActionDescriptor->HasKey(descLayer, keyLayerEffects, &hasKey);

        if (error) goto returnError;


        error = sPSActionDescriptor->GetBoolean(descLayer, keyLayerFXVisible, &effVisible);

        if (error) goto returnError;



        if (hasKey && effVisible){




                error = sPSActionControl->StringIDToTypeID("classLayerFXVisible", &runtimeClassID);

                if (error) goto returnError;

                error = sPSActionDescriptor->GetObject(descLayer, keyLayerEffects, &runtimeClassID, &descEFFECTS);

                if (error) goto returnError;



                // FRAME

                error = sPSActionDescriptor->HasKey(descEFFECTS, keyFrameFX, &hasKey);

                if (error) goto returnError;



                if (hasKey)


                    error = GetFrameAttributes(index, info);








    Momir Zecevic

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points