Skip to content

Commit

Permalink
Merge pull request #3484 from Autodesk/deboisj/EMSUSD-796_reenable_su…
Browse files Browse the repository at this point in the history
…btree_fallback_on_notif

EMSUSD-796 Send subtree invalidate on undo mark instanceable.
  • Loading branch information
seando-adsk authored Nov 29, 2023
2 parents bf3b63e + 263f1c1 commit 971d750
Showing 1 changed file with 11 additions and 13 deletions.
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

0 comments on commit 971d750

Please sign in to comment.