getavalon / core

The safe post-production pipeline - https://getavalon.github.io/2.0
MIT License
213 stars 48 forks source link

Optionally initialize Session['AVALON_HIERARCHY'] #525

Closed jasperges closed 4 years ago

jasperges commented 4 years ago

In this PR the concept of an extra hierarchy for assets was introduced. You can reference this in your file templates with {hierarchy}. The value is computed when you set the context to a different asset. However if you start your DCC (only relying on Avalon env variables) and you don't switch to another asset, Session['AVALON_HIERARCHY'] doesn't exist. That gives an error when you open the workfiles app and try to save your work (at least in the new combined context/workfiles app.

What's changed? If the environment variable 'AVALON_HIERARCHY' is present Session['AVALON_HIERARCHY'] will be initialized on start up. That way there is no error when saving your work file without switching context to another asset first.