Using tasks without Steps - DCC Integration

Hi,
I noticed it is possible to create a Task Template where tasks are not linked to any step, by chosing “None” as a step for a specific task.

I was really interested, as steps are pretty unnecessary in my pipeline configuration and tend to slow down artists when using “Shotgun File Open/Save” in DCC Integration (basically, using Steps add more clics to chose which tasks needs to be saved).

But it seems Shotgun File Open/Save is not able to retrieve an asset task if there are no steps:

(in this exemple, asset testSgtkCharacter has a template with steps while testNoStep tasks are all set to step “None” in their template).

Of course, I checked my template.yml and schema never use any Step key but only task_name keys.

Is there any way to make this work?

If not, is there any way to make “Shotgun File Open/Save”:

  • Only show Tasks without putting them under a Step, like when showing “all tasks” on the asset page of the website?

  • Use step order as defined on the website rather than alphabetical order on steps?
    taskNoStep_sortOrder

  • If none of those are possible, I tried with all tasks under a single Step which might be the simplest solution. Alas, tasks are still sorted with alphabetical order rather than Sort Order.
    is it possible to use sort order on tasks in DCC Integration? It would be a huge improvement for artists.

Thanks!

1 Like

Hi Ben! I think I know what’s going on here. Usually when we see that No templates have been defined warning, it means that no work file templates have been defined for tk-mutli-workfiles2 in the current context. In the Default Config, we don’t define templates for the Shot and Asset context, only Shot step and Asset step, as tasks are, as you’re aware, linked to steps by default.

So, if you’re getting rid of steps (which should be fine) from your pipeline, you’ll want to make sure in your pipeline configuration that you have templates defined (template_work, template_publish, etc.) in the instance of tk-multi-workfiles that is included into config/env/shot.yml and config/env/asset.yml for the relevant engine(s).

Some useful docs:

And as a side note, you may want, for cleanliness, to remove asset_step and shot_step from your config if you’re not using them.

Hope that helps! Report back if you hit any snags as you go along.

3 Likes

I thought I’d chime in here as well.

As an alternative as you still want tasks but not steps, what you could do is:

  1. Modify your workfiles settings to remove the step part from the hierarchy. You can actually just comment out that line entirely. That should mean that the workfiles app should now show your tasks with no steps.
  2. Modify the pick_environment.py hook so that it doesn’t check for step and instead checks for the existence of a task. You then either return back asset_step or rename it to something else like asset_task. If you rename it then you need to modify the name of the environment file to match.
  3. Then update all your schema and templates to remove references to the step.

Best
Phil

5 Likes

Hi [philip.scadding] and [tannaz],
Thanks for your answer.

It works!

I’m not sure about this part though:

As I was not sure how to modify this file, I tested the config after only commenting outthe hierarchy lines in tk-multi-workfiles2.yml. It sems to works well, is that step important?

This helped me understand better how hooks and keys are used in Shotgun.

Following the same idea, as it is currently impossible to have several keys with the same definition in templates.yml to save files unregarding their DCC (for exemple using the same folder for shot_work_area_photoshop and shot_work_area_maya , it should be possible to change all keys used in tk-maya.yml etc so that every DCC work area are the same.
Is that correct?

2 Likes

Hmm, when I was thinking this through in my head, I assumed you would need to, but maybe I’m wrong.
The pick_environment.py core hook is what Toolkit uses to work out given a context which environment file to use. By default, if you are working on a Task, it uses either the asset_step.yml or shot_step.yml environment files to gather the settings. Since your tasks don’t have a Step, I assumed that this line would evaluate true, and cause you to be working in an asset or shot environment instead. These environments are not set up to work with saving files by default, so I figured the easiest thing to do would be to just modify the hook so that it continued to use the asset_step and shot_step environments when there was a task but no step present.
Though if it’s all working then I perhaps this step was unnecessary.

Yes, you could have a generic work area for all your software. As you say you can’t have more than one template definition with the same path, but you could just have a generic shot_work_area template and then set the apps to use that.