From: Alexey Sozinov Date: Tue, 1 Jun 2021 13:01:26 +0000 (+0300) Subject: Fixed bug: impossible import file X-Git-Tag: V9_9_0a1~13^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cd2cc4324e9d4b4ed09d136f9566b3f72ac0ba50;p=modules%2Fshaper.git Fixed bug: impossible import file --- 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 } /*