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

sourceRectAtTime like function in SDK, boudaries of shape layers or clipped by mask

Explorer ,
Jul 19, 2024 Jul 19, 2024

Copy link to clipboard

Copied

So the question is

How to get the dimentions, boundraies of the particular layer if it dont have a source or was clipped by mask?

 

Here how I get it for AEGP_ObjectType_AV:

 

A_long extraDimetions[2] = {0, 0};
AEGP_ObjectType extraObjectType = AEGP_ObjectType_NONE;
ERR(suites.LayerSuite8()->AEGP_GetLayerObjectType(extraLayerH, &extraObjectType));
if(extraObjectType == AEGP_ObjectType_AV){
AEGP_ItemH extraItem = nullptr;
ERR(suites.LayerSuite8()->AEGP_GetLayerSourceItem(extraLayerH, &extraItem));
if(extraItem != nullptr){
ERR(suites.ItemSuite9()->AEGP_GetItemDimensions(extraItem, &extraDimetions[0], &extraDimetions[1]));
}

 


In another words, how to get the same or similar for AEGP_ObjectType_TEXT and AEGP_ObjectType_VECTOR?

And also how to get the boundaries for masked/clipped layer.

TOPICS
How to , SDK

Views

154

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

correct answers 1 Correct answer

Engaged , Jul 19, 2024 Jul 19, 2024

Yes it's a very handy way to get the dimensions of the layer at float precision, even if it doesn't have a mask 🙂 

Votes

Translate

Translate
Explorer ,
Jul 19, 2024 Jul 19, 2024

Copy link to clipboard

Copied

Seems masked layer dimentions I found:

A_FloatRect masked;
AEGP_LTimeMode tm = AEGP_LTimeMode_CompTime;;
ERR(suites.LayerSuite8()->AEGP_GetLayerMaskedBounds(extraLayerH, tm, &timeCompForCurrentFrame, &masked));

 The shapes dimentions and txt's still relevant

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
Explorer ,
Jul 19, 2024 Jul 19, 2024

Copy link to clipboard

Copied

O! The same works for the shapes too...
And for the fonts...
And for the layers without masks...

Is it a kind of general way to get the boudaries actually!?

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 ,
Jul 19, 2024 Jul 19, 2024

Copy link to clipboard

Copied

LATEST

Yes it's a very handy way to get the dimensions of the layer at float precision, even if it doesn't have a mask 🙂 

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