Skip to content

Commit

Permalink
EMSUSD-40 prevent editing instance proxy.
Browse files Browse the repository at this point in the history
USD will refuse anyway, so better to prevent showing the option to the user.
  • Loading branch information
pierrebai-adsk committed Jun 29, 2023
1 parent 36ebf4e commit 7b3e493
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/mayaUsd/fileio/primUpdaterManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,11 @@ bool PrimUpdaterManager::editAsMaya(const Ufe::Path& path, const VtDictionary& u
return false;
}

if (pulledPrim.IsInstanceProxy()) {
TF_WARN("Cannot edit a USD instance proxy.");
return false;
}

MayaUsd::ProgressBarScope progressBar(7, "Converting to Maya Data");

PushPullScope scopeIt(_inPushPull);
Expand Down Expand Up @@ -1211,6 +1216,11 @@ bool PrimUpdaterManager::canEditAsMaya(const Ufe::Path& path) const
return false;
}

// USD refuses that we modify point instance proxies, so detect that.
if (prim.IsInstanceProxy()) {
return false;
}

VtDictionary userArgs;
UsdMayaPrimUpdaterContext context(UsdTimeCode::Default(), prim.GetStage(), userArgs);

Expand Down

0 comments on commit 7b3e493

Please sign in to comment.