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

Fix bug where maya rig behaves different when loaded due to display handle logic #27

Merged

Conversation

BigRoy
Copy link
Contributor

@BigRoy BigRoy commented Jul 17, 2024

Changelog Description

  • Perform maya.cmds.refresh before maya.cmds.exactWorldBoundingBox call to resolve issue with rig behaving different on load
  • Only perform the logic to set display handle if it's enabled in settings
  • Cosmetics/cleanup of code.

Additional info

For whatever reason the example rig failed to behave normally if we'd call maya.cmds.exactWorldBoundingBox directly

Testing notes:

  1. Maya rig load should work without issue
  2. Other reference loads with display handle enabled/disabled should also still work.

This may need a particular "rig" file from Advanced Skeleton to test the actual issue being solved with this PR. However, the file provided for developing this PR was confidential.

@BigRoy BigRoy added the type: bug Something isn't working label Jul 17, 2024
@BigRoy
Copy link
Contributor Author

BigRoy commented Jul 19, 2024

Example rig producing the issue:

9989_test_ayon_pipeline_asset001_rigMain_v003.zip
image

And to simply reproduce the issue OUTSIDE of the pipeline:

from maya import cmds

file_url = r"/path/to/9989_test_ayon_pipeline_asset001_rigMain_v003.ma"
nodes = cmds.file(file_url,
                  namespace="test",
                  sharedReferenceFile=False,
                  reference=True,
                  returnNewNodes=True,
                  groupReference=True,
                  groupName="my_group")
cmds.exactWorldBoundingBox(nodes)  # this breaks the rig directly after the `file` call

Tested in Maya 2024.2 on Windows

Copy link
Member

@m-u-r-p-h-y m-u-r-p-h-y left a comment

Choose a reason for hiding this comment

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

tested by the client and confirmed it solves the issue

@BigRoy BigRoy merged commit d0a787d into ynput:develop Jul 19, 2024
1 check passed
@BigRoy BigRoy deleted the bugfix/load_refresh_before_boundingbox_rig branch July 19, 2024 07:17
@BigRoy
Copy link
Contributor Author

BigRoy commented Jul 19, 2024

I've reported this as a bug to autodesk as well.

Case number
22606091

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants