• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to get mask / shape data from another layer?

Engaged ,
Nov 13, 2022 Nov 13, 2022

Copy link to clipboard

Copied

Hi gang;

 

I have followed the PathMaster project to understand how to get mask shapes and work with them. I implemented something similar in my project and it works great.

 

However, the PathMaster project can only read data from it's own layer so you cannot have shapes. As such, I have been searching to find examples on how to get mask or shape data from another layer, other than the effect layer.

 

I recall a long, long time ago seeing a post on here that had perfect example code on how to do that but I've been searching for the past hour and can't seem to find it.

 

Any suggestions or help on how to achieve that?

 

Thank you in advance!

-Rich

TOPICS
SDK

Views

368

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
community guidelines
Community Expert ,
Nov 13, 2022 Nov 13, 2022

Copy link to clipboard

Copied

I am not familiar with Pathmaster. Do you have a link? 

 

I have no idea what you are trying to accomplish. You can link masks to shape layer paths with a simple pickwhip. You cannot link masks to parametric shapes like Rectangles or Polygons unless you convert them to Bezier Paths. 

Votes

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
community guidelines
LEGEND ,
Nov 13, 2022 Nov 13, 2022

Copy link to clipboard

Copied

The way I remember it you "cast" the mask data as a shape layer property stream and manipulate it back and forth since shape layers apparently are not accessible otherwise in the public API.

 

Mylenium

Votes

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
community guidelines
Engaged ,
Nov 14, 2022 Nov 14, 2022

Copy link to clipboard

Copied

Hi Mylenium;

 

Thanks for your reply. I thought I could use the same technique mentioned in this thread to grab the layer handle, only I'm not sure how to apply it to PF_CheckoutPathhttps://community.adobe.com/t5/after-effects-discussions/aegp-layerh-from-a-pf-param-layer/td-p/6303...

 

Anyway, perhaps I'm confused and going down the wrong road altogether... ?

 

Regards,

-Rich

 

P.S. Rick, my thread is marked SDK so it is a development specific question.

Votes

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
community guidelines
Engaged ,
Nov 17, 2022 Nov 17, 2022

Copy link to clipboard

Copied

LATEST

AFAIK the only way to access shape data in the SDK is to have a mask path param and set it's value to the shape layer's path via expressions. Would be very happy to be wrong on this if anyone has a different way!

Votes

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
community guidelines
LEGEND ,
Nov 15, 2022 Nov 15, 2022

Copy link to clipboard

Copied

I'm not into plug-in programming, so I can't answer the specifics. I only occasionally dig into the docs to keep up with latest development. The way I understand your request, you'd have to implement any UI widget as custom code since, again, you cannot actually access the shape layer infrastructure. Paths themselves are "cast", meaning you use the mask APIs and your own code to create the structure and then simply blindly fire them at the property stream for the shape path (which you can add as a generic prop stream). Then apparently it's a lot of finger-crossing and hoping you did not mess up and AE handles the data type conversion. Anyway, perhaps one of the AEGP savants will chime in and has better answers for you.

 

Mylenium

Votes

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
community guidelines