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

LayerManager: Prevent unintended overwriting of unmodified USD layers at Maya save. #4027

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/mayaUsd/nodes/layerManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,8 @@ BatchSaveResult LayerDatabase::saveUsdToUsdFiles()
const auto& allLayers = info.stage->GetUsedLayers(true);
for (auto layer : allLayers) {
if (TF_VERIFY(layer)) {
if (layer != sessionLayer && layer->PermissionToSave()) {
if (layer != sessionLayer && layer->PermissionToSave()
&& layer->IsDirty()) {
if (!MayaUsd::utils::saveLayerWithFormat(layer)) {
MString errMsg;
MString layerName(layer->GetDisplayName().c_str());
Expand Down
Loading