-
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 fallback + additional op no longer crashes. #1105
Maya fallback + additional op no longer crashes. #1105
Conversation
auto opNdx = gOpNameToNdx.at(op.GetOpName()); | ||
auto found = gOpNameToNdx.find(op.GetOpName()); | ||
if (found == gOpNameToNdx.end()) { | ||
// Found an op that doesn't match a Maya fallback stack op. |
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.
The Maya fallback transform stack must be the last set of transform ops in a prim's transform stack. If there is already a Maya fallback transform stack at the tail of a prim's transform stack, any op that does not match means the Maya fallback transform stack has been "corrupted" in some way by adding or inserting an op that shouldn't be there.
If that happens, we don't create a fallback to the fallback: we detect the erroneous transform op, and return a nullptr Transform3d interface.
@@ -612,6 +612,67 @@ def testFallbackCases(self): | |||
"xformOp:rotateZ", "!invert!xformOp:translate:pivot", | |||
"xformOp:rotateXYZ:maya_fallback"))) | |||
|
|||
def testBrokenFallback(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.
Written in TDD style: test written first, failed, code fixed, test passes.
proxyShapeContextOps = ufe.ContextOps.contextOps(proxyShapeItem) | ||
proxyShapeContextOps.doOp(['Add New Prim', 'Capsule']) | ||
|
||
capsulePath = ufe.PathString.path('|stage1|stageShape1,/Capsule1') |
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.
Steps in test taken from ADSK JIRA bug description, and adapted.
"xformOp:rotateXYZ:maya_fallback", "xformOp:rotateZ"))) | ||
|
||
# Do any transform editing with Maya. | ||
cmds.rotate(0, 0, 30, r=True, os=True, fo=True) |
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.
This line will crash if we don't have a Maya with the fix to MAYA-109343, which is fairly recent. Will need to figure out how to identify this version of Maya and skip the test if necessary; this needs to work across Maya branches. Suggestions welcome.
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 Let's have a chat offline today.
Only pre-flight failure is macOS Python 2, so indeed ready for merge. |
No description provided.