Skip to content
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

Conversation

alicedegirolamo
Copy link
Collaborator

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 test testRemoveCompoundAttribute.

Copy link
Collaborator

@JGamache-autodesk JGamache-autodesk left a 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.

@alicedegirolamo
Copy link
Collaborator Author

You will most probably have to run clang-format on this one. I can see lines 491-493 are not to spec.

I re-run the clang-format but it seems correct to the clang-format.

@@ -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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PXR_NS::SdfPath

@@ -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')
Copy link
Collaborator

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"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I update it.

@seando-adsk seando-adsk added the ufe-usd Related to UFE-USD plugin in Maya-Usd label Jan 11, 2023
@alicedegirolamo alicedegirolamo added the ready-for-merge Development process is finished, PR is ready for merge label Jan 11, 2023
@seando-adsk seando-adsk merged commit b80b4e7 into dev Jan 11, 2023
@seando-adsk seando-adsk deleted the degiroa/MAYA-126871/delete-compound-attributes-remove-connections branch January 11, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge ufe-usd Related to UFE-USD plugin in Maya-Usd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants