From 967f390aecaba07985cd6b5a7988e602101896f4 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 13 Oct 2020 13:47:18 -0700 Subject: [PATCH] Seach full model for color information Assemblies may not have their face information in the top level of the file. Search recurses to get the explicit shape in sub assemblies as well. Fixes https://gitlab.com/kicad/code/kicad/issues/5163 (cherry picked from commit a2168c6add121b324226cb1c845983075f33ed75) --- plugins/3d/oce/loadmodel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/3d/oce/loadmodel.cpp b/plugins/3d/oce/loadmodel.cpp index c78439d92e..1f513102d3 100644 --- a/plugins/3d/oce/loadmodel.cpp +++ b/plugins/3d/oce/loadmodel.cpp @@ -554,14 +554,13 @@ bool processShell( const TopoDS_Shape& shape, DATA& data, SGNODE* parent, bool processSolid( const TopoDS_Shape& shape, DATA& data, SGNODE* parent, std::vector< SGNODE* >* items ) { - TDF_Label label = data.m_assy->FindShape( shape, Standard_False ); - + TDF_Label label; data.hasSolid = true; std::string partID; Quantity_Color col; Quantity_Color* lcolor = NULL; - if( label.IsNull() ) + if( !data.m_assy->Search( shape, label, Standard_False ) ) { static int i = 0; std::ostringstream ostr;