From: rraphael Date: Tue, 26 Jan 2021 17:35:57 +0000 (+0100) Subject: import picture: remove pictures from export X-Git-Tag: V9_7_0a1~13^2~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3d294605fe39117b2e67ca6fb7dd361c1358a8c5;p=modules%2Fshaper.git import picture: remove pictures from export --- diff --git a/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp b/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp index e81ae860d..eb6343737 100644 --- a/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp +++ b/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp @@ -207,6 +207,13 @@ void ExchangePlugin_ExportFeature::exportFile(const std::string& theFileName, std::list 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(anAttrSelection->context()); + if(aBodyContext->hasTextureFile()) + continue; + std::shared_ptr 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(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()) diff --git a/src/ExchangePlugin/ExchangePlugin_msg_fr.ts b/src/ExchangePlugin/ExchangePlugin_msg_fr.ts index 2774f3d59..cde6d399d 100644 --- a/src/ExchangePlugin/ExchangePlugin_msg_fr.ts +++ b/src/ExchangePlugin/ExchangePlugin_msg_fr.ts @@ -409,6 +409,27 @@ Le nom du fichier est vide. + + ImportImageMacro + + Import + Importer + + + + ImportImageMacro:file_path + + Import image file + Fichier de l'image à importer + + + + ImportImageMacro:target_part + + Import to + Importer vers + +