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

AEGPSetLayerTransferMode not setting a track matte

Engaged ,
Mar 03, 2024 Mar 03, 2024

Copy link to clipboard

Copied

Has anyone had any luck with AEGPSetLayerTransferMode to set a layer to be a trackmatte of the layer above? It only works for me if the layer is already a trackmatte but it won't ever set it otherwise.

 

For example if my layer is a trackmatte of the layer above, I can use the function to change the trackmatte type to for example luma inverted. But if my layer is not a trackmatte, the code appears to do nothing. I can also use the functions flags to set a layer to be set to preserve transparency. 

 

I understand there's a new method in ae 23 and newer which works well, but I'm trying to get backwards compatibility. Here's my code that is not behaving as expected:

 

AEGP_LayerTransferMode mode = {};
mode.mode = PF_Xfer_IN_FRONT;
mode.track_matte = AEGP_TrackMatte_ALPHA;
mode.flags = 0;
ERR(suites.LayerSuite7()->AEGP_SetLayerTransferMode(layerH, &mode));

 

TOPICS
SDK

Views

63

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 ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

i never tried setting a track matte programtically, so i don't know if you're doing it wrong or if that function is broken.

i can say, however, that some c api functions are indeed broken and the workaround is to use AEGP_ExecuteScript for that operation. once you're past the "but this is not elegant!" mental barrier, it just works. i used it to set keyframe interpolation info that was broken on the c side back when and perhaps still is broken...

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 ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

LATEST

Hi Shachar

Thanks, I guess I will go the execute script route! At least I learned you can set the preserve transparency switch through this method, which I didn't know how to do before and doesn't appear to be documented in the docs. 

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