Skip to main content
Known Participant
February 13, 2025
Answered

Wrong arguments in SDK examples?

  • February 13, 2025
  • 1 reply
  • 332 views

So, I was having some, what seemed to me caching issues when preview-ing in AE when rendering with transform_world, and couldn't find a way to fix it, until I accidentally stumbled upon following thread:

 

https://community.adobe.com/t5/after-effects-discussions/writing-a-plugin-that-scales-the-layer-applied-to/td-p/14446281

 

Where @shachar carmi says following: "first off, the docs are wrong about putting in_data on the first arg." and continues down "so now we can see the first arg is actually the effect_ref (in_data->effect_ref) that should go there, but i put a NULL instead. (otherwise it checks for interrupts)"

 

So I just trying putting NULL instead and that fixed my issue I had!

 

So:

1) What is this argument about and what is the difference between in_data->effect_ref and NULL

2) Why is adobe keeping this in documentation if it's wrong

Correct answer shachar carmi

honest to god, i can only theorize in regards to this question...

when working with "transform world", i noticed it gave me good results when typing in a param value numerically and pressing enter, while it gave me bad results while dragging a slider. i figured it was halting the transformation process to allow for a smoother interative experience for the user, alas it ended up being unusefly. parhaps this was left around since before CC2015, where the separate rendering thread was introduced...

in any case, since a lot of the suite callbacks accept a null instead of the effect_ref, and i vaguely remembered the PF_INTERRUPT macro internally uses the same effect_ref, that it allows for the transform_world callback to make that check. again, this is just me throizing here...

 

as for the wrong info in the docs, yes, you might encounter that sporadically. it's usually a non-issue, as codesense will tell you what you need to put in each arg, but non the less, if you tell the engineering team you found a mistake, they'll fix it. it happens from time to time. 🙂

1 reply

shachar carmiCommunity ExpertCorrect answer
Community Expert
February 13, 2025

honest to god, i can only theorize in regards to this question...

when working with "transform world", i noticed it gave me good results when typing in a param value numerically and pressing enter, while it gave me bad results while dragging a slider. i figured it was halting the transformation process to allow for a smoother interative experience for the user, alas it ended up being unusefly. parhaps this was left around since before CC2015, where the separate rendering thread was introduced...

in any case, since a lot of the suite callbacks accept a null instead of the effect_ref, and i vaguely remembered the PF_INTERRUPT macro internally uses the same effect_ref, that it allows for the transform_world callback to make that check. again, this is just me throizing here...

 

as for the wrong info in the docs, yes, you might encounter that sporadically. it's usually a non-issue, as codesense will tell you what you need to put in each arg, but non the less, if you tell the engineering team you found a mistake, they'll fix it. it happens from time to time. 🙂

Known Participant
February 14, 2025

Thanks! What about checkout_layer_pixels and checkout_output?