Overwrite default pattern for batch name

Hey all,

Does anyone know if it’s possible to change the naming pattern for a batchgroup? We have a standard name setup [batch name] __comp__v[iteration###] but I’m working on some scripts that use Python to create the base batchgroup but based per task (i.e. comp, clean-up, matte).

I’ve managed to get everything working just fine with the proper names and all but now our default naming is getting in the way. So for cleanup and mattes I get: 0010__cleanup__comp__v001 which makes sense. I’d rather not change the default naming for various reasons so is there anyway to overwrite this?

Cheers!

Hey Kyle,

there is a hook for setting up the default name:


def batch_default_iteration_name(project, *args, **kwargs):
    return "<batch name>_comp_v<iteration###>"

But I think you can’t change that dynamically. It only runs on startup to overwrite the preferences.

How do you create the batch files so they get this naming? I would assume you could change their name to your needs after the creation… :thinking:

Cheers,
Claus

Hey Claus,

Yeah, that’s what I use to define the default name currently. This new method names the batch based on clip name + task unless it’s a comp since that’s usually what things are. I suppose I’m making it difficult on myself trying to keep the default name but overwrite only in certain senarios.

I’ll try seeing if I can adjust the default iteration name dynamically…might work…

Thanks!

Yeah, no luck @claussteinmassl . You’re right that it seems to only be called when the project is loaded.

I did a quick test. After you created the batch group, you can access the current iteration and change it’s name:

import flame
batch_group = flame.batch.create_batch_group(name="foo")
cur_iteration = batch_group.current_iteration
cur_iteration.name = "<batch name>_bar_v<iteration###>"

Maybe we can also call the hook to find out which pattern has been defined, so the above code respects that naming pattern and only changes “comp” to something else… :thinking:

Oh man, nice one! I didn’t realize you could change the iteration name like that. That worked perfectly, thank you so much.

For our current use I wouldn’t need to check the pattern since anything but a comp is an exception so I can simply add this little nugget of goodness into that case.

Finally I can have our Flame comp names match Nuke. Yay for a clean workflow and uniformity!

Many thanks again!

You’re welcome! :slight_smile: