Copy link to clipboard
Copied
Hi Mathias, I wanted to continue our conversation from aescripts.com here on the forums. Thank you for providing me with this updated code block image. You were spot on to have the template block for exporting clip data embeded into the "For each sequence" block. It took me a while to get it to work but eventually got it to a place where I could export all the data for the selected sequences. Couldn't seem to get it to work as a Bin and Sub Bins option. I don't mind selecting the sequences though. The challange I am now facing is the time it takes to export all the clip data in those sequences. With only 3 sequences selected (out of 8), the export to .csv took 29 minutes. I feel like I'm missing something. My concern is the sheer amount of data i'm pushing from all these clips is irrelevant. All I really want to be able to do is export the text only from all the AE Mogrts in a project to a .CSV, Then I can translate and re-import the .CSV and have it update all AE Mogrts in all sequences in a chosen language based on the column. I've tried the template update AE Mogrt Texts with Spreadsheet, and it has been hit or miss for me. Punctuation seems to throw it off, and sometimes it misses whole text strings all together. I have used the Export Properties of selected clips to spreadsheet because it works reliably. It seems to make all the changes with accuracy. Creating a spreadsheet that has just the mogrt text and then reimporting it for the entire project is my goal. I can make this work by exporting massive amounts of data, but I'm concerned about the processing time. I know i'm doing it wrong, because I'm not much of a programmer. I'm attaching what I ended up with for the export of the data. Thanks Mathias.
Hi Nick,
to give some context for everybody else, here is the original conversation:
...I've watched this tutorial several times: Update Clips, Texts, Colors and More With A Spreadsheet . It's a great video tut, and I have learned how to export, "all selected clips" to a spreadsheet. I've modified the data and re-imported it. Works great! I try to reverse engineer this process by adding the automation block: For Each Project Item, but I've been unsuccessful so far. My goal is to export all c
Copy link to clipboard
Copied
Hi Nick,
to give some context for everybody else, here is the original conversation:
I've watched this tutorial several times: Update Clips, Texts, Colors and More With A Spreadsheet . It's a great video tut, and I have learned how to export, "all selected clips" to a spreadsheet. I've modified the data and re-imported it. Works great! I try to reverse engineer this process by adding the automation block: For Each Project Item, but I've been unsuccessful so far. My goal is to export all clip data from all sequences in a Premiere project to a .CSV. As an example, the projects I work with have many sequences, and each sequence contains Essential Graphics. Rather than exporting the data of "the selected clips" one at a time, is it possible to export the data for all clips inside all sequences to a spreadsheet?
Much appreciated. Thank you.
By @Nick24532079q08t
Hi Nick,in a nutshell, you have to nest the block, which loops over the items of the sequence into a block which loops over all sequences. See attached screenshot. That way, you cannot only loop over the clips of the active sequence, but off all sequences one after the other. Note that in this case, you should also modify the "add row to spreadsheet" block to also save the sequence itself in some cell. Otherwise you don't know which data belongs to which sequence and won't be able to do anything useful with it on import.
now my answer 🙂
To process all sequences instead of the selected ones, you need to uncheck this checkbox:
Some ideas to improve performance:
When looping over the clip parameters, you could check if "my param" starts with
Maybe before writing a property to the spreadsheet, you could check if its name starts with "Graphic Parameters". I think this should be the case for all essential graphics properties and for no other properties. Then you could do the processing (retrieving the property value and writing it to the spreadsheet) only, if it is an essential graphics property and skip writing everything else to the spreadsheet.
Even better: You could add an additional check when looping over each clip, to avoid processing clips at all, which are no mogrts. You could try to retrieve the media path of the clip and if it exists and ends with .mogrt you know that it is a mogrt. Only in that case, you need to loop over all parameters of that clip and otherwise you could skip that entirely, which should speed up processing a lot.
Copy link to clipboard
Copied
Hi Nick
Henrique here from TMMW.
Mathias pointed me to your question.
Let me know if you need additional information
to achieve your automation.
Thanks
Copy link to clipboard
Copied
Thank you @Mathias Moehl ! I really appreciate you giving me some extra information to help me out with Automation Blocks. You are beloved in the AE community! Also, thank you @Henrique -- TMMW So great to have your help as well. Sorry I haven't responded till now. I got super busy at work creating a presentation around translations and how they could potentially be automated. During this time, my trial license for Automation Blocks for Premiere expired. I really want to test this new information from Mathias, but I need to see about acquiring a license before I can proceed. I'm working that out with my manager. I wish I could have tested this more. @Henrique -- TMMW I tested Text Replacer as well, and I love it! It's simple to understand, and in my tests it works flawless. I have recommended this to my team of editors.
That said, the editors all want the same thing I want. The ability to batch export MOGRT Text data from all sequences in a project, (Rather than the selected sequence or active squence only). The data can then be translated and reimported to all sequences in the Premiere Project. I believe Automation Blocks holds the key to acheiving this, but I am struggling to learn the system. I wish I knew AB off the back of my hand and I am eager to learn. It can do so many things. I need to get a license before I can do any further testing. Thank you Mathias and Henrique. I will get back to you once I have had the chance to test.
Copy link to clipboard
Copied
Hi Nick
I've created an example that should help you with the initial steps.
https://github.com/tmmw/Automation-Blocks-for-PR_Scripts/tree/main
It exports all text from the project into a spreadsheet.
Let me know if you have any questions.
Cheers
Henrique
Copy link to clipboard
Copied
This is amazing - Thanks for sharing, Henrique!
I've also added it to the Community Library now. You find it in the folder
Project Management/Export/Mogrt/
(and I added a "Open Web Page" block with a link to this forum post)
Copy link to clipboard
Copied
@Henrique - TMMW Thank you SO much Henrique! That was very generous of you to do 🙂 You Rock good sir! I am just now starting to look at the script you provided for Automation Blocks. My time has become very limited this week as I've been moved to a quick turnaround project, but I hope to test this in depth soon. I will let you know how it all shakes out. Can't thank you enough for doing this for me.
-Nick
Copy link to clipboard
Copied
@Mathias Moehl @Henrique - TMMW Hi there. I was finally able to test the Automation Blocks script from Henrique, and it works great! 🙂 So far I have been able to successfully export all Mogrt texts from all sequences to a single .CSV file. Terrific! Once I translate the text in the .CSV to another language, I am able to re-import the .CSV using Mathias's Automation Blocks script: Update Text of Ae Mogrt with Spreadsheet.
Only one last step remains before this works flawlessly. Is there a way to export just the "Input fields" of the Mogrts to .CSV file? Right now when I export a .CSV it includes all the extra parameters of the Mogrts in the spreadsheet. For example, parameters like color, guides, and font size are all included. It takes a significant amount of time for me to go through the .CSV file manually deleting rows till just the "input fields text" remains. Basically, I want the text that was directly input into the Mogrt by the editor. Is it possible to do this with Automation blocks?
Thought: Does this functionality exist in MS Excel or other .CSV editor? Can I somehow reduce and filter the content in the spreadsheet to just the input text fields?
Thank you both again for your support. I really appreciate the help you have given me so far.
-Nick
Copy link to clipboard
Copied
The great thing with Automation Blocks is that everything can be customized.
In Henrique's code, just find the part which loops over the properties that are exported, then add a condition to only export if it is one of the entries you want to export.
What might be confision about TMMW's code at first is that it consists of functions, which are collapsed. So you need to right-click->expand on the "run" block to see the details of the main code.
#
The only thing that you need to figure out is what exactly distinguishes the values you want to export from the ones you don't. Maybe they have some keyword in their name? Like only export properties whose "prop" value does not contain "color" or "guide"? Really depends on your templates.
Copy link to clipboard
Copied
Thanks so much @Mathias Moehl . I really appreciate your help here. Your explanation helps me understand how this script works a little better. I'm going to take a stab at it and see what I can come up with and get back to you. 👍🏻
Copy link to clipboard
Copied
Hi @Mathias Moehl I was finally able to experiment a little further. I am so close to having a really great solution to translations in Premiere 👍🏻 I have been able to make the script show just the "graphics parameters." on export to .CSV. All I need now is to be able to filter out the graphics parameters I don't need based on keywords. So far the solution has eluded me, and I've spent hours testing/experimenting. I was able to successfully filter the data down to just a single keyword, "Darth Vader" 🤣. However, this is in the "value" column, and what I need is to be filtering based on the "graphics parameters" column. I can't seem to filter out the graphics parameters column based on keywords? For example, we use standard words in our templates like Bullet 1, Subtitle, Description, etc. If I could filter based on graphics parameter key words, I would be set. The problem with filtering based on the values column is those are constantly changing and dynamic with each project. I'm attaching some examples. Any guidance you could provide would be greatly appreciated. Thank you for your time Mathias.
Copy link to clipboard
Copied
If you use the "get prop of clip" block, you retrieve the actual text that the template parameter has. If you use just "prop" itself, you get the graphics parameter column instead of the value column:
The "in text ... find" block returns 0 if no occurrence of the word was found. Hence, we check if it is NOT 0, because then we know that the keyword has been found.
This will return true if the prop is
"Graphics Parameters\Darth"
but also if the prop is
"Graphics Parameters\My Darth V"
i.e. it only checks if the word "Darth" occurs anywhere in the name.
If you want to be more precise, you can do an equality check with the full parameter name:
Copy link to clipboard
Copied
@Mathias Moehl Thank you sooooo much! 😁😁😁 I am still experimenting with this approach, but so far so good! Very helpful. It's one of those moments where you hit your head against the wall and say, "why didn't I think of that"? hehe. I hope to get back to you soon and let you know how it goes. This helps me move forward. I appreciate your support as always!
Copy link to clipboard
Copied
Hi @Mathias Moehl . I did a bunch of testing using these new parameters you gave me, and things have been working great. I can define specific graphics parameters and export just those values to a spreadsheet. I made a very long "If" statement to make this work. Not sure if this was the right thing to do, but I can clean things up by collapsing the block. I can successfully export only specific text properties and print their value to a spreadsheet for all sequences in a Premiere Project. It runs relatively fast too! YAY, Huge step! :party_popper:😃
One last thought, Is there a way I can also remove the word "bullet" based on its value at the same time? I get the word bullet repeated a lot in my .CSV because it is the default value in our bulleted list Essential Graphic. Bullet 1 - 8 for example appears as text unless an editor changes it. I need to include Bullet 1 - 8 in my CSV export because I need to account for the possibility of all 8 bullets being used. If I could eliminate the word "bullet" based on its value and not its parameter I could in theory keep the word "bullet" from also getting added to the spreadsheet. I'm sure there is a way, but was wondering if you could give me any pointers? Thank you Mathias.
Copy link to clipboard
Copied
In your if condition you can check both the property name and the property value in the same way.
The condition of this if block checks if both the property name is "Graphi Parameters\Main" and its value is not "bullet".
Copy link to clipboard
Copied
This is so great! Thank you @Mathias Moehl Really appreciate the quick response. I'm excited to hone this even further. It makes sense👍🏻 I am on another project for the time being, but will test this as soon as I get the time. Thanks.