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-1025] Maya creates unnecessary groups "rigParent|rig" for MayaReference when switching other variant sets. #3598

Open
bazhutkin opened this issue Feb 7, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@bazhutkin
Copy link

Describe the bug
While testing the USD pipeline, I encountered an unexpected problem. If an asset, in addition to switching the variant between the USD representation and the rig, has other variants, for example, for texture path switching, then in this case, when switching additional variants, the rig becomes invisible, due to the fact that Maya creates new "rigParent#|rig" groups when switching other variants to other values (different from the value at which the first switch to rig occurred).

Steps to reproduce

import mayaUsd
from pxr import Sdf, Usd
shapeNode = cmds.ls(cmds.createNode('mayaUsdProxyShape', skipSelect = True, name = 'sceneShape'), long = True)[0]
stage = mayaUsd.ufe.getStage(shapeNode)
# create prim and add reference
prim = stage.DefinePrim('/world/prop_1')
prim.GetReferences().AddReference('assets/props/testProp_colorVariant/usd/pub/testProp_colorVariant.usd')
# switch to rig variant
geo_variant_sets = prim.GetVariantSets().GetVariantSet('geo')
geo_variant_sets.SetVariantSelection('rig')

# no problem
# switch to USD (cache variant)
geo_variant_sets.SetVariantSelection('cache')
# switch to green color variant
color_variant_sets = prim.GetVariantSets().GetVariantSet('color')
color_variant_sets.SetVariantSelection('Green')
# switch to rig variant
geo_variant_sets.SetVariantSelection('rig')

# problem, we don't see the rig

USD Maya Reference switch variant bug

# switch to red color (default) variant
color_variant_sets.SetVariantSelection('Red')

# no problem, we see the rig again

Expected behavior
Switching other variant sets should not be related to switching an asset into a rig representation.

Attachments
Test asset
testProp_colorVariant.zip

Specs (if applicable):

  • Windows 11
  • Maya 2024.2
  • Maya USD 0.26.0
@bazhutkin bazhutkin added the bug Something isn't working label Feb 7, 2024
@wallworm
Copy link
Collaborator

Thanks for sharing. We've logged it.

@santosg87 santosg87 changed the title Maya creates unnecessary groups "rigParent|rig" for MayaReference when switching other variant sets. [EMSUSD-1026] Maya creates unnecessary groups "rigParent|rig" for MayaReference when switching other variant sets. Feb 16, 2024
@bazhutkin
Copy link
Author

I checked the variant switching in Maya 2025.3 USD version 0.30.0 and found the same bug. Please fix it.

@santosd santosd changed the title [EMSUSD-1026] Maya creates unnecessary groups "rigParent|rig" for MayaReference when switching other variant sets. [EMSUSD-1025] Maya creates unnecessary groups "rigParent|rig" for MayaReference when switching other variant sets. Oct 25, 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