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

UsdImaging is not correctly updated when changing metadata in descendant prims of UsdSkelRoot. #3371

Open
JamesPedFoundry opened this issue Oct 21, 2024 · 1 comment

Comments

@JamesPedFoundry
Copy link

Description of Issue

It appears that changes to metadata on Prims beneath a UsdSkel Root.
UsdImaging is not correctly updated when changing metadata in descendant prims of UsdSkelRoot.
This issue results in blackout in UsdViewer and errors, that are not recovered until layers are reloaded. Here's a sample of the errors.
Error 1):

Traceback (most recent call last):
  File "C:\USD2411_py310\lib\python\pxr\Usdviewq\appController.py", line 4998, in onPrimSelected
    while prim.IsInstanceProxy():
RuntimeError: Accessed invalid null prim

Error 1.5): Continue from 1, and toggle enabling Materials.

ERROR: Usdview encountered an error while rendering.Used expired 'Mesh' prim </HumanFemale_Group/HumanFemaleHair/Geom/Hair/Layers/HeadHair/BetaLeft_HairLayer/Standin/Shell_sbdv>  - UsdExpiredPrimAccessError thrown:
 -> Usd_ThrowExpiredPrimAccessError at C:\workspace\jped\github\USD\pxr\usd\usd\primData.cpp:266

Error 2) Selection fails to work. This is far easier to reproduce.

Steps to Reproduce

Error 1)

  1. Load UsdView with the HumanFemale.usd example provided by Pixar:
    https://openusd.org/release/dl_usdskel_examples.html
  2. Execute the following Python code in Python interpreter of UsdView:
look = usdviewApi.stage.GetPrimAtPath("/HumanFemale_Group/HumanFemale/Looks")
look.SetKind("group")
hairGeo = usdviewApi.stage.GetPrimAtPath("/HumanFemale_Group/HumanFemaleHair/Geom")
hairGeo.SetActive(False)

For Error 1):
3. Try selecting the hair (which you'll notice is still visible in the scene despite the geo being deactivated)

For Error 1.5):
3. Toggle Enable Scene Materials from display menu in the viewer.

Error 2):

  1. Load UsdView with the HumanFemale.usd example provided by Pixar:
    https://openusd.org/release/dl_usdskel_examples.html
  2. Expand the scene up such that all the Geom and Looks prims are visible (no need to go deeper).
  3. Ensure selection in the viewport is working, and that selecting the Geom prims highlights these respective portions in yellow, and that selecting the hair or skin highlights in yellow (or selection color).
  4. Right click and disable /HumanFemale_Group/HumanFemaleHair/Geom
  5. Notice selection in the viewer no longer works.
  6. Reload the stage.
  7. Selection works again as per 3.

System Information (OS, Hardware)

Win11(NVIDIA A2000) and Rocky9(NVIDIA P4000)

Package Versions

v24.05 and v24.11-rc1 (likely earlier versions too)

Build Flags

--alembic --no-hdf5 --usd-imaging --usdview --no-tutorials --no-examples --build-shared --python

@jesschimein
Copy link

Filed as internal issue #USD-10341

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants