maya-usd icon indicating copy to clipboard operation
maya-usd copied to clipboard

Materials Duplicating When Using "Edit As Maya Data"

Open jimwatson-ta opened this issue 2 years ago • 2 comments

Describe the bug After clicking "Edit As Maya Data" on a UsdMesh, it duplicates the materials in the scene if a material of the same name exists.

Steps to reproduce Steps to reproduce the behavior:

  1. Create a cube in Maya
  2. Assign one lambert material to the top face and one material to the other faces of the cube.
  3. Create a new USD layer.
  4. Duplicate the Cube as USD data into the stage.
  5. Edit the USD Cube as Maya Data.
  6. See duplicate materials assigned on the mesh and new materials in the Hypershade.

Expected behavior When hitting the button to "Edit As Maya Data," if the linked materials already exist in the scene, assign that material to the mesh.

Specs (if applicable):

  • Windows 10
  • Codeless Schemas
  • Maya 2024.2
  • MayaUSD 0.26.0

jimwatson-ta avatar Jan 09 '24 23:01 jimwatson-ta

Thank you for the input. What about the case where the material in the USD is actually more updated than the scene material? Do you have a proposal on handling which materials (Keep Scene Materials, Update Scene Materials or Make Duplicate)?

wallworm avatar Jan 11 '24 18:01 wallworm

Good call. I would prefer if the scene materials would be overridden, but I can also see that as a useful option on the Edit As Maya Data Options menu.

jimwatson-ta avatar Feb 03 '24 01:02 jimwatson-ta