Maya: Reset frame range, colorspace, resolution on asset/task change with an informational dialog?

The Maya integration automatically resets frame range, resolution, colorspace, fps on asset/task context change (on taskChanged event), which basically means whenever you save your scene to another asset or task it resets your workfile based on the asset document for:

  • Frame range (timeline)
  • FPS is reset for the new asset
  • Colorspace settings,
  • Render resolution,
  • Publish instance’s asset attribute is set to the new asset

Note: The logic ALWAYS runs when opening a workfile (using workfiles tool) from another asset/task or saving a scene to another asset/task. It runs just before the open/save so when opening a scene it does some stuff that basically gets undone by the workfile to be opened, making it pretty much useless for that. However, when saving to another asset it resets all the above data in the scene.

Artists are getting super confused that resaving their scene changes e.g. resolution or the frame range, etc. I was hoping instead to put it behind a dialog of sorts, like a popup to tell them “hey you’re saving to another asset or task, would you like me to reset X or Y?” so they are aware of what’s going on and actually have a decision there. What do you think? Convenient?


But it’s not easy there to detect whether it’s about to save or not since the logic runs before saving and the host isn’t necessarily saving yet. I was thinking of maybe putting tracking the state (e.g. setting a ABOUT_TO_SAVE=True in the statement and a ABOUT_TO_SAVE=False in so that in the task change callback I could do the logic only if ABOUT_TO_SAVE is True and if that’s the case I can show the user the pop-up about updating their scene’s state with maybe checkboxes on what it’s resetting and things they can toggle on/off. However, if the actual saving would error then would never get triggered? Better ideas?

Yeah, think this is a good improvement. Being explicit to the user about what the pipeline does is better than implicit.

I ended up with this pop-up for now which only triggers when saving to a different asset or task:


Bit of a dirty prototype, but can roll it out like this next week here to see what the team says.