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

Point parameter coordinates fed incorrectly when AE SDK Plugin is applied to a Text layer

Participant ,
Dec 16, 2024 Dec 16, 2024

Copy link to clipboard

Copied

I'm stumped by a problem that was brought to our attention by a user (and not sure if it's always been there or the result of a regression).

It appears that when a third-party plugin such as ours is applied to a text layer, the coordinates of any point parameters are reported incorrectly. Rather than having the X and Y coordinates expressed relative to the layer, they appear to be reported relative to the frame. By reported, I mean: how these values appear inside the PF_ParamDef structure or as a result of calling PF_PointParamSuite->

PF_GetFloatingPointValueFromPointDef().

 

Here’s an example that works as expected. The following screenshot shows a plugin applied to a clip with the same dimensions as the comp. I'm using a couple plugins: Frame Info to display the frame size as seen by the plugin, and a Circle generator (under FxFactory Pro Generators) to render a yellow circle at a location specified by a point parameter. It checks out:

1.jpg

What if the plugin is applied to a still-based layer with different dimensions? Things are still OK. Layer dimensions and point coordiates are still what they should be:

2.jpg

...and here’s where the confusion begins. When applied to a title, the layer dimensions are correct, but the point coordinates are relative to the top-left corner of the frame. They should be relative to the layer, but they are not:

3.jpg

Under all these scenarios, AE appears to be setting the origin_x/_y members of the output PF_LayerDef correctly. But whereas the offset appears to be automatically applied to point coordinates in the first two cases, AE is not applying the offset in the third case (title layer).

Am I seeing this correctly? Is this expected behavior? Shouldn't AE report the 2D point coordinates relative to the layer under all scenarios?

 

Things get extra wacky if you turn make these layer 3D. Again the first two scenarios work perfectly. AE correctly applies any 3D transform both to allow the user to interact with the rotated 2D layer... and conties to feed the correct coordinates to our plugin.

FxFactory_0-1734363538191.png

When turning the text layer to 3D, the results are downright baffling. The green circle, rendered by our plugin, doesn't even appear within the layer! How would it even make sense that the 2D title, rotated in 3D, suddently renders completely outside its actual area?

FxFactory_1-1734363650541.png

For reference, here is that same layer with the Circle generator disabled:

FxFactory_2-1734363766478.png

Hoping someone from the team can shed light on this.

 

 

 

 

 

Bug Unresolved
TOPICS
SDK

Views

32

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
no replies

Have something to add?

Join the conversation