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.
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 🙂
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
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!?
Copy link to clipboard
Copied
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 🙂