From 37982b1409825752861e76d733cd44e629e3e616 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 28 Feb 2013 16:04:08 +0000 Subject: [PATCH] Merge from V6_main 28/02/2013 --- CMakeLists.txt | 34 +++++------ idl/CMakeLists.txt | 6 +- src/ENGINE/CMakeLists.txt | 2 +- src/Macro/modes.py | 81 ++++++++++++------------- src/PVGUI/CMakeLists.txt | 2 +- src/PVGUI/PVGUI_Module.cxx | 9 +++ src/PVGUI/PVGUI_Module.h | 1 + src/PV_SWIG/CMakeLists.txt | 2 +- src/Plugins/ParaMEDCorba/CMakeLists.txt | 2 +- test/VisuPrs/Util/CMakeLists.txt | 2 +- 10 files changed, 75 insertions(+), 66 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61f77467..0379ad43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,17 +31,17 @@ ENDIF(COMMAND cmake_policy) SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "KERNEL_ROOT_DIR") SET(MODULE PARAVIS) -INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) -INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) -INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) -INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake) -INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake) -INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake) -INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) -INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake) +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindPLATFORM.cmake) +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindPYTHON.cmake) +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindOMNIORB.cmake) +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindPTHREADS.cmake) +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindHDF5.cmake) +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindBOOST.cmake) +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindLIBXML2.cmake) +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindSWIG.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) -INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake) -INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindDOXYGEN.cmake) +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindKERNEL.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindPARAVIEW.cmake) IF(EXISTS ${PARAVIEW_VTK_DIR}/VTKConfig.cmake) @@ -49,13 +49,13 @@ IF(EXISTS ${PARAVIEW_VTK_DIR}/VTKConfig.cmake) ENDIF(EXISTS ${PARAVIEW_VTK_DIR}/VTKConfig.cmake) SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "GUI_ROOT_DIR") -INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindCAS.cmake) -INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQT4.cmake) -INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindOPENGL.cmake) -INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindVTK.cmake) -INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQWT.cmake) -INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake) -INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindGUI.cmake) +INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindCAS.cmake) +INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindQT4.cmake) +INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindOPENGL.cmake) +INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindVTK.cmake) +INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindQWT.cmake) +INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindSIPPYQT.cmake) +INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindGUI.cmake) SET(VERSION_MAJOR 7) SET(VERSION_MINOR 0) diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt index b9e5566b..dc6b6f02 100644 --- a/idl/CMakeLists.txt +++ b/idl/CMakeLists.txt @@ -21,7 +21,7 @@ SET(VERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MAINTENANCE}) SET(SOVERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}) ADD_DEFINITIONS(-DHAVE_SALOME_CONFIG) -INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl) +INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl) #INCLUDE(vtkWrapHierarchy.cmake) #SET(VTK_WRAP_HIERARCHY_EXE vtkWrapHierarchy) @@ -115,7 +115,7 @@ FOREACH(input ${BASEIDL_FILES} ${WRAP_IDL}) ENDIF(${BASE_INDEX} EQUAL -1) ADD_CUSTOM_COMMAND( OUTPUT ${outputs} - COMMAND ${OMNIORB_IDL_COMPILER} -bcxx ${IDLCXXFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR} -I${KERNEL_ROOT_DIR}/idl/salome ${OMNIORB_IDLCXXFLAGS} ${input} + COMMAND ${OMNIIDL_EXECUTABLE} -bcxx ${IDLCXXFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR} -I${KERNEL_ROOT_DIR}/idl/salome ${OMNIORB_IDLCXXFLAGS} ${input} MAIN_DEPENDENCY ${input} ) INSTALL(FILES ${input} DESTINATION idl/salome) @@ -127,6 +127,6 @@ FOREACH(input ${BASEIDL_FILES} ${WRAP_IDL}) INSTALL(CODE "SET(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})") INSTALL(CODE "SET(OMNIORB_IDL_PYTHON ${OMNIORB_IDL_PYTHON})") INSTALL(CODE "SET(IDLPYFLAGS -bpythonIDL -p${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_CURRENT_SOURCE_DIR} -I${KERNEL_ROOT_DIR}/idl/salome)") - INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/install_python_from_idl.cmake) + INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/install_python_from_idl.cmake) ENDFOREACH(input ${IDL_FILES}) diff --git a/src/ENGINE/CMakeLists.txt b/src/ENGINE/CMakeLists.txt index 85b6170a..f14373dd 100644 --- a/src/ENGINE/CMakeLists.txt +++ b/src/ENGINE/CMakeLists.txt @@ -21,7 +21,7 @@ SET(VERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MAINTENANCE}) SET(SOVERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}) ADD_DEFINITIONS(-DHAVE_SALOME_CONFIG) -INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl) +INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl) ADD_LIBRARY(PARAVISEngine SHARED PARAVIS_Engine_i.cc) diff --git a/src/Macro/modes.py b/src/Macro/modes.py index 30dc8dc7..f1e01bb6 100644 --- a/src/Macro/modes.py +++ b/src/Macro/modes.py @@ -59,44 +59,43 @@ for arrayid in range(0, pinfo.GetNumberOfArrays()) : if vectorname == None : source.AnimationMode = oldmode - sys.exit(0) - -ScaleVector1.ScaleFactor = 0 -ScaleVector1.UpdatePipeline() -bounds = info.DataInformation.GetBounds() -side = [bounds[1] - bounds[0], bounds[3] - bounds[2], bounds[5] - bounds[4]] -length = side[0] -if side[1] > length : length = side[1] -if side[2] > length : length = side[2] - -scale = length / 20 -if vectorname != None : - arrayrange = arrayinfo.GetComponentRange(-1) - if arrayrange[1] > 0 : - scale = scale / arrayrange[1] - -WarpByVector1.ScaleFactor = scale - -AnimationScene1 = GetAnimationScene() - -TimeAnimationCue1 = GetTimeTrack() -TimeAnimationCue1.Enabled = 0 - -KeyFrameAnimationCue1 = GetAnimationTrack( ScaleVector1.GetProperty('ScaleFactor')) -KeyFrame0 = CompositeKeyFrame( KeyValues=[1.0], Interpolation='Sinusoid' ) -KeyFrame1 = CompositeKeyFrame( KeyTime=1.000000001, KeyValues=[1.0] ) - -KeyFrameAnimationCue1.KeyFrames = [ KeyFrame0, KeyFrame1 ] - -AnimationScene1.Cues.append(KeyFrameAnimationCue1) -AnimationScene1.Loop = 1 -AnimationScene1.PlayMode = 'Sequence' -AnimationScene1.NumberOfFrames = 21 - -WarpByVectorDataRepresentation = Show(WarpByVector1) -if rootname != None : - pvLookupTable = GetLookupTableForArray( rootname, 3, VectorMode='Magnitude' ) - WarpByVectorDataRepresentation.ColorArrayName = rootname - WarpByVectorDataRepresentation.LookupTable = pvLookupTable - -AnimationScene1.Play() +else : + ScaleVector1.ScaleFactor = 0 + ScaleVector1.UpdatePipeline() + bounds = info.DataInformation.GetBounds() + side = [bounds[1] - bounds[0], bounds[3] - bounds[2], bounds[5] - bounds[4]] + length = side[0] + if side[1] > length : length = side[1] + if side[2] > length : length = side[2] + + scale = length / 20 + if vectorname != None : + arrayrange = arrayinfo.GetComponentRange(-1) + if arrayrange[1] > 0 : + scale = scale / arrayrange[1] + + WarpByVector1.ScaleFactor = scale + + AnimationScene1 = GetAnimationScene() + + TimeAnimationCue1 = GetTimeTrack() + TimeAnimationCue1.Enabled = 0 + + KeyFrameAnimationCue1 = GetAnimationTrack( ScaleVector1.GetProperty('ScaleFactor')) + KeyFrame0 = CompositeKeyFrame( KeyValues=[1.0], Interpolation='Sinusoid' ) + KeyFrame1 = CompositeKeyFrame( KeyTime=1.000000001, KeyValues=[1.0] ) + + KeyFrameAnimationCue1.KeyFrames = [ KeyFrame0, KeyFrame1 ] + + AnimationScene1.Cues.append(KeyFrameAnimationCue1) + AnimationScene1.Loop = 1 + AnimationScene1.PlayMode = 'Sequence' + AnimationScene1.NumberOfFrames = 21 + + WarpByVectorDataRepresentation = Show(WarpByVector1) + if rootname != None : + pvLookupTable = GetLookupTableForArray( rootname, 3, VectorMode='Magnitude' ) + WarpByVectorDataRepresentation.ColorArrayName = rootname + WarpByVectorDataRepresentation.LookupTable = pvLookupTable + + AnimationScene1.Play() diff --git a/src/PVGUI/CMakeLists.txt b/src/PVGUI/CMakeLists.txt index d729a8c8..35e01b79 100644 --- a/src/PVGUI/CMakeLists.txt +++ b/src/PVGUI/CMakeLists.txt @@ -21,7 +21,7 @@ SET(VERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MAINTENANCE}) SET(SOVERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}) ADD_DEFINITIONS(-DHAVE_SALOME_CONFIG) -INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../ParaView ${CMAKE_BINARY_DIR}/idl ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../ParaView ${CMAKE_BINARY_DIR}/idl ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) IF(WITH_VISU) SET(VISU_PARAVIS_LIBS diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index 99221e82..23649b9d 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -544,6 +544,15 @@ void PVGUI_Module::onDataRepresentationCreated(pqDataRepresentation* data) { if(lut_mgr) { lut_mgr->setScalarBarVisibility(data,visible); } + + connect(data, SIGNAL(dataUpdated()), this, SLOT(onDataRepresentationUpdated())); +} + +void PVGUI_Module::onDataRepresentationUpdated() { + SalomeApp_Study* activeStudy = dynamic_cast(application()->activeStudy()); + if(!activeStudy) return; + + activeStudy->Modified(); } void PVGUI_Module::onVariableChanged(pqVariableType t, const QString) { diff --git a/src/PVGUI/PVGUI_Module.h b/src/PVGUI/PVGUI_Module.h index 5c0732ee..7fe0bf3a 100644 --- a/src/PVGUI/PVGUI_Module.h +++ b/src/PVGUI/PVGUI_Module.h @@ -225,6 +225,7 @@ private slots: void onFinishedAddingServer(pqServer*); void onDataRepresentationCreated(pqDataRepresentation*); + void onDataRepresentationUpdated(); void onVariableChanged(pqVariableType, const QString); void onRepresentationChanged(pqRepresentation*); diff --git a/src/PV_SWIG/CMakeLists.txt b/src/PV_SWIG/CMakeLists.txt index 004fc45c..a6eed7e6 100644 --- a/src/PV_SWIG/CMakeLists.txt +++ b/src/PV_SWIG/CMakeLists.txt @@ -31,6 +31,6 @@ FOREACH(f ${dist_salomescript_DATA}) INSTALL(CODE "SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})") INSTALL(CODE "SET(DEST bin/salome)") INSTALL(CODE "SET(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})") - INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/install_and_compile_python_file.cmake) + INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/install_and_compile_python_file.cmake) ENDFOREACH(f ${dist_salomescript_DATA}) diff --git a/src/Plugins/ParaMEDCorba/CMakeLists.txt b/src/Plugins/ParaMEDCorba/CMakeLists.txt index 06cce60c..fac81bbd 100644 --- a/src/Plugins/ParaMEDCorba/CMakeLists.txt +++ b/src/Plugins/ParaMEDCorba/CMakeLists.txt @@ -47,7 +47,7 @@ PROJECT( ParaMEDCorba ) ParaMEDCorbaUserInterfaceSources.xml SERVER_MANAGER_SOURCES ${PARACORBAPLUG_SRCS} ) - INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${MED_ROOT_DIR}/include/salome ${KERNEL_ROOT_DIR}/include/salome) + INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIRS} ${MED_ROOT_DIR}/include/salome ${KERNEL_ROOT_DIR}/include/salome) SET_TARGET_PROPERTIES(ParaMEDMEM2VTK PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") SET_TARGET_PROPERTIES(ParaMEDCorbaPlugin PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") diff --git a/test/VisuPrs/Util/CMakeLists.txt b/test/VisuPrs/Util/CMakeLists.txt index d3247b1f..f084e8f4 100644 --- a/test/VisuPrs/Util/CMakeLists.txt +++ b/test/VisuPrs/Util/CMakeLists.txt @@ -28,6 +28,6 @@ FOREACH(f ${dist_testscript_DATA}) INSTALL(CODE "SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})") INSTALL(CODE "SET(DEST bin/salome)") INSTALL(CODE "SET(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})") - INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/install_and_compile_python_file.cmake) + INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/install_and_compile_python_file.cmake) ENDFOREACH(f ${dist_testscript_DATA}) -- 2.39.2