-
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-107591: Subtree invalidation support on StageProxy ( a.k.a pseudo-root ). #864
MAYA-107591: Subtree invalidation support on StageProxy ( a.k.a pseudo-root ). #864
Conversation
…the children are the descendant of StageProxy ( a.k.a pseudo-root ).
@@ -194,16 +194,27 @@ void StagesSubject::stageChanged(UsdNotice::ObjectsChanged const& notice, UsdSta | |||
// don't care about it. In those cases, the changePath will contain something like: | |||
// "/<prim>.visibility" | |||
// "/<prim>.xformOp:translate" | |||
if (!changedPath.IsPrimPath()) | |||
if (changedPath.IsPropertyPath()) | |||
continue; |
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.
IsPrimPath()
checks if a path identifies a prim but what we wanted here is to check if path identifies a property.
calling isPrimPath() on "/" would return false and therefore subtree invalidation never occurs.
ufePath = stagePath(sender) + Ufe::PathSegment(usdPrimPathStr, g_USDRtid, '/'); | ||
prim = stage->GetPrimAtPath(changedPath); | ||
} | ||
|
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.
Add conditional check to set ufePath
and prim
in the case where the changedPath is a pseduo-root.
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.
Looks good, thanks.
lib/mayaUsd/ufe/StagesSubject.cpp
Outdated
auto prim = stage->GetPrimAtPath(changedPath); | ||
Ufe::Path ufePath; | ||
UsdPrim prim; | ||
if (changedPath.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.
How about we replace this with
changedPath == SdfPath::AbsoluteRootPath()
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.
There's also this:
if (changedPath.IsAbsoluteRootPath()) {
...
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.
Ahhh... that's what I was looking for. :) Addressed in d109480
One bad news - IsAbsoluteRootPath is not available with 19.11. We are getting the following compilation error
|
But looks like SdfPath::AbsoluteRootPath() is available - https://github.com/PixarAnimationStudios/USD/blob/4b1162957b2ad219e1635c81de8343be490e41fc/pxr/usd/lib/sdf/path.h#L295 |
…ching to SdfPath::AbsoluteRootPath() instead.
This PR fixes the cases where subtree invalidation doesn't occur in the outliner where all the children are the descendant of stage proxy shape ( a.k.a pseudo-root).
This issue became obvious during the current ongoing work on reordering support where outliner stopped to refresh.