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

Automation Blocks - Auto Versioning of Sequences

Explorer ,
Aug 09, 2024 Aug 09, 2024

Copy link to clipboard

Copied

Hi @Mathias Moehl 

 

The attached script assists in creating new versions of sequences. It currently....

 

-Makes a copy of the selected sequence

-Moves the new copy into an "old" folder

-Renames the original, selected sequence "Test"

 

I'm looking for help with the renaming part. I want to up-version the original, selected sequence


So if my original, selected sequence is named Sequence_01

I want it to be Sequence_02 after running the script

The copied version would still be _01

 

Any way to get the sript to recognize the number and go up one digit?

TOPICS
SDK

Views

182

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

correct answers 1 Correct answer

Community Expert , Aug 10, 2024 Aug 10, 2024

Hi Sam,

 

attached is a version which does what you need. The renaming turned out to be pretty complex.

I created one function "increment name", which increments the name, i..e. if you give it

"foo" as name, it returns "foo_01" and if you give it

"foo_01" it returns "foo_02" etc. or for

"bar0099" it returns "bar0100" etc.

 

Since this requires math on the numbers, you first need to turn the text "01" into the number 1, then increment it to 2, and then add the 0 at the beginning again. For adding

...

Votes

Translate

Translate
Community Expert ,
Aug 10, 2024 Aug 10, 2024

Copy link to clipboard

Copied

Hi Sam,

 

attached is a version which does what you need. The renaming turned out to be pretty complex.

I created one function "increment name", which increments the name, i..e. if you give it

"foo" as name, it returns "foo_01" and if you give it

"foo_01" it returns "foo_02" etc. or for

"bar0099" it returns "bar0100" etc.

 

Since this requires math on the numbers, you first need to turn the text "01" into the number 1, then increment it to 2, and then add the 0 at the beginning again. For adding these zeros I wrote a second function, "extend to length".
Here is the full code:

 

Screenshot 2024-08-10 at 22.06.57.png

Cheers,

Mathias

 

 

 

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

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
Community Beginner ,
Aug 27, 2024 Aug 27, 2024

Copy link to clipboard

Copied

Once again you have managed to make the relentless anguish of tasks in Premiere easier and more efficient, thank you, Mathias! 

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
Explorer ,
Aug 28, 2024 Aug 28, 2024

Copy link to clipboard

Copied

This works perfectly! Thank you so much.

And, of course, producers have changed the naming conventions on me!!

Now every sequence ends in a letter: V1A, V1B.

Any way to make the exact same script but the last letter in the sequence goes up alphabetically? Numbers don't change.
Thank you so much for your time and all the work you put into answering our questions. Understood if you don't have time to do this. You're very generous with your talents.

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
Community Expert ,
Aug 29, 2024 Aug 29, 2024

Copy link to clipboard

Copied

LATEST

I just asked ChatGPT for a solution and then wrapped it into a Execute Code Block:

Screenshot 2024-08-29 at 20.09.54.png

Screenshot 2024-08-29 at 20.01.58.png

 

Block code is also attached.

I think the combination ChatGPT + Execute Code block is very powerful in all cases where you just want to do manipulation of strings, numbers, searching for certain patterns in strings etc.

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

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