Highlighted

Access shape layer vertices with plugin

Explorer ,
May 21, 2020

Copy link to clipboard

Copied

I'd love to know if it's possible to access shape layer vertices within a plugin?

I can easily access mask paths, but not shape layer paths.

 

Big thanks in advance to any genius who can offer the solution!

TOPICS
SDK

Views

703

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

Access shape layer vertices with plugin

Explorer ,
May 21, 2020

Copy link to clipboard

Copied

I'd love to know if it's possible to access shape layer vertices within a plugin?

I can easily access mask paths, but not shape layer paths.

 

Big thanks in advance to any genius who can offer the solution!

TOPICS
SDK

Views

704

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 21, 2020 0
Adobe Community Professional ,
May 21, 2020

Copy link to clipboard

Copied

What exactly are you trying to do? Plug-ins affect pixels, so they can either modify an existing layer like a blur would or generate a new output like a fractal noise. Scripts and extensions are more likely what you're looking for, but I don't know what you're trying to do so it's hard to recommend a solution.

 

Penpal is a brand new extension (released three days ago) that does some pretty amazing stuff, but it's for path editing. In order to do things After Effects can't it creates a representation of your path in its extension panel, allows you to modify the path there, then applies the changes back to your original path: https://aescripts.com/penpal/

Is that what you want to do? 

 

As for accessing mask paths, can you give an example of a plug-in that lets you do that? Are you talking about being able to apply an effect to a layer and then reference another layer's source and masks? If so, then no, there's no way to do the same thing with a shape layer.

[Please use the "Reply" button under the FIRST POST to ensure replies sort properly.]

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 21, 2020 0
Explorer ,
May 21, 2020

Copy link to clipboard

Copied

thanks David, Penpal looks great and will definitely prove useful for my animation work!

 

Plug-ins are for pixels and the SDK allows vector masks to determine which pixels are affected by the plugin.

However sometimes I need a shape layer path to be the mask which means creating a mask and insert an expression to reference the shape layer path.  This is fine in small projects, but after a while kills performance.

 

The SDK examples have some effects that use masks 🙂

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 21, 2020 0
Most Valuable Participant ,
May 21, 2020

Copy link to clipboard

Copied

Agree with David. Rather than asking generic and vague "Can I...?" questions it would be much more helpful if you actually explained your use case and what you are trying to do. Of course it's reasonable to assume that shape layers are off-limits due to being a closed part of the code, but there may be ways to work around some limitations...

 

Mylenium

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 21, 2020 0
Explorer ,
May 21, 2020

Copy link to clipboard

Copied

Thanks Mylenium I'll try not to be so vague next time.  Yep always great to find  aworkaround!

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 21, 2020 0
Adobe Community Professional ,
May 21, 2020

Copy link to clipboard

Copied

you can get the shape layer's vertices by getting the shape stream's value and casting it as a mask shape for the rest of the shape qeuries.

you can not, however, get the shape of a "preset" shape layer. i.e. star/rounded square/ect, do not populate the shape stream's value, and can not (to the best of my efforts) be gotten.

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 21, 2020 0
Explorer ,
May 21, 2020

Copy link to clipboard

Copied

Awesome, thanks Shachar!  Yes that's fine, I'm only trying to access a user defined path, not a "preset" shape

I understand how to access masks and maniuplate the vertex data, but not sure how to cast the shape stream's value as a mask shape.  Perhaps i'm overlooking something simple, be great if you can share any code snippets to point me in the right direction?

Very excited to get this working, thanks again!

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 21, 2020 0