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

MAYA-108691 - USD: undoing transform will not update manipulator #1266

Merged
merged 3 commits into from
Mar 23, 2021

Conversation

seando-adsk
Copy link
Collaborator

MAYA-108691 - USD: undoing transform will not update manipulator

  • Send UFE Transform3d and AttributeValueChanged in response to USD "prim property path" notif.
  • Added new test to verify these notifs.

* Send UFE Transform3d and AttributeValueChanged in response
  to USD "prim property path" notif.
* Added new test to verify these notifs.
@seando-adsk seando-adsk requested a review from ppt-adsk March 19, 2021 13:21
Comment on lines 214 to 226
if (nameToken == UsdGeomTokens->xformOpOrder || UsdGeomXformOp::IsXformOp(nameToken)) {
auto usdPrimPathStr = changedPath.GetPrimPath().GetString();
auto ufePath = stagePath(sender) + Ufe::PathSegment(usdPrimPathStr, g_USDRtid, '/');
if (!InTransform3dChange::inTransform3dChange()) {
Ufe::Transform3d::notify(ufePath);
}
#ifdef UFE_V2_FEATURES_AVAILABLE
if (!inAttributeChangedNotificationGuard()) {
Ufe::AttributeValueChanged vc(ufePath, changedPath.GetName());
Ufe::Attributes::notify(vc);
}
#endif
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As we discussed, make sure to send extra UFE notifs for USD prim property path notifs on xformop.

Comment on lines +844 to +845
@unittest.skipUnless(ufeUtils.ufeFeatureSetVersion() >= 2, 'testPrimPropertyPathNotifs only available in UFE v2 or greater.')
def testPrimPropertyPathNotifs(self):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

New test to verify that these new are received.

@seando-adsk seando-adsk added bug Something isn't working ufe-usd Related to UFE-USD plugin in Maya-Usd labels Mar 19, 2021
Copy link
Collaborator

@ppt-adsk ppt-adsk left a comment

Choose a reason for hiding this comment

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

Thanks for the test! Just that nit-pick debugging statement you can remove in StagesSubject.cpp :)

// We need to send some notifs so Maya can update (such as on undo
// to move the transform manipulator back to original position).
const TfToken nameToken = changedPath.GetNameToken();
auto blah = nameToken.GetString();
Copy link
Collaborator

Choose a reason for hiding this comment

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

That's the technical use of blah, right?

@seando-adsk seando-adsk requested a review from ppt-adsk March 19, 2021 20:54
* Only want to send extra notif on xformOpOrder attribute.
@seando-adsk seando-adsk requested a review from ppt-adsk March 23, 2021 19:39
@seando-adsk seando-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Mar 23, 2021
@kxl-adsk kxl-adsk merged commit 5c50462 into dev Mar 23, 2021
@kxl-adsk kxl-adsk deleted the donnels/MAYA-108691/prim_property_path_notifs branch March 23, 2021 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready-for-merge Development process is finished, PR is ready for merge ufe-usd Related to UFE-USD plugin in Maya-Usd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants