Skip to content

LayerManager: avoid side effects on exports that do not include proxyShapes.#4553

Open
jufrantz wants to merge 1 commit intoAutodesk:devfrom
jufrantz:avoid_layermanager_side_effects_on_export_edits
Open

LayerManager: avoid side effects on exports that do not include proxyShapes.#4553
jufrantz wants to merge 1 commit intoAutodesk:devfrom
jufrantz:avoid_layermanager_side_effects_on_export_edits

Conversation

@jufrantz
Copy link
Copy Markdown
Contributor

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.

… 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.
bool checkSelection = isExport && (MFileIO::kExportTypeSelected == MFileIO::exportType());
bool checkSelection = isExport
&& ((MFileIO::kExportTypeSelected == MFileIO::exportType())
|| (MFileIO::kExportTypeAsReference == MFileIO::exportType()));
Copy link
Copy Markdown
Contributor Author

@jufrantz jufrantz Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kExportTypeAsReference is based on the current maya selection

@seando-adsk seando-adsk added the workflows Related to in-context workflows label Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

workflows Related to in-context workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants