From 2753dfcf23448bae6913fe0b8a54d02a1a8cf665 Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 5 Feb 2020 18:07:16 +0300 Subject: [PATCH] Implementation of python dump of SHAPER STUDY for results and groups using XAO file format. --- CMakeLists.txt | 1 + src/PythonAPI/model/services/__init__.py | 6 ++++++ src/XAO/CMakeLists.txt | 1 + 3 files changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c63a22307..e8cbbbfef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,6 +97,7 @@ IF(${HAVE_SALOME}) SET(SHAPER_INSTALL_BIN lib/salome CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_PLUGIN_FILES lib/salome CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_PYTHON_FILES bin/salome CACHE INTERNAL "" FORCE) + SET(SHAPER_INSTALL_HEADERS include/salome CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_QM_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_XML_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE) diff --git a/src/PythonAPI/model/services/__init__.py b/src/PythonAPI/model/services/__init__.py index d585c1891..e5bc14478 100644 --- a/src/PythonAPI/model/services/__init__.py +++ b/src/PythonAPI/model/services/__init__.py @@ -29,3 +29,9 @@ from ModelHighAPI import reset from ModelHighAPI import addFolder, removeFolder from ModelHighAPI import ModelHighAPI_Selection as selection from ModelHighAPI import checkPythonDump as checkPythonDump + +# a method used for the python dump of the SHAPER STUDY +def publishToShaperStudy(): + begin() + activeDocument().addFeature("PublishToStudy") + end() diff --git a/src/XAO/CMakeLists.txt b/src/XAO/CMakeLists.txt index a4fa551c1..0ea99e989 100644 --- a/src/XAO/CMakeLists.txt +++ b/src/XAO/CMakeLists.txt @@ -90,3 +90,4 @@ SET(XAO_SOURCES ADD_LIBRARY(XAOShaper SHARED ${XAO_SOURCES} ${XAO_HEADERS}) TARGET_LINK_LIBRARIES(XAOShaper ${PROJECT_LIBRARIES}) INSTALL(TARGETS XAOShaper DESTINATION ${SHAPER_INSTALL_BIN}) +INSTALL(FILES ${XAO_HEADERS} DESTINATION ${SHAPER_INSTALL_HEADERS}) -- 2.39.2