From cd2cc4324e9d4b4ed09d136f9566b3f72ac0ba50 Mon Sep 17 00:00:00 2001 From: Alexey Sozinov Date: Tue, 1 Jun 2021 16:01:26 +0300 Subject: [PATCH] Fixed bug: impossible import file --- src/ExchangePlugin/ExchangePlugin_Import.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/ExchangePlugin/ExchangePlugin_Import.cpp b/src/ExchangePlugin/ExchangePlugin_Import.cpp index 6178b2259..861145789 100644 --- a/src/ExchangePlugin/ExchangePlugin_Import.cpp +++ b/src/ExchangePlugin/ExchangePlugin_Import.cpp @@ -31,6 +31,7 @@ #include #include #include +#include static const std::wstring THE_NEW_PART_STR(L"New Part"); @@ -88,6 +89,23 @@ void ExchangePlugin_Import::initAttributes() data()->addAttribute(STEP_MATERIALS_ID(), ModelAPI_AttributeBoolean::typeId()); data()->addAttribute(STEP_COLORS_ID(), ModelAPI_AttributeBoolean::typeId()); data()->addAttribute(STEP_SCALE_INTER_UNITS_ID(), ModelAPI_AttributeBoolean::typeId()); + +#ifndef HAVE_SALOME + ModelAPI_Session::get()->validators()->registerNotObligatory( + getKind(), ExchangePlugin_Import::IMPORT_TYPE_ID()); + ModelAPI_Session::get()->validators()->registerNotObligatory( + getKind(), ExchangePlugin_Import::STEP_FILE_PATH_ID()); + ModelAPI_Session::get()->validators()->registerNotObligatory( + getKind(), ExchangePlugin_Import::STEP_TARGET_PART_ID()); + ModelAPI_Session::get()->validators()->registerNotObligatory( + getKind(), ExchangePlugin_Import::STEP_TARGET_PARTS_LIST_ID()); + ModelAPI_Session::get()->validators()->registerNotObligatory( + getKind(), ExchangePlugin_Import::STEP_MATERIALS_ID()); + ModelAPI_Session::get()->validators()->registerNotObligatory( + getKind(), ExchangePlugin_Import::STEP_COLORS_ID()); + ModelAPI_Session::get()->validators()->registerNotObligatory( + getKind(), ExchangePlugin_Import::STEP_SCALE_INTER_UNITS_ID()); +#endif } /* -- 2.39.2