This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
Maya: reference loaders could store placeholder in referenced url #3264
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brief description
All reference loaders in Maya now could instead of real published folder use environment variable placholder. This would allow to use this workfile in different locations (remote artist computer, studio etc.)
Description
OPENPYPE_PROJECT_ROOT_WORK
is calculated for values in Anatomy or overridden values from Local Setting.This placeholder is physically stored in workfile, each value is resolved when workfile is opened.
This allows remote artists to reference assets in a workfile and publish it. Same workfile will then work everywhere (studio, different artist) if they have Anatomy or Local Setting configured to existing folder on their machine.
This limits opening workfiles without Openpype, this could be remedied by adding used environment variable to artist environment. (By adding to theirs mel script??)
Additional info
Flag to trigger this behavior is hardcoded to True for testing. Placement of this toggle in Settings need to be decided.
Easiest option is to add it as a plugin variable, this would mean add/modify this behavior on each plugin separately. Usage of
environment variable could be also widened to not only Maya. It could be used in any host which stores full path of referenced files in its workfile metadata. In that case, more general location to enable/disable this behavior should be chosen.
Testing notes: