LayerManager: avoid side effects on exports that do not include proxyShapes.#4553
Open
jufrantz wants to merge 1 commit intoAutodesk:devfrom
Open
LayerManager: avoid side effects on exports that do not include proxyShapes.#4553jufrantz wants to merge 1 commit intoAutodesk:devfrom
jufrantz wants to merge 1 commit intoAutodesk:devfrom
Conversation
… shapes Before this change, prepareForExportCheck() always called prepareForWriteCheck(), regardless of the export mode. This caused export operations such as Export Edits to still run the LayerManager write path. That could raise unnecessary save dialogs and unnecessarily serialize anonymous session layers, so a later proxyShape recompute could recreate them as different anonymous layers with different identifiers and trigger stage recomposition.
jufrantz
commented
Mar 26, 2026
| bool checkSelection = isExport && (MFileIO::kExportTypeSelected == MFileIO::exportType()); | ||
| bool checkSelection = isExport | ||
| && ((MFileIO::kExportTypeSelected == MFileIO::exportType()) | ||
| || (MFileIO::kExportTypeAsReference == MFileIO::exportType())); |
Contributor
Author
There was a problem hiding this comment.
kExportTypeAsReference is based on the current maya selection
pierrebai-adsk
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Before this change, prepareForExportCheck() always called prepareForWriteCheck(), regardless of the export mode.
As a result, export operations such as exporting reference edits to editMA files still ran the LayerManager write path even though no LayerManager data needed to be persisted. This could raise unnecessary maya-usd save dialogs and trigger unnecessary session layer serialization, which could later lead to avoidable stage recomposition when a proxyShape is recomputed.