-
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
Fix lost connection for output port with parent #2729
Conversation
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.
Very good. Can you add a unit test that checks this bug stays fixed?
Sure! I'm going to do that. |
Ok, I pushed and tested the new test. I had to add a new simple compound to the .usd since I didn't find in the sample folder a compound suitable for my test case. |
Preflight was successful (after a review of the logs). The two failure to upload artifacts happened after the tests succeeded. |
lib/mayaUsd/ufe/UsdAttributes.cpp
Outdated
} | ||
} | ||
|
||
static void setConnectionsWithChildren( |
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.
I find the name ambiguous. It could be:
setConnectionsOfAllChildren()
updateChildrenConnections()
+1
@@ -504,28 +504,37 @@ bool UsdAttributes::canRenameAttribute( | |||
|
|||
static void setConnections( | |||
const PXR_NS::UsdPrim& prim, | |||
const SdfPath& OldPropertyPath, | |||
const SdfPath& oldPropertyPath, |
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 method does not set the connection it only updates existing connections:
updateConnections()
|
||
self.assertEqual(ufe.PathString.string(dstAttr.path), | ||
'|stage|stageShape,/pCube2/Looks/standardSurface2SG') | ||
self.assertEqual(dstAttr.name, 'outputs:out') |
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.
Could you enhance the test with cmds.undo()
?
I think that there are two main pending points:
But I will @JGamache-autodesk and Orn have the last call on that. |
|
Yes, I have to add the undo/redo test but I'm having problems compiling the updated Maya. As soon as I fixed my build I'm going to add it. Sorry for the wait. Edit: I added the undo/redo test. |
Simple fix.
When renaming output ports on the compound, connections with the parent are lost.
This was caused by the fact that the update of connections with the new path was done on the children of the parent and not also on the parent itself.