Disallow saving into a loaded USD file (consider loaded file static, non-editable publish)
- Dominant language
- Wolfram Language
- Stars
- 905
- Forks
- 223
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 17
Description
**Is your feature request related to a problem? Please describe.**
The Maya USD workflow allows to edit and save into changed layers in a USD stage and performs these sort of saves with regular maya saving (which can be customized in a few options).
I'm looking into bringing the Maya USD plugin into our pipeline and was wondering how to deal with loading 'published assets'. These are output files that should be considered static and _should not be edited_ by the user. If the pipeline would allow any alterations at all to those loaded files that should actually save into a dedicated incremented version of the USD file instead of overwriting the loaded file.
**Describe the solution you'd like**
I'd like to be able to Load a USD stage (e.g. set a USD filepath in the Maya USD proxy) and make it extremely hard for the artist to save changes into the loaded file. I can understand that any willing technical artist can likely go through the USD API (or even just other file access methods) and change those files but I'm mostly looking to basically disallow any artist working with the maya tools accidentally editing and saving into published file.
I was thinking of being able to set a flag like "allow to save" and "allow to edit" which apparently USD layers have a concept of as well with [`SdfLayer.PermissionToEdit`](https://openusd.org/dev/api/class_sdf_layer.html#a794044e16b8357b4fd1cd87438ed361f) and [`SdfLayer.PermissionToSave`](https://openusd.org/dev/api/class_sdf_layer.html#a69500b2435c0482185d36bf9a3af01f4). However I'm not sure how these concepts work inside Maya USD. (Like how do I make sure those permissions are set on scene re-open or alike; or does that persist magically somehow; or is there another system in-place to disallow editing certain USD layers?)
I was wondering if there were any examples of Maya USD plugin being used this way? Or maybe I'm misinterpreting how USD should be used to begin with?
**Describe alternatives you've considered**
Not sure of other options.
To what extent would setting `shareable` to False on the proxy suffice?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing how the Maya USD proxy loads a stage and how USD's SdfLayer.PermissionToEdit and PermissionToSave behave across scene reopen. Compare that behavior with setting shareable to False, then identify the existing save and edit paths that would need protection. Done means published layers cannot be accidentally edited or overwritten through Maya tools, with coverage for reopening the scene.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100