Copy link to clipboard
Copied
I just started using Automation Blocks and I'm having a lot of success so far.
I'm a little stumped on this one script, as I can't figure out the flaw in my logic.
I want it to examine all selected clips in the project, and interpret the frame rate of any clip that's NOT 23.976.
I feel like what I have below should work. Any ideas why it isn't?
I just did some more experiments:
In this test you can see that when setting the frame rate to 23.976, Premiere displays it as 23.98, but when retrieving the actual value with Automation Blocks again, it is 23.97600000something - i.e. really almost 23.976 except for some tiny rounding issues.
I used alert() to show the actual frame rate both before and after changing it. When I run the tool the second time, I see the 23.976000... value also in the first alert message. Hence, I can be sure that
...Copy link to clipboard
Copied
It looks like the code should do what you want.
Does it only fail for 23.976 or also if you try it with say 30pfs?
If it only fails for 23.976, it must be related to some rounding issues.
Copy link to clipboard
Copied
I just did some more experiments:
In this test you can see that when setting the frame rate to 23.976, Premiere displays it as 23.98, but when retrieving the actual value with Automation Blocks again, it is 23.97600000something - i.e. really almost 23.976 except for some tiny rounding issues.
I used alert() to show the actual frame rate both before and after changing it. When I run the tool the second time, I see the 23.976000... value also in the first alert message. Hence, I can be sure that this is the value that Pr actually stored and that the 23.98 is just what it displays.
Here is a variant of your tool, which sets the framerate of all selected project items:
Instead of your equality check, which sets the framerate only if the item does not have EXACTLY that framerate already, I added a more fuzzy check.
Now it only sets the new framerate if the item does not have a very similar framerate already. I also added some output to the console, such that you can see what is going on. Script is attached.
Copy link to clipboard
Copied
Wow. You nailed it. Thank you so much for your time and attention on this.
This plugin is an absolute game changer for my workflow. I can't wait to see how far I can take it.