Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally initialize Session['AVALON_HIERARCHY'] #525

Merged
merged 3 commits into from
Feb 9, 2020

Conversation

jasperges
Copy link
Contributor

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.

If the environment variable 'AVALON_HIERARCHY' is present
Session['AVALON_HIERARCHY'] will be initialized with that value.
avalon/io.py Outdated Show resolved Hide resolved
@davidlatwe davidlatwe merged commit 25cb3dd into getavalon:master Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants