Get clip name from pre_custom_export

Does anyone know if it’s possible to get the name of the clip/sequence when using the pre_custom_export hook? I have a dropdown menu where I’d like to select one of the values based on the clip name automatically.

From what I can tell doesn’t appear possible but I thought I’d ask.


The hook itself only has “destinationPath” inside the info dict, but that may not necessarily correlate with the original clip name (depending on your export preset). Two possible workarounds:

  1. (feels complicated) Use the “presetPath” from the info dict and use it to resolve the original name.
  2. (easier) Use the userData dict to pass the clip name to the export hooks.

Maybe you don’t need to act in this stage at all and can use the pre_export_sequence hook, which has the “sequenceName” parameter?

Thanks Claus, good ideas. I’m trying to get the NIM exporter UI to default to certain values in the drop-down list and where it’s being called won’t allow for either approach to work sadly.

Oh nice to know. That’s something on my todo list, too, but I didn’t have time to take a look at the implementation, yet.

I‘ll let you know if I find a solution.
Just to make sure: you‘re talking about a NIM daily export or NIM Publish?

Both. I’m trying to select the correct show from the drop-down. I have the project working just fine.

After thinking it over I think one could dynamically create the export profiles and do what you said and add a userData field but that could clutter the UI quite a bit as you’d have one option for show…

There is a hook for pre_export_asset that might be what you need. It gives you the full path and filename of the export.

def pre_export_asset(info, userData, *args, **kwargs):
userData[‘export_file’] = info[‘resolvedPath’]

Unfortunately I need to get the clip/sequence name before any of those other hooks are called. The way NIM’s exporters have been built are using custom export profiles which then immediately call it’s own GUI before any more hooks are called.

My objective is to select the correct show/film name from the drop-down but that would only be possible if I knew what the clip name is due to our naming conventions. I’m trying to make life easy for everyone and minimize the chance forany mistakes.

Unless Andrew changes how these are called I think I’m out of luck unless I were to dynamically build the export profiles for each show/film and attach a userData value to each one with the show/film name. That would clutter the UI though…so it’s not a great solution.

Hmm…we’re not able to nest export profiles, correct? Similar to how one can now create sub-menus for other hooks…

In case anyone runs into the same issue, I believe I’ve found a bug concerning custom export profiles.

Whilst Flame will allow you to define up to 6 custom export profiles (also a new discovery) it will only successfully work on the first 5. The 6th option will simply open the export dialog.

I was banging my head trying to figure out why one of the NIM profiles wasn’t working anymore. If I swapped the order then it would. We have 3 internal profiles in addition to NIMs hence how I found out.

I’ve reported it to support.