Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ParaView
ParaView
Commits
0f3f7e7e
Commit
0f3f7e7e
authored
Dec 11, 2018
by
Ben Boeckel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vtkPVServerManagerRendering: update to the new module system
parent
e1c07bc1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
123 additions
and
141 deletions
+123
-141
ParaViewCore/ServerManager/Rendering/CMakeLists.txt
ParaViewCore/ServerManager/Rendering/CMakeLists.txt
+78
-101
ParaViewCore/ServerManager/Rendering/Testing/CMakeLists.txt
ParaViewCore/ServerManager/Rendering/Testing/CMakeLists.txt
+5
-0
ParaViewCore/ServerManager/Rendering/Testing/Cxx/CMakeLists.txt
...ewCore/ServerManager/Rendering/Testing/Cxx/CMakeLists.txt
+2
-2
ParaViewCore/ServerManager/Rendering/module.cmake
ParaViewCore/ServerManager/Rendering/module.cmake
+0
-27
ParaViewCore/ServerManager/Rendering/vtk.module
ParaViewCore/ServerManager/Rendering/vtk.module
+27
-0
ParaViewCore/ServerManager/Rendering/vtkSMMaterialDomain.cxx
ParaViewCore/ServerManager/Rendering/vtkSMMaterialDomain.cxx
+7
-7
ParaViewCore/ServerManager/Rendering/vtkSMMaterialLibraryProxy.cxx
...ore/ServerManager/Rendering/vtkSMMaterialLibraryProxy.cxx
+4
-4
No files found.
ParaViewCore/ServerManager/Rendering/CMakeLists.txt
View file @
0f3f7e7e
...
...
@@ -28,110 +28,87 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#==========================================================================
set
(
Module_SRCS
vtkPVComparativeAnimationCue
.cxx
vtkPVComparativeView
.cxx
vtkPVRepresentedArrayListSettings
.cxx
vtkSMBagChartSeriesListDomain
.cxx
vtkSMBoxRepresentationProxy
.cxx
vtkSMCameraLink
.cxx
vtkSMCameraProxy
.cxx
vtkSMChartRepresentationProxy
.cxx
vtkSMChartSeriesListDomain
.cxx
vtkSMChartSeriesSelectionDomain
.cxx
vtkSMChartUseIndexForAxisDomain
.cxx
vtkSMComparativeAnimationCueProxy
.cxx
vtkSMComparativeAnimationCueUndoElement
.cxx
vtkSMComparativeViewProxy
.cxx
vtkSMContextViewProxy
.cxx
vtkSMDataDeliveryManager
.cxx
vtkSMFunctionalBagChartSeriesSelectionDomain
.cxx
vtkSMImplicitPlaneRepresentationProxy
.cxx
vtkSMLightProxy
.cxx
vtkSMMaterialDomain
.cxx
vtkSMMaterialLibraryProxy
.cxx
vtkSM
PVMoleculeRepresentation
Proxy
.cxx
vtkSM
MultiSliceView
Proxy
.cxx
vtkSM
NewWidgetRepresentation
Proxy
.cxx
vtkSM
OrthographicSliceView
Proxy
.cxx
vtkSMP
lotMatrixView
Proxy
.cxx
vtkSMP
VRepresentationProxy.cxx
vtkSM
Render
ViewProxy
.cxx
vtkSMRangedTransferFunctionDomain
.cxx
vtkSMRe
presentation
Proxy
.cxx
vtkSMRepresentation
TypeDomain.cxx
vtkSMRepresent
edArrayList
Domain
.cxx
vtkSM
SaveSc
reen
shotProxy.cxx
vtkSMS
calarBarWidgetRep
re
s
en
tation
Proxy
.cxx
vtkSMS
electionHelper.cxx
vtkSMSelection
Link.cxx
vtkSMS
preadSheetRepresentationProxy.cxx
vtkSMSpreadSheet
View
Proxy
.cxx
vtkSM
TextWidgetRepresentation
Proxy
.cxx
vtkSMT
ransferFunctionManager.cxx
vtkSMTransferFunction
Presets.cxx
vtkSMTransferFunctionPr
oxy.cxx
vtkSM
Utilities.cxx
vtkSM
ViewLayoutProxy.cxx
vtkSMViewProxy
.cxx
vtkSMViewProxy
InteractorHelper.cxx
vtkSMView
ResolutionDomain.cxx
vtkSM
WidgetRepresentationProxy.cxx
)
set
(
classes
vtkPVComparativeAnimationCue
vtkPVComparativeView
vtkPVRepresentedArrayListSettings
vtkSMBagChartSeriesListDomain
vtkSMBoxRepresentationProxy
vtkSMCameraLink
vtkSMCameraProxy
vtkSMChartRepresentationProxy
vtkSMChartSeriesListDomain
vtkSMChartSeriesSelectionDomain
vtkSMChartUseIndexForAxisDomain
vtkSMComparativeAnimationCueProxy
vtkSMComparativeAnimationCueUndoElement
vtkSMComparativeViewProxy
vtkSMContextViewProxy
vtkSMDataDeliveryManager
vtkSMFunctionalBagChartSeriesSelectionDomain
vtkSMImplicitPlaneRepresentationProxy
vtkSMLightProxy
vtkSMMaterialDomain
vtkSMMaterialLibraryProxy
vtkSM
MultiSliceView
Proxy
vtkSM
NewWidgetRepresentation
Proxy
vtkSM
OrthographicSliceView
Proxy
vtkSM
PVMoleculeRepresentation
Proxy
vtkSMP
VRepresentation
Proxy
vtkSMP
araViewPipelineControllerWithRendering
vtkSM
PlotMatrix
ViewProxy
vtkSMRangedTransferFunctionDomain
vtkSMRe
nderView
Proxy
vtkSMRepresentation
Proxy
vtkSMRepresent
ationType
Domain
vtkSM
Rep
re
s
en
tedArrayListDomain
vtkSMS
aveSc
reen
shot
Proxy
vtkSMS
calarBarWidgetRepresentationProxy
vtkSMSelection
Helper
vtkSMS
electionLink
vtkSMSpreadSheet
Representation
Proxy
vtkSM
SpreadSheetView
Proxy
vtkSMT
extWidgetRepresentationProxy
vtkSMTransferFunction
Manager
vtkSMTransferFunctionPr
esets
vtkSM
TransferFunctionProxy
vtkSM
Utilities
vtkSMView
Layout
Proxy
vtkSMViewProxy
vtkSMView
ProxyInteractorHelper
vtkSM
ViewResolutionDomain
vtkSMWidgetRepresentationProxy
)
if
(
PARAVIEW_ENABLE_PYTHON
)
list
(
APPEND Module_SRCS vtkSMPythonViewProxy.cxx
)
endif
()
if
(
TARGET ParaView::ClientServerCorePython
)
# TODO: Split these into a separate module so that there isn't a public
# optional dependency.
list
(
APPEND classes
vtkSMPythonViewProxy
)
endif
()
#-----------------------------------------------------------------------------
# Stuff for ObjectFactory override for vtkSMParaViewPipelineControllerWithRendering.
list
(
APPEND Module_SRCS
vtkSMParaViewPipelineControllerWithRendering.cxx
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
vtk-module
}
ObjectFactory.cxx
)
# Override some rendering classes. Create object factory:
set
(
vtk_module_overrides
"vtkSMParaViewPipelineController"
)
set
(
vtk_module_vtkSMParaViewPipelineController_override
"vtkSMParaViewPipelineControllerWithRendering"
)
# Now we iterate and create that class file...
foreach
(
_class
${
vtk_module_overrides
}
)
set
(
_override
${
vtk_module_
${
_class
}
_override
}
)
set
(
_vtk_override_includes
"
${
_vtk_override_includes
}
#include
\"
${
_override
}
.h
\"
"
)
set
(
_vtk_override_creates
"
${
_vtk_override_creates
}
VTK_CREATE_CREATE_FUNCTION(
${
_override
}
)"
)
set
(
_vtk_override_do
"
${
_vtk_override_do
}
this->RegisterOverride(
\"
${
_class
}
\"
,
\"
${
_override
}
\"
,
\"
Override for
${
vtk-module
}
module
\"
, 1,
vtkObjectFactoryCreate
${
_override
}
);"
)
endforeach
()
# Now lets create the object factory classes
string
(
TOUPPER
${
vtk-module
}
VTK-MODULE
)
configure_file
(
${
VTK_CMAKE_DIR
}
/vtkObjectFactory.h.in
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
vtk-module
}
ObjectFactory.h
)
configure_file
(
${
VTK_CMAKE_DIR
}
/vtkObjectFactory.cxx.in
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
vtk-module
}
ObjectFactory.cxx
)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Compile ColorMaps.json
add_custom_command
(
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/vtkSMTransferFunctionPresetsBuiltin.h
DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/ColorMaps.json
kw
ProcessXML
COMMAND
kw
ProcessXML
${
CMAKE_CURRENT_BINARY_DIR
}
/vtkSMTransferFunctionPresetsBuiltin.h
OUTPUT
"
${
CMAKE_CURRENT_BINARY_DIR
}
/vtkSMTransferFunctionPresetsBuiltin.h
"
DEPENDS
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/ColorMaps.json
"
ParaView::
ProcessXML
COMMAND
ParaView::
ProcessXML
"
${
CMAKE_CURRENT_BINARY_DIR
}
/vtkSMTransferFunctionPresetsBuiltin.h
"
vtkSMTransferFunctionPresets JSON JSON
${
CMAKE_CURRENT_SOURCE_DIR
}
/ColorMaps.json
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/ColorMaps.json
"
COMMENT
"Processing builtin color maps"
)
set
(
${
vtk-module
}
_HDRS
${
CMAKE_CURRENT_BINARY_DIR
}
/vtkSMTransferFunctionPresetsBuiltin.h
)
set_source_files_properties
(
${
CMAKE_CURRENT_BINARY_DIR
}
/vtkSMTransferFunctionPresetsBuiltin.h
HEADER_FILE_ONLY
)
#-----------------------------------------------------------------------------
vtk_module_library
(
vtkPVServerManagerRendering
${
Module_SRCS
}
)
set
(
headers
"
${
CMAKE_CURRENT_BINARY_DIR
}
/vtkSMTransferFunctionPresetsBuiltin.h"
)
vtk_object_factory_declare
(
BASE vtkSMParaViewPipelineController
OVERRIDE vtkSMParaViewPipelineControllerWithRendering
)
vtk_object_factory_configure
(
SOURCE_FILE vtk_object_factory_source
HEADER_FILE vtk_object_factory_header
EXPORT_MACRO
"VTKPVSERVERMANAGERRENDERING_EXPORT"
)
vtk_module_add_module
(
ParaView::ServerManagerRendering
CLASSES
${
classes
}
SOURCES
${
vtk_object_factory_source
}
HEADERS
${
headers
}
PRIVATE_HEADERS
${
vtk_object_factory_header
}
)
ParaViewCore/ServerManager/Rendering/Testing/CMakeLists.txt
0 → 100644
View file @
0f3f7e7e
add_subdirectory
(
Cxx
)
if
(
PARAVIEW_ENABLE_PYTHON
)
add_subdirectory
(
Python
)
endif
()
ParaViewCore/ServerManager/Rendering/Testing/Cxx/CMakeLists.txt
View file @
0f3f7e7e
paraview
_add_test_cxx
(
${
vtk
-module
}
CxxTests tests
vtk
_add_test_cxx
(
vtk
PVServerManagerRendering
CxxTests tests
NO_DATA NO_OUTPUT NO_VALID
TestImageScaleFactors.cxx
TestParaViewPipelineControllerWithRendering.cxx
TestTransferFunctionManager.cxx
TestTransferFunctionPresets.cxx
)
vtk_test_cxx_executable
(
${
vtk
-module
}
CxxTests tests
)
vtk_test_cxx_executable
(
vtk
PVServerManagerRendering
CxxTests tests
)
ParaViewCore/ServerManager/Rendering/module.cmake
deleted
100644 → 0
View file @
e1c07bc1
set
(
__dependencies
)
if
(
PARAVIEW_USE_OSPRAY
)
list
(
APPEND __dependencies vtkRenderingOSPRay
)
endif
()
vtk_module
(
vtkPVServerManagerRendering
GROUPS
ParaViewRendering
IMPLEMENTS
vtkPVServerManagerCore
DEPENDS
vtkPVServerImplementationRendering
vtkPVServerManagerCore
vtkjsoncpp
${
__dependencies
}
PRIVATE_DEPENDS
vtkCommonColor
vtksys
COMPILE_DEPENDS
vtkUtilitiesProcessXML
TEST_DEPENDS
vtkPVServerManagerApplication
TEST_LABELS
PARAVIEW
KIT
vtkPVServerManager
)
ParaViewCore/ServerManager/Rendering/vtk.module
0 → 100644
View file @
0f3f7e7e
NAME
ParaView
::
ServerManagerRendering
LIBRARY_NAME
vtkPVServerManagerRendering
GROUPS
ParaViewRendering
KIT
ParaView
::
ServerManager
IMPLEMENTS
ParaView
::
ServerManagerCore
DEPENDS
ParaView
::
ServerImplementationRendering
ParaView
::
ServerManagerCore
VTK
::
jsoncpp
PRIVATE_DEPENDS
VTK
::
CommonColor
VTK
::
vtksys
OPTIONAL_DEPENDS
VTK
::
RenderingOSPRay
# These affect the public API.
ParaView
::
ClientServerCorePython
TEST_DEPENDS
ParaView
::
ServerManagerApplication
VTK
::
TestingCore
TEST_LABELS
ParaView
ParaViewCore/ServerManager/Rendering/vtkSMMaterialDomain.cxx
View file @
0f3f7e7e
...
...
@@ -26,7 +26,7 @@
#include "vtkPVConfig.h"
#if
def PARAVIEW_USE_
OSPR
AY
#if
VTK_MODULE_ENABLE_VTK_Rendering
OSPR
ay
#include "vtkOSPRayMaterialLibrary.h"
#endif
...
...
@@ -42,7 +42,7 @@ public:
vtkSMMaterialObserver
()
{
this
->
Owner
=
nullptr
;
#if
def PARAVIEW_USE_
OSPR
AY
#if
VTK_MODULE_ENABLE_VTK_Rendering
OSPR
ay
this
->
Watchee
=
nullptr
;
#endif
}
...
...
@@ -56,7 +56,7 @@ public:
void
StartWatching
()
{
#if
def PARAVIEW_USE_
OSPR
AY
#if
VTK_MODULE_ENABLE_VTK_Rendering
OSPR
ay
vtkNew
<
vtkSMParaViewPipelineController
>
controller
;
vtkSMMaterialLibraryProxy
*
mlp
=
vtkSMMaterialLibraryProxy
::
SafeDownCast
(
controller
->
FindMaterialLibrary
(
this
->
Owner
->
GetSession
()));
...
...
@@ -74,7 +74,7 @@ public:
}
void
StopWatching
()
{
#if
def PARAVIEW_USE_
OSPR
AY
#if
VTK_MODULE_ENABLE_VTK_Rendering
OSPR
ay
if
(
this
->
Watchee
)
{
this
->
Watchee
->
RemoveObserver
(
this
);
...
...
@@ -82,7 +82,7 @@ public:
#endif
}
vtkWeakPointer
<
vtkSMMaterialDomain
>
Owner
;
#if
def PARAVIEW_USE_
OSPR
AY
#if
VTK_MODULE_ENABLE_VTK_Rendering
OSPR
ay
vtkWeakPointer
<
vtkOSPRayMaterialLibrary
>
Watchee
;
#endif
};
...
...
@@ -113,7 +113,7 @@ void vtkSMMaterialDomain::PrintSelf(ostream& os, vtkIndent indent)
//---------------------------------------------------------------------------
int
vtkSMMaterialDomain
::
ReadXMLAttributes
(
vtkSMProperty
*
prop
,
vtkPVXMLElement
*
element
)
{
#if
def PARAVIEW_USE_
OSPR
AY
#if
VTK_MODULE_ENABLE_VTK_Rendering
OSPR
ay
int
retVal
=
this
->
Superclass
::
ReadXMLAttributes
(
prop
,
element
);
if
(
!
retVal
)
{
...
...
@@ -142,7 +142,7 @@ void vtkSMMaterialDomain::CallMeSometime()
//---------------------------------------------------------------------------
void
vtkSMMaterialDomain
::
Update
(
vtkSMProperty
*
vtkNotUsed
(
prop
))
{
#if
def PARAVIEW_USE_
OSPR
AY
#if
VTK_MODULE_ENABLE_VTK_Rendering
OSPR
ay
// find the material library we reflect contents of
vtkNew
<
vtkSMParaViewPipelineController
>
controller
;
vtkSMMaterialLibraryProxy
*
mlp
=
...
...
ParaViewCore/ServerManager/Rendering/vtkSMMaterialLibraryProxy.cxx
View file @
0f3f7e7e
...
...
@@ -25,7 +25,7 @@
#include "vtkSMSession.h"
#include "vtkSmartPointer.h"
#if
def PARAVIEW_USE_
OSPR
AY
#if
VTK_MODULE_ENABLE_VTK_Rendering
OSPR
ay
#include "vtkOSPRayMaterialLibrary.h"
#endif
...
...
@@ -43,7 +43,7 @@ vtkSMMaterialLibraryProxy::~vtkSMMaterialLibraryProxy()
//-----------------------------------------------------------------------------
void
vtkSMMaterialLibraryProxy
::
LoadMaterials
(
const
char
*
filename
)
{
#if
def PARAVIEW_USE_
OSPR
AY
#if
VTK_MODULE_ENABLE_VTK_Rendering
OSPR
ay
vtkClientServerStream
stream
;
stream
<<
vtkClientServerStream
::
Invoke
<<
VTKOBJECT
(
this
)
<<
"ReadFile"
<<
filename
<<
vtkClientServerStream
::
End
;
...
...
@@ -59,7 +59,7 @@ void vtkSMMaterialLibraryProxy::LoadMaterials(const char* filename)
//-----------------------------------------------------------------------------
void
vtkSMMaterialLibraryProxy
::
LoadDefaultMaterials
()
{
#if
def PARAVIEW_USE_
OSPR
AY
#if
VTK_MODULE_ENABLE_VTK_Rendering
OSPR
ay
// todo: this should be relative to binary or in prefs/settings, see pq
vtkClientServerStream
stream
;
stream
<<
vtkClientServerStream
::
Invoke
<<
VTKOBJECT
(
this
)
<<
"ReadRelativeFile"
...
...
@@ -73,7 +73,7 @@ void vtkSMMaterialLibraryProxy::LoadDefaultMaterials()
//-----------------------------------------------------------------------------
void
vtkSMMaterialLibraryProxy
::
Synchronize
()
{
#if
def PARAVIEW_USE_
OSPR
AY
#if
VTK_MODULE_ENABLE_VTK_Rendering
OSPR
ay
bool
builtinMode
=
false
;
if
(
!
this
->
GetSession
()
||
(
this
->
GetSession
()
->
GetProcessRoles
()
&
vtkPVSession
::
SERVERS
)
!=
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment