-
Notifications
You must be signed in to change notification settings - Fork 202
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
Conversation
* Send UFE Transform3d and AttributeValueChanged in response to USD "prim property path" notif. * Added new test to verify these notifs.
lib/mayaUsd/ufe/StagesSubject.cpp
Outdated
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 | ||
} |
There was a problem hiding this comment.
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.
@unittest.skipUnless(ufeUtils.ufeFeatureSetVersion() >= 2, 'testPrimPropertyPathNotifs only available in UFE v2 or greater.') | ||
def testPrimPropertyPathNotifs(self): |
There was a problem hiding this comment.
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.
There was a problem hiding this 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 :)
lib/mayaUsd/ufe/StagesSubject.cpp
Outdated
// 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(); |
There was a problem hiding this comment.
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?
* Only want to send extra notif on xformOpOrder attribute.
MAYA-108691 - USD: undoing transform will not update manipulator