]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
import picture: remove pictures from export
authorrraphael <raphael.raphael@c-s.fr>
Tue, 26 Jan 2021 17:35:57 +0000 (18:35 +0100)
committerrraphael <raphael.raphael@c-s.fr>
Tue, 26 Jan 2021 17:35:57 +0000 (18:35 +0100)
src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp
src/ExchangePlugin/ExchangePlugin_msg_fr.ts

index e81ae860df0abb368483973b515c6d042e66be8b..eb63437373c7a8c215cec3b4fc9bca64437a3068 100644 (file)
@@ -207,6 +207,13 @@ void ExchangePlugin_ExportFeature::exportFile(const std::string& theFileName,
   std::list<GeomShapePtr> aShapes;
   for (int i = 0, aSize = aSelectionListAttr->size(); i < aSize; ++i) {
     AttributeSelectionPtr anAttrSelection = aSelectionListAttr->value(i);
+
+    /// do not export pictures
+    ResultPtr aBodyContext =
+      std::dynamic_pointer_cast<ModelAPI_Result>(anAttrSelection->context());
+    if(aBodyContext->hasTextureFile())
+      continue;
+
     std::shared_ptr<GeomAPI_Shape> aCurShape = anAttrSelection->value();
     if (aCurShape.get() == NULL)
       aCurShape = anAttrSelection->context()->shape();
@@ -412,7 +419,9 @@ void ExchangePlugin_ExportFeature::exportXAO(const std::string& theFileName)
       AttributeSelectionPtr anAttr = aSelection->value(a);
       ResultPtr aBodyContext =
         std::dynamic_pointer_cast<ModelAPI_Result>(anAttr->context());
-      if (aBodyContext.get() && !aBodyContext->isDisabled() && aBodyContext->shape().get()) {
+      if (aBodyContext.get() && !aBodyContext->isDisabled() && aBodyContext->shape().get()
+          /// do not export pictures
+          && !aBodyContext->hasTextureFile()) {
         aResults.push_back(aBodyContext);
         GeomShapePtr aShape = anAttr->value();
         if (!aShape.get())
index 2774f3d5916b94df3b7dc40d43fd96fd12c1e8bd..cde6d399d51fa5f4354352e44502a2d6dd40cd8b 100644 (file)
       <translation>Le nom du fichier est vide.</translation>
     </message>
   </context>
+  <context>
+    <name>ImportImageMacro</name>
+    <message>
+      <source>Import</source>
+      <translation>Importer</translation>
+    </message>
+  </context>
+  <context>
+    <name>ImportImageMacro:file_path</name>
+    <message>
+      <source>Import image file</source>
+      <translation>Fichier de l'image à importer</translation>
+    </message>
+  </context>
+  <context>
+    <name>ImportImageMacro:target_part</name>
+    <message>
+      <source>Import to</source>
+      <translation>Importer vers</translation>
+    </message>
+  </context>
 
   <!-- Export part -->
   <context>