-
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-126871 Delete compound attributes does not remove their connections. #2800
Maya-126871 Delete compound attributes does not remove their connections. #2800
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.
You will most probably have to run clang-format on this one. I can see lines 491-493 are not to spec.
…s-remove-connections
I re-run the clang-format but it seems correct to the clang-format. |
lib/mayaUsd/ufe/UsdAttributes.cpp
Outdated
@@ -455,6 +455,24 @@ bool UsdAttributes::canRemoveAttribute(const UsdSceneItem::Ptr& item, const std: | |||
} | |||
return false; | |||
} | |||
static void removeConnections(const PXR_NS::UsdPrim& prim, const SdfPath& srcPropertyPath) |
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.
PXR_NS::SdfPath
test/lib/ufe/testAttributes.py
Outdated
@@ -183,6 +183,64 @@ def testAddRemoveAttribute(self): | |||
with self.assertRaisesRegex(KeyError, "Attribute 'MyAttribute' does not exist") as cm: | |||
attr = ball35Attrs.attribute("MyAttribute") | |||
|
|||
@unittest.skipIf(os.getenv('UFE_PREVIEW_VERSION_NUM', '0000') < '4024', 'Test for UFE preview version 0.4.24 and later') |
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.
Should really say something about why the test needs 0.4.24. Such as "Test requires xxx feature only available on Ufe 0.4.24 and later"
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 update it.
Description
With this PR, when deleting a compound attribute, the associated connections are also deleted.
Fixes issue 126871.
How Has This Been Tested?
I updated the existing
testAttributes.py
adding the testtestRemoveCompoundAttribute
.