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-490 Fixes outerliner not refreshing when performing a UsdUndoVisibleCommand #3345

Merged
Changes from 2 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
9 changes: 8 additions & 1 deletion lib/usdUfe/ufe/StagesSubject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ void StagesSubject::stageChanged(
const auto& changedPath = *it;
if (changedPath.IsPrimPropertyPath()) {
// Special case to detect when an xformop is added or removed from a prim.
// We need to send some notifs so DCC can update (such as on undo
// We need to send some notifications so DCC can update (such as on undo
// to move the transform manipulator back to original position).
const TfToken nameToken = changedPath.GetNameToken();
auto usdPrimPathStr = changedPath.GetPrimPath().GetString();
Expand All @@ -395,7 +395,14 @@ void StagesSubject::stageChanged(
notifyWithoutExceptions<Ufe::Transform3d>(ufePath);
}
}
// Special case when Undoing a visibility change, the notice.GetChangedInfoOnlyPaths()
// does not contain the change, hence handling visibility notification in re-synch path.
if (changedPath.GetNameToken() == UsdGeomTokens->visibility) {
Ufe::VisibilityChanged vis(ufePath);
notifyWithoutExceptions<Ufe::Object3d>(vis);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure the order matters, but I wonder if sending this extra visibilityChanged should come after the processAttributeChanges() just below. This would then match the order in the ChangedInfoOnlyPaths() loop.

Copy link
Collaborator Author

@AramAzhari-adsk AramAzhari-adsk Sep 26, 2023

Choose a reason for hiding this comment

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

@seando-adsk I actually had to move it as per this finding since having it in at line 398 caused duplicate notifications to be sent which failed the visibility test.

processAttributeChanges(ufePath, changedPath, it.base()->second);

// No further processing for this prim property path is required.
continue;
}
Expand Down
Loading