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

EMSUSD-796 Send subtree invalidate on undo mark instanceable. #3484

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
24 changes: 11 additions & 13 deletions lib/usdUfe/ufe/StagesSubject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,19 +467,17 @@ void StagesSubject::stageChanged(
sentNotif = true;
break;
}
// Note : Do nothing here with didRemoveInertPrim and didRemoveNonInertPrim.
// Indeed, we can get these if prim specs are removed from some layers, but it
// does not mean that the prim is no longer in the composed stage. If the prim
// was actually gone, we would either get an invalid prim (in which case we
// would not even get here, and would send a object destroyed" notif in the else
// below), or we would fall into the "HasInfoChange : Active" case below. If
// nothing else sends a notif in the loop (typically via the info change :
// active) we do not want to send the fallback notif, so act as if a notif was
// sent.
else if (
entry->flags.didRemoveInertPrim || entry->flags.didRemoveNonInertPrim) {
sentNotif = true;
}
// Note : Do not send ObjectDelete notifs when didRemoveInertPrim or
// didRemoveNonInertPrim are set. Indeed, we can get these if prim
// specs are removed from some layers, but it does not mean that the prim is no
// longer in the composed stage. If the prim was actually gone, we would either
// get an invalid prim (in which case we would not even get here, and would send
// a object destroyed" notif in the else below), or we would fall into the
// "HasInfoChange : Active" case below. However, let the fallback
// SubtreeInvalidate notif be sent, as it is sometimes required (for example
// when unmarking a prim as instanceable - we get entries with the inert prim
// removed, as its instanced version is removed, but it is still there as a
// regular prim and needs to be invalidated.

// Special case for "active" metadata.
if (entry->HasInfoChange(SdfFieldKeys->Active)) {
Expand Down