]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesPlugin/FeaturesPlugin_Translation.cpp
Salome HOME
import image: add texture to transformations
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Translation.cpp
index 37695957df3b59afc4133ca34f8c025ccc7895cd..c419d2ea8dea16cf706fd5cc2fc4900bbe2d38e9 100644 (file)
@@ -197,9 +197,10 @@ void FeaturesPlugin_Translation::performTranslation(const GeomTrsfPtr& theTrsf)
   // Getting objects.
   GeomAPI_ShapeHierarchy anObjects;
   std::list<ResultPtr> aParts;
+  std::string theTextureFile;
   AttributeSelectionListPtr anObjectsSelList = selectionList(OBJECTS_LIST_ID());
   if (!FeaturesPlugin_Tools::shapesFromSelectionList(
-       anObjectsSelList, isKeepSubShapes, anObjects, aParts))
+       anObjectsSelList, isKeepSubShapes, anObjects, aParts, theTextureFile))
     return;
 
   std::string anError;
@@ -240,6 +241,7 @@ void FeaturesPlugin_Translation::performTranslation(const GeomTrsfPtr& theTrsf)
     ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
     FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(),
                                              aMakeShapeList, *anIt, "Translated");
+    aResultBody->setTextureFile(theTextureFile);
     setResult(aResultBody, aResultIndex++);
   }