-
Notifications
You must be signed in to change notification settings - Fork 203
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-107087: Don't allow parenting to a Gprim. #852
MAYA-107087: Don't allow parenting to a Gprim. #852
Conversation
childPrim.GetName().GetString().c_str(), | ||
parentPrim.GetName().GetString().c_str()); | ||
throw std::runtime_error(err.c_str()); | ||
} |
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.
We throw an error if one tries to parent a Gprim under another.
with self.assertRaises(RuntimeError): | ||
cmds.parent("|Tree_usd|Tree_usdShape,/TreeBase/trunk", | ||
"|Tree_usd|Tree_usdShape,/TreeBase/leavesXform/leaves") | ||
|
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.
Added a unit test to back the Gprim parenting restriction.
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.
@ppt-adsk To make testParentRelative, testParentAbsolute working under the new rule, I created a top level Xforms for cube, cylinder, sphere in "simpleSceneTRS.usda" and made sure the Translate/Rotate/Scale and Order Ops matches the underlying meshes. Github won't show the diff results. You need to use your diff-editor locally to see the changes.
usdPaths.append(ufe.Path( | ||
[shapeSegment, usdUtils.createUfePathSegment(n)])) | ||
mayaPaths = [] | ||
for n in ["|world|" + o for o in names]: | ||
for n in ["|world|" + o for o in mayaNames]: | ||
mayaPaths.append(ufe.Path(mayaUtils.createUfePathSegment(n))) |
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.
@ppt-adsk Adopt to the recent changes in simpleSceneTRS: Separated "maya" and "ufe" names list.
We need to block the parenting of one gprim to another. Pixar lists this behavior as "strongly discouraged", but we are also seeing evidence that this behavior is not even fully supported through hydra.
#708 (comment)