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

EMSUSD-603 - Errors when trying to cache a rig with merge transforms ON and namespaces OFF #3474

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

samuelliu-adsk
Copy link
Collaborator

@samuelliu-adsk samuelliu-adsk commented Nov 20, 2023

  • The issue is caused by transforms merged to parent node, which will cause a mismatch between SDF and DAG paths and ultimately cause clashes. We should only write to the node's parent node when it a shape node.
  • Removed the channel1 part of the unity test because that attribute is created because of the bug above. I compared the cache to usd result to a normal export and the files matches (there's no channel1 in normal export usd files)

@@ -471,8 +471,6 @@ def testEditAndMergeRigMayaRef(self):
value = xformOp.Get()
self.assertIn("xformOp:translate", value)
self.assertIn("xformOp:rotateXYZ", value)
self.assertIn("xformOp:translate:channel1", value)
self.assertIn("xformOp:rotateXYZ:channel1", value)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed these two lines because those are not valid any more, but I don't know if there's any other ways to test it...

@@ -195,7 +195,8 @@ SdfPath UsdMayaWriteJobContext::ConvertDagToUsdPath(const MDagPath& dagPath) con
// write to the parent (transform) path instead.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As the comment stated, we should only write to parent if the current node is a shape node

@@ -690,6 +690,8 @@ void AddMayaExtents(
MAYAUSD_CORE_PUBLIC
SdrShaderNodePtrVec GetSurfaceShaderNodeDefs();

bool isShape(const MDagPath& dagPath);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we shoudl export it by adding MAYAUSD_CORE_PUBLIC, like the other functions.

Copy link
Collaborator

@pierrebai-adsk pierrebai-adsk left a comment

Choose a reason for hiding this comment

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

Only need that export and it will be all good

@samuelliu-adsk samuelliu-adsk added import-export Related to Import and/or Export ready-for-merge Development process is finished, PR is ready for merge labels Nov 22, 2023
@samuelliu-adsk samuelliu-adsk merged commit 0db534b into dev Nov 22, 2023
11 checks passed
@samuelliu-adsk samuelliu-adsk deleted the samuelliu-adsk/EMSUSD-603/cache_to_usd branch November 22, 2023 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
import-export Related to Import and/or Export ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants