Highlighted

Get the layer handle of the selected layer in a layer param

Explorer ,
May 26, 2020

Copy link to clipboard

Copied

Hi everyone, somebody posted this question before but sadly it's no longer on the forum :'(  Hopefully it's an easy one to answer 🙂

 

My plug-in UI has a layer param and I would like to get the handle of whichever layer the user selects, so I can access its transforms etc, not just the pixel data.  I was hoping param->u.ld contained the layer index but can't see anything obvious.  Is this possible?

 

I'm currently using point and angle params, with expressions to reference the transform data, but I think it's a slow workaround and not intuitive.

 

Very much appreciate any help, big thanks in advance!

 

 

 

 

Adobe Community Professional
Correct answer by shachar carmi | Adobe Community Professional

it contains a layer ID. use AEGP_GetLayerFromLayerID to get the layer handle from that ID.

TOPICS
SDK

Views

261

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Get the layer handle of the selected layer in a layer param

Explorer ,
May 26, 2020

Copy link to clipboard

Copied

Hi everyone, somebody posted this question before but sadly it's no longer on the forum :'(  Hopefully it's an easy one to answer 🙂

 

My plug-in UI has a layer param and I would like to get the handle of whichever layer the user selects, so I can access its transforms etc, not just the pixel data.  I was hoping param->u.ld contained the layer index but can't see anything obvious.  Is this possible?

 

I'm currently using point and angle params, with expressions to reference the transform data, but I think it's a slow workaround and not intuitive.

 

Very much appreciate any help, big thanks in advance!

 

 

 

 

Adobe Community Professional
Correct answer by shachar carmi | Adobe Community Professional

it contains a layer ID. use AEGP_GetLayerFromLayerID to get the layer handle from that ID.

TOPICS
SDK

Views

262

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 26, 2020 0
Adobe Community Professional ,
May 26, 2020

Copy link to clipboard

Copied

it contains a layer ID. use AEGP_GetLayerFromLayerID to get the layer handle from that ID.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 26, 2020 1
Explorer ,
May 26, 2020

Copy link to clipboard

Copied

Wonderful thanks!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 26, 2020 0