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

Deleting material assigned to GeomSubset does not refresh the material in the viewport #1837

Open
aloysbaillet opened this issue Apr 20, 2022 · 2 comments

Comments

@aloysbaillet
Copy link
Contributor

Description of Issue

Deleting a material assigned to a GeomSubset does not repopulate the Hydra prim.
PR with simple fix is coming up shortly.

Steps to Reproduce

  1. Download and unzip mat-on-geomsubset.zip
  2. usdview mat-on-geomsubset.usda
  3. Select /World/Looks/PreviewSurface Material prim
  4. Deactivate that /World/Looks/PreviewSurface Material
  5. The cylinder mesh stays green, but should become gray

System Information (OS, Hardware)

NA

Package Versions

All USD versions up to 22.05

Build Flags

NA

@jilliene
Copy link

Filed as internal issue #USD-7336

@marktucker
Copy link
Contributor

Before I realized exactly what the problem was, I created another test case for what turned out to be this same issue. My case is a little different, because I'm not deleting the material - I'm replaceing one material with another in a way that causes hydra to "repopulate" the material sprim. But the associated PR also fixes this case (thank you @aloysbaillet !). Since I did the work I thought I'd attach the test case in spite of the redundancy.

  1. Open grid.usda from this archive in usdview
    material_update.zip
  2. Run the following in the interpreter window:
    p = usdviewApi.stage.GetPrimAtPath('/matlib') p.GetReferences().SetReferences([Sdf.Reference('', '/materiallibrary2')])
  3. The material should change from red to blue, but it does not.
  4. Try the same thing with "gridworks.usda". In this case the update happens. The only difference between grid and gridworks is that in grid the material is bound to the geom subset, and in gridworks the material is bound to the mesh prim.

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

3 participants