Skip to main content
Participant
September 12, 2025
Answered

Automation Blocks - 'Copy Auto Reframe Track To Transform' not working

  • September 12, 2025
  • 1 reply
  • 804 views

I'm using the "Copy Auto Reframe Track to Transform" block, but it's producing some results that aren't correct. Is it possible the script needs to be updated? Let me know if providing specifics would help.

I'm a fairly competent scripter, but I'm brand new to Automation Blocks - is it possible for me to fix it myself, or is this something only the original author could handle?

 

Thanks,

Ted

Correct answer Ted326221776cga

To learn using the block code of Automation Blocks, get started here:

https://docs.mamoworld.com/automation-blocks/tutorials-pr/firstSteps

I just looked at the block code of "Copy Auto Reframe Track to Transform" and noticed that it contains some logic to minimize the number of keyframes. For every frame it looks at the frame before and the frame after and if the agerage of these two is almost identical to the value at the current frame,  it does NOT introduce a keyframe at the current frame. Due to this "almost equal" and keyframe easing, this might not be 100% accurate.

I attached a version of the script where I deactiated this optimization to minimize the number of keyframes (in the code I replaced the check if the current time needs a key by "true", to always generate a key on every frame):

 

 

To test if this version is more accurate, you can download the attached xml file and load it into Automation Blocks.

 


I think I figured out what's happening.

There's an attribute in Auto Reframe called "Reframe Offset."

When "Overwrite generated path" is enabled, it takes the Reframe Offset into account when generating keyframes. But afterwards it adds the Reframe Offset again, effectively doubling it.

So until you reset the Reframe Offset back to zero, you're not seeing the original effect of the Auto Reframe.

This isn't a problem with the script, it's a problem with Premiere. So I added a code block that resets the Reframe Offset to zero after it sets Overwrite generated path to true.

I don't know if you'd want to include this step in the official collection, but I can send it to you if you like.

 

Thanks again for your help,

Ted

1 reply

Mathias Moehl
Community Expert
Community Expert
September 12, 2025

You can modify the block code of any Automation Blocks script yourself. If you have an improved version, you can send it to me such that I can publish it in the Community library.
What exactly is not working correctly?

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Participant
September 12, 2025

Thank you for the fast response.

The block creates keyframes in the motion channel as expected, but they're not 100% identical to the Auto Reframe.

It's off to the right by about 24 pixels, or about 5 percent.

Let me know if you'd like me to send you a project with an example.

 

How do I modify code blocks? Is there a tutorial? 

Mathias Moehl
Community Expert
Community Expert
September 13, 2025

To learn using the block code of Automation Blocks, get started here:

https://docs.mamoworld.com/automation-blocks/tutorials-pr/firstSteps

I just looked at the block code of "Copy Auto Reframe Track to Transform" and noticed that it contains some logic to minimize the number of keyframes. For every frame it looks at the frame before and the frame after and if the agerage of these two is almost identical to the value at the current frame,  it does NOT introduce a keyframe at the current frame. Due to this "almost equal" and keyframe easing, this might not be 100% accurate.

I attached a version of the script where I deactiated this optimization to minimize the number of keyframes (in the code I replaced the check if the current time needs a key by "true", to always generate a key on every frame):

 

 

To test if this version is more accurate, you can download the attached xml file and load it into Automation Blocks.

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects