Simple Python Script

edit your post and wrap your code in triple backticks.
in the message editor for the forum there is an icon to do this :
</>

done

1 Like

never mind - i tried it - it didn’t work

i’ll come back to it later today

1 Like

There might be something helpful in this old script.

I installed the script to opt/autodesk/shared/python but with the shot selected and trim to active nothing shows up for “shots>Remove handles UI”

Hello Mark!

If I were you, I would write a Python script to import the file sequence from MediaHub and skip the slate frame instead of removing the slate after the clip has been imported since slate frame would dictate the clip’s properties like resolution, number of channel, etc. Importing the file sequence and offsetting the frame range by one frame would allow to get the expected content in Flame.

We have multiple Python script examples in /opt/Autodesk/flame version/python_utilities/examples and script folders.if you use the scripts/path_of_selected_clips.py example, you will see how to get the path from a selected in MediaHub. A file sequence would look like this:
/path/of/the/clip/myclip.[1000-1010].exr

You could then modify this path to modify the first frame of the sequence and import the clip to the desired Media Panel or Desktop location and there you go.

2 Likes

Hi Stephane,

The issue with this is that when using the replace edit feature flame expects the same length of shot in the sequence. If a clip is 20 frames long and the imported clip is 21 frames, then the replace edit does not work the same way as it normally would. Unless I’m missing something that I’m not aware of?

Thanks Again - Mark

1 Like

Hello Mark!

You will need to consolidate the segment to 0 and then Replace will allow you to replace the segment with the content without the slate.

This is why I recommended to focus on the MediaHub aspect of the workaround: if you import the content at its true duration then you will be fine when one version of content will be provided.

@mlheureux I like Stephane’s idea, but give this a go:
remove_first_frame.py (1.4 KB)

With a selection of clips (not sequences) on the desktop, right click and look for “Slates…-> Remove First Frame.” It uses “trim_head” followed by the shortcut for Consolidate handles, so you’ll see that window pop up.

2 Likes

Hi John,

This seems to be working great! It would be nice to be able to trigger it before shot import, but I’m totally happy living with this for now.

Many thanks!

1 Like

Happy to see you are good to go!

Here is a simple script that you could use in the Python Console to import a sequence of OpenEXR files to a Library Reel without the slate.

If you have an OpenEXR sequence that starts at frame 1000 and ends at 1100, just import from frame 1001 and there you go!

import flame

#define variables
project = flame.projects.current_project
workspace = project.current_workspace
MyLibrary = “MyLibrary”
MyReel = “MyReel”

#Create the destination
import_reel_dest = workspace.create_library(MyLibrary).create_reel(MyReel)

#Define the content to import
MyClip = “/usr/tmp/test.[1001-1100].exr”

flame.import_clips([MyClip], import_reel_dest)

4 Likes