How to change context

Hello there!

When I’m in an asset context and I create a new scene with maya (not with multi-workfiles), the context stays at the previous asset’s context.

Is there a way, to reset the context to the default, project context?

Thanks!

The engine in most DCCs will add an event handler for saving that checks the filepath of your file and tries to change context based on that.

Did you save your file into the same Asset/structure or into the project itself?

No, I did not save it.

I do the following:

  1. I open maya. It starts with project context.
  2. I open an asset. The context changes to represent the asset.
  3. I create a new file with maya, but the shotgrid context stays on the previous asset.

I’d like to change back to the project context in the 3rd step.

Save your file, then the engine will try and change the context based on the path.

If I want to save with shotgrid, it’ll offer me to save another version of the previously opened asset. Which I’d like to avoid by resetting the context on new scene creation.

Sorry but I dont think I understand what you are trrying to do here.

Can you explain why that isn’t preffered?

I want out artists to be able to save a different asset, even if they accidentally created a new scene with Maya instead of Shotgrid with the previous asset’s context.
So if in the background I can adjust the context, all will be fine.

But shouldnt the artist select the task that they should be saving against?

They should, though they might forget. So I’m trying to foolproof this.

I guess technically you could take over the hook that handles the actual saving actions and modify it to change context back to teh project afterwards.