From c83265fd57cbbff88bfa73eb31cd9ccfe5108aa9 Mon Sep 17 00:00:00 2001 From: Aloys Baillet Date: Thu, 21 Apr 2022 09:39:16 +1000 Subject: [PATCH] Fixed missing material dependency on GeomSubSet --- pxr/usdImaging/usdImaging/meshAdapter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pxr/usdImaging/usdImaging/meshAdapter.cpp b/pxr/usdImaging/usdImaging/meshAdapter.cpp index f95d0e14ae..735652bbd0 100644 --- a/pxr/usdImaging/usdImaging/meshAdapter.cpp +++ b/pxr/usdImaging/usdImaging/meshAdapter.cpp @@ -115,6 +115,11 @@ UsdImagingMeshAdapter::Populate(UsdPrim const& prim, index->GetMaterialAdapter(materialPrim); if (materialAdapter) { materialAdapter->Populate(materialPrim, index, nullptr); + // We need to register a dependency on the material prim so + // that geometry is updated when the material is + // (specifically, DirtyMaterialId). + // XXX: Eventually, it would be great to push this into hydra. + index->AddDependency(cachePath, materialPrim); } } }