X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FCollectionPlugin%2FCollectionPlugin_Field.cpp;h=cd90fc09f4a87f147fa991ac76330293ad865f98;hb=fdd802da7683f66ca609cf12b1e11be9642149d6;hp=e1921c0b693073480fbbce76a3cdde76277d09a2;hpb=722cced61dc12b73cb086ecab154bf30db70281e;p=modules%2Fshaper.git diff --git a/src/CollectionPlugin/CollectionPlugin_Field.cpp b/src/CollectionPlugin/CollectionPlugin_Field.cpp index e1921c0b6..cd90fc09f 100644 --- a/src/CollectionPlugin/CollectionPlugin_Field.cpp +++ b/src/CollectionPlugin/CollectionPlugin_Field.cpp @@ -1,19 +1,33 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> - -// File: CollectionPlugin_Field.cpp -// Created: 08 Oct 2014 -// Author: Sergey BELASH +// Copyright (C) 2014-2020 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #include "CollectionPlugin_Field.h" #include #include -#include #include #include #include #include #include +#include +#include CollectionPlugin_Field::CollectionPlugin_Field() { @@ -22,6 +36,9 @@ CollectionPlugin_Field::CollectionPlugin_Field() void CollectionPlugin_Field::initAttributes() { data()->addAttribute(SELECTED_ID(), ModelAPI_AttributeSelectionList::typeId()); + // for the whole part result is not obligatory + ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), SELECTED_ID()); + data()->addAttribute(COMPONENTS_NAMES_ID(), ModelAPI_AttributeStringArray::typeId()); data()->addAttribute(STAMPS_ID(), ModelAPI_AttributeIntArray::typeId()); data()->addAttribute(VALUES_ID(), ModelAPI_AttributeTables::typeId());