Simple Python Scripts to Automate Your Life

Here are some python scripts I shared on Sunday’s Logik Live #131

Append Start Frame to Name (1.5 KB)
Select clips in the Media Panel and run this to add the Source Timecode (in frames) to the name of the clip. Useful for delivering color graded files when they would otherwise overwrite each other with the same name.

Black Heads and Tails (2.8 KB)
Add Black (Virtual Color) to the Head and Tail of your Sequence. Start by creating the black clip on your Desktop, then select all sequences you want to add black to. The Black segment will be added wherever your track patching is set so be sure to set that up first as well.

Copy a filepath and shorten it (for Slack) (5.4 KB)
This is built on top of Mike V’s script for copying file paths to the copy/paste buffer. In my studio, when sharing a path on Slack, we don’t need /Volumes/Mount/Project/ ETC. so this script will make a ‘short’ path to be pasted wherever you need. Modify to suit your paths.

Delete Empty Tracks (2.0 KB)
This is available on the Logik Portal as well. Sequences selected in the Media Panel will have all empty tracks (video and audio) deleted.

Merge Offline (4.8 KB)
This script takes a reference video (offline edit) and merges it into an AAF/EDL/XML import. This will get you started in the online process quickly. There are a few conditions you need to check:

  • The AAF/EDL/XML import and the reference video must start on the same frame. Preferably 1:00:00:00
  • The reference video must have the same name as the AA/EDL/XML with “_ref” on the end.
  • Some conditions in the AAF/EDL/XML can throw off the process. Such as graphics layers, still images, or tracks that extend beyond the end of the bottom layer. If the script doesn’t seem to work try removing these things first.

Open in Photoshop (4.7 KB)
Simple script to open any PSD segment, clip, batch input using Photoshop (MAC ONLY).

Ratio Bug Fixer (1.1 KB)
There is a bug when conforming an XML with footage at a different resolution than the offline edit.
Segments with an Action timeline effect will not display the correct size/ratio. To fix this, we add a Source Color Management timeline effect, and immediately remove it to get flame to recognize the correct resolution of the source footage. You can execute this on multiple segments but the bug doesn’t always go away unless your playhead is parked on the segment when the script is executed.

This is a collection of functions that help me start a new flame project.

  • Clear the Desktop and create 3 Reels with Green color.
  • Change the Library name to match the Project name and make it red.
  • Create and color a Reel Group for Online Assemble / Finishing.
  • Copy all the standard job folder bookmarks to this project
  • Do All The Things Above

The Bookmarks are created from a template XML file. Modify this script to point at your template file.

Update Slate Date (2.3 KB)
If you use Burn-In-Metadata to add a date to slates, this will update the date on all selected sequences.
For this to work, the Slate has to be the first segment on the top layer. And you have to make sure in the FX ribbon you are seeing the “Layer Specific” settings and the “Update” button is visible. This script simply hits that button.

This Script is a work-in-progress. The goal is to automatically generate a ‘timesheet’ for tracking hours, billing, etc.

Anytime you start flame, switch projects, or exit flame the date and time will be noted and a text file on the Desktop will list the hours and minutes spent on that project. If you are not on billable time you should switch to a null project or exit flame.

For now it’s a simple text file. Eventually I want the script to add up the time spent in each project to give you a daily or weekly total in a spreadsheet.


Thank you for this, Bryan! Absolutely amazing stuff!!!

Is this logged with autodesk? I fight with it on every job, and would love to add our name to the list. It’s maddening.

I’ve submitted this bug and I shared a screen capture with them. I’ll try to find the exact issue #.

1 Like

Ha - It’s your bug report that I got added to:


From this Logik Thread:

1 Like

Dammit! Hah. We’re still stuck on 2023.3.2 because moving 10 machines to Rocky is non-trivial. I’m bummed to hear it’s still a bug in more recent versions of Flame. It’s a pain!

Thanks Bryan. Excellent. Will make good use of these.

Holy Crap, the ratio fix one is amazing. You’ve just saved me loads of time.
I owe you a beer.

1 Like

Thanks for these Bryan :slight_smile: I’ve been playing with your TimeSheet and have dodgied up a working CSV version. Do you or @fredwarren know if it’s possible to also log the current Desktop being used and when it gets switched within a session? Work case would be single client project with multiple campaigns.

edit: I’ve found the desktop string now to see what I can do with it :slight_smile: