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

Append Flag/Prim Path Flag does not take into account transforms leading to the specified prim path #3847

Open
vcandelam opened this issue Jul 12, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@vcandelam
Copy link

Describe the bug
When using both the -append flag to a specified -rootPrim with -rootPrimType = xform, the output doesn't take into account the accumulated xform stack leading to the prim, so the transform of the objects being exported are written in world space instead of relative space

Steps to reproduce

  • Create a null group and transform it somewhere in the scene
  • Export as usd
  • Create and empty layer and either sublayer the previous file or create a reference to it.
  • Create either a transform or a mesh in the scene and transform it into a different position.
  • With the cmds.mayaUSDExport command, use the flags append and point the rootPrim to the null group of the previous layer, and export the recently created.
  • View the result, the cube should be under the null prim but with the transform stacked instead of the same position.

Expected behavior
To the export command to take into account the transform stack leading to the prim and relativize the matrix that is about to be written

Attachments
image
transforms_append_bug.zip

Specs (if applicable):

  • Windows 10
  • Maya version [e.g. Maya 2024.2]
  • Maya USD commit SHA [release 0.28 and release 0.27]
@vcandelam vcandelam added the bug Something isn't working label Jul 12, 2024
@santosd
Copy link
Collaborator

santosd commented Jul 15, 2024

Hi @vcandelam, testing this out on my end and running into some issue's. Could you provide me with the command you are running, just want to make sure I am doing the same on my end.
Thank you!

@vcandelam
Copy link
Author

Hi @santosd! Here's the code I used:
import os layer = "C:/Users/vcandela/Desktop/report_autodesk/report_july7th2024/sublayered_root.usda" mel.eval(f'chdir "{os.path.dirname(layer)}";') cmds.mayaUSDExport(file=layer, append=True, ert=['pCube1'], rootPrim='/root', rootPrimType='xform')

I've also noted that subsequent calls to the command with append keeps stacking more and more transforms to the pCube1 xfromOpOrder and creating different channels for each translate/rotate/scale attributes

@santosd santosd assigned santosd and unassigned santosg87 Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants