From 6ea8284a2c506c6164f54e556552220801822d15 Mon Sep 17 00:00:00 2001 From: Rob Bateman Date: Wed, 16 Sep 2020 16:15:48 +1000 Subject: [PATCH 1/2] ensure the VP2 render delegate also gets the correct excluded prim paths --- .../AL_USDMaya/AL/usdmaya/nodes/ProxyShape.cpp | 15 +-------------- .../AL/usdmaya/nodes/proxy/ProxyShapeMetaData.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/ProxyShape.cpp b/plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/ProxyShape.cpp index 0ce3454cc8..d7670e6163 100644 --- a/plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/ProxyShape.cpp +++ b/plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/ProxyShape.cpp @@ -318,20 +318,7 @@ void ProxyShape::constructGLImagingEngine() // delete previous instance destroyGLImagingEngine(); - - const auto& translatedGeo = m_context->excludedGeometry(); - - // combine the excluded paths - SdfPathVector excludedGeometryPaths; - excludedGeometryPaths.reserve( - m_excludedTaggedGeometry.size() + m_excludedGeometry.size() + translatedGeo.size()); - excludedGeometryPaths.assign( - m_excludedTaggedGeometry.begin(), m_excludedTaggedGeometry.end()); - excludedGeometryPaths.insert( - excludedGeometryPaths.end(), m_excludedGeometry.begin(), m_excludedGeometry.end()); - for (auto& it : translatedGeo) { - excludedGeometryPaths.push_back(it.second); - } + SdfPathVector excludedGeometryPaths = getExcludePrimPaths(); m_engine = new Engine(m_path, excludedGeometryPaths); // set renderer plugin based on RendererManager setting diff --git a/plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/proxy/ProxyShapeMetaData.cpp b/plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/proxy/ProxyShapeMetaData.cpp index 975b044baa..0c6119cdf9 100644 --- a/plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/proxy/ProxyShapeMetaData.cpp +++ b/plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/proxy/ProxyShapeMetaData.cpp @@ -334,6 +334,16 @@ SdfPathVector ProxyShape::getExcludePrimPaths() const SdfPathVector temp = getPrimPathsFromCommaJoinedString(excludedTranslatedGeometryPlug().asString()); paths.insert(paths.end(), temp.begin(), temp.end()); + + const auto& translatedGeo = m_context->excludedGeometry(); + + // combine the excluded paths + paths.insert(paths.end(), m_excludedTaggedGeometry.begin(), m_excludedTaggedGeometry.end()); + paths.insert(paths.end(), m_excludedGeometry.begin(), m_excludedGeometry.end()); + for (auto& it : translatedGeo) { + paths.push_back(it.second); + } + return paths; } From bf5350a09dc52f171f0e2bb5615b7dada79e587b Mon Sep 17 00:00:00 2001 From: Zhicheng Ye Date: Tue, 29 Sep 2020 18:02:42 +1000 Subject: [PATCH 2/2] [PIPE-3699] Fixed excluded prim paths state when having prim pushed to Maya --- .../lib/AL_USDMaya/AL/usdmaya/nodes/proxy/ProxyShapeMetaData.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/proxy/ProxyShapeMetaData.cpp b/plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/proxy/ProxyShapeMetaData.cpp index 0c6119cdf9..2f2d1dee8c 100644 --- a/plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/proxy/ProxyShapeMetaData.cpp +++ b/plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/proxy/ProxyShapeMetaData.cpp @@ -210,6 +210,7 @@ void ProxyShape::constructExcludedPrims() auto excludedPaths = getExcludePrimPaths(); if (m_excludedGeometry != excludedPaths) { std::swap(m_excludedGeometry, excludedPaths); + _IncreaseExcludePrimPathsVersion(); constructGLImagingEngine(); } }