X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FExchangePlugin%2FExchangePlugin_ImportFeature.cpp;h=e73ccfbe3070d78754b669ca7b8234a6e55029ab;hb=4d9c9b53936a9235a30588d1811d91efef81e1f2;hp=91c6c188a00d5b18321ebabc99022ef2a647b93e;hpb=7ec27d9ade25264df5a6d8e2308b3fb742366170;p=modules%2Fshaper.git diff --git a/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp b/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp index 91c6c188a..e73ccfbe3 100644 --- a/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp +++ b/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp @@ -214,7 +214,7 @@ void ExchangePlugin_ImportFeature::importFile(const std::string& theFileName) setColorGroups(aResult); } - // create Materiel group + // create Material group if (anMaterialsGroupSelected){ setMaterielGroup(aResult,theMaterialShape); } @@ -628,6 +628,15 @@ void ExchangePlugin_ImportFeatureBase::loadNamingDS( //load result theResultBody->store(theGeomShape); + // to store color of higher-level shape + std::wstring aName = theResultBody->findShapeName(theGeomShape); + if (!aName.empty()) + { + std::vector aColor = theResultBody->findShapeColor(aName); + if (!aColor.empty()) + ModelAPI_Tools::setColor(theResultBody, aColor); + } + std::string aNameMS = "Shape"; theResultBody->loadFirstLevel(theGeomShape, aNameMS); }