Tk-multi-workfiles - 'saveas_default_name' setting

Hi there,

Sorry if this sounds as a stupid question but i’m trying to use the ‘saveas_default_name’ setting inside of ‘tk-multi-workfiles2.yml’ so that Maya automatically fills the ‘name’ field with the asset name when trying to save for the first time.
When i add that setting, the Maya reference box shows that the setting is no longer by default and displays the string i used.
But the problem is that the ‘name’ field is always automatically populated with the string ‘scene’.
What am I doing wrong here? What do I need to do to get the asset name by default when trying to save?

Thanks a lot in advance!
Francois

2 Likes

Hey @Debatty_Francois! A quick heads up I’ve moved this to the #pipeline category to get the right :eyes: on it.

2 Likes

Hi François –

I just tested this, and it worked for me. If I set a value for saveas_default_name, that’s what I get in the name field when I do a Shotgun-> File Save in Maya. There are a couple things to point out here:

  • I suspect that you set this value in the wrong environment – when you’re saving a file, for example, to a task an a pipeline step on an Asset, you’re in the asset_step environment. So, you’ll want to make sure you’re updating the correct settings – those that config/env/asset_step.yml includes.

In the Default Config, this would be the settings.tk-multi-workfiles2.asset_step block of config/env/includes/settings/tk-multi-workfiles2.yml (as seen below), but if your pipeline configuration is set up differently, this may vary.

  • Having said that, I don’t believe you can set saveas_default_name to a dynamic value – you can only use it with a static string.
  • What you might want to do is modify your templates in config/core/templates.yml so that instead of {name}, you’re using {Asset}. Note that if you don’t have a {name} field in your template, the text field in the File Save dialog will go away, and the file path will be fully automatically generated, with no input from the user.

Some relevant docs:

5 Likes

Hi Tannaz,

Thank you so much for the quick answer!

You’re right, I was setting the value in the wrong environment.
And modifying config/core/templates.yml gives me exactly what i was looking for!

Thank you again for your help and for the useful links.

Francois

3 Likes

I just thought I’d share this link, as Barbara provided a suggestion that allowed her to dynamically set the default save name:
https://groups.google.com/a/shotgunsoftware.com/forum/#!searchin/shotgun-dev/workfiles$20name|sort:date/shotgun-dev/RcbThuYFQuk/OmqQVZNJBAAJ

4 Likes

Hi Philip,

This solution looks pretty neat! I’ll give it a try :wink:

Thanks,
Francois

2 Likes