Commit 24042283 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot

Merge topic 'add_vtkmodules_packages'

11df7810 Update doc string for vtkmodules.
d16bf180 Avoid `import vtk` in `vtk.util.misc`
51399f19 Fix LagrangeGeometricOperations imports.
ad5b8d89 fix invalid `vtk.vtk....` usage in spatialRepAll.
5ab44fb6 Make `vtk` pseudo-package.
1b707373 import vtkCommonCore instead of `vtk` in vtkVariant.py
741fffbf Add new `vtkmodules` package.
bc78b766 Split `vtk_module_python_module`.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Berk Geveci's avatarBerk Geveci <berk.geveci@kitware.com>
Acked-by: Jean-Christophe Fillion-Robin's avatarJean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
Merge-request: !3674
parents 02c1bb10 11df7810
......@@ -173,10 +173,12 @@ function (vtk_module_python_module name)
if(NOT "${name}" STREQUAL "${vtk-module}")
message(FATAL_ERROR "vtk_module_library must be invoked with module name")
endif()
vtk_module_impl()
vtk_module_export("")
vtk_python_module(${name} ${ARGN})
endfunction()
function(vtk_python_module name)
set(_modules)
set(_no_install)
set(_can_use_system)
......
......@@ -170,11 +170,11 @@ function(_vtk_add_python_module name)
endif()
# build python module libraries under the ${VTK_BUILD_PYTHON_MODULES_DIR} dir.
set_target_properties(${name}
PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${VTK_BUILD_PYTHON_MODULES_DIR}/vtk)
PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${VTK_BUILD_PYTHON_MODULES_DIR}/vtkmodules)
if (NOT VTK_INSTALL_NO_RUNTIME)
install(TARGETS ${name}
RUNTIME DESTINATION ${VTK_INSTALL_PYTHON_MODULES_DIR}/vtk COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${VTK_INSTALL_PYTHON_MODULES_DIR}/vtk COMPONENT RuntimeLibraries
RUNTIME DESTINATION ${VTK_INSTALL_PYTHON_MODULES_DIR}/vtkmodules COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${VTK_INSTALL_PYTHON_MODULES_DIR}/vtkmodules COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${VTK_INSTALL_ARCHIVE_DIR} COMPONENT Development
)
endif()
......
......@@ -53,7 +53,7 @@ class spatialRepAll(vtk.test.Testing.vtkTest):
locator[idx].AutomaticOff()
locator[idx].SetMaxLevel(3)
boxes.append(vtk.vtk.vtkSpatialRepresentationFilter())
boxes.append(vtk.vtkSpatialRepresentationFilter())
boxes[idx].SetInputConnection(asource.GetOutputPort())
boxes[idx].SetSpatialRepresentation(locator[idx])
boxes[idx].SetGenerateLeaves(1)
......
......@@ -128,8 +128,8 @@ class LagrangeGeometricOperations(Testing.vtkTest):
self.rw.Render()
image = 'LagrangeGeometricOperations-Contour.png'
# events = self.prepareTestImage(self.ri, filename=os.path.join('/tmp', image))
vtk.test.Testing.compareImage(self.rw, self.pathToValidatedOutput(image))
# vtk.test.Testing.interact()
Testing.compareImage(self.rw, self.pathToValidatedOutput(image))
# Testing.interact()
## Write the contours out
# wri = vtkXMLPolyDataWriter()
......@@ -172,8 +172,8 @@ class LagrangeGeometricOperations(Testing.vtkTest):
self.rw.Render()
image = 'LagrangeGeometricOperations-Boundary.png'
#events = self.prepareTestImage(self.ri, filename=os.path.join('/tmp', image))
vtk.test.Testing.compareImage(self.rw, self.pathToValidatedOutput(image))
# vtk.test.Testing.interact()
Testing.compareImage(self.rw, self.pathToValidatedOutput(image))
# Testing.interact()
@unittest.skipIf(renderWindowTooSmall(), 'Cannot render at requested size')
def testClip(self):
......@@ -223,8 +223,8 @@ class LagrangeGeometricOperations(Testing.vtkTest):
self.rw.Render()
image = 'LagrangeGeometricOperations-Clip.png'
# events = self.prepareTestImage(self.ri, filename=os.path.join('/tmp', image))
vtk.test.Testing.compareImage(self.rw, self.pathToValidatedOutput(image))
# vtk.test.Testing.interact()
Testing.compareImage(self.rw, self.pathToValidatedOutput(image))
# Testing.interact()
# ri.Start()
......@@ -274,8 +274,8 @@ class LagrangeGeometricOperations(Testing.vtkTest):
self.rw.Render()
image = 'LagrangeGeometricOperations-Cut.png'
# events = self.prepareTestImage(self.ri, filename=os.path.join('/tmp', image))
vtk.test.Testing.compareImage(self.rw, self.pathToValidatedOutput(image))
# vtk.test.Testing.interact()
Testing.compareImage(self.rw, self.pathToValidatedOutput(image))
# Testing.interact()
@unittest.skipIf(numpyMissing, 'Numpy unavailable')
@unittest.skipIf(renderWindowTooSmall(), 'Cannot render at requested size')
......@@ -319,8 +319,9 @@ class LagrangeGeometricOperations(Testing.vtkTest):
# al.GetProperty().SetColor(0.5, 0.5, 0.5)
ug = self.rdr.GetOutputDataObject(0)
tt = vtk.mutable(0)
subId = vtk.mutable(-1)
from vtkmodules.vtkCommonCore import mutable
tt = mutable(0)
subId = mutable(-1)
xx = [0,0,0]
rr = [0,0,0]
ipt = vtkPoints()
......@@ -407,7 +408,7 @@ class LagrangeGeometricOperations(Testing.vtkTest):
self.rw.Render()
image = 'LagrangeGeometricOperations-Stab{c}.png'.format(c=color)
# events = self.prepareTestImage(self.ri, filename=os.path.join('/tmp', image))
vtk.test.Testing.compareImage(self.rw, self.pathToValidatedOutput(image))
Testing.compareImage(self.rw, self.pathToValidatedOutput(image))
if __name__ == "__main__":
Testing.main([(LagrangeGeometricOperations, 'test')])
......@@ -651,7 +651,7 @@ void vtkPythonInterpreter::SetupVTKPythonPaths()
vtkNew<vtkResourceFileLocator> locator;
locator->SetPrintDebugInformation(vtkPythonInterpreter::GetPythonVerboseFlag() > 1);
std::string path = locator->Locate(vtkdir, prefixes, "vtk/__init__.py");
std::string path = locator->Locate(vtkdir, prefixes, "vtkmodules/__init__.py");
if (!path.empty())
{
vtkSafePrependPythonPath(path);
......
......@@ -7,7 +7,7 @@ include(vtkModuleMacrosPython)
# The RELATIVE make vtk_module_python_package() preserve the vtk/module package
# structure when building/installing. Otherwise, we'd just get the "web"
# package.
vtk_module_python_package(${vtk-module} "vtk/web"
vtk_module_python_package(${vtk-module} "vtkmodules/web"
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}")
if(BUILD_TESTING)
......
......@@ -276,21 +276,21 @@ unset(configured_py_files)
foreach(module IN LISTS VTK_PYTHON_MODULES_AND_KITS)
set(VTK_PYTHON_IMPORT_ALL
"${VTK_PYTHON_IMPORT_ALL}from .${module} import *\n")
configure_file(vtk/module.py.in
"${CMAKE_CURRENT_BINARY_DIR}/vtk/${module}.py" @ONLY)
list(APPEND configured_py_files "${CMAKE_CURRENT_BINARY_DIR}/vtk/${module}.py")
configure_file(vtkmodules/module.py.in
"${CMAKE_CURRENT_BINARY_DIR}/vtkmodules/${module}.py" @ONLY)
list(APPEND configured_py_files "${CMAKE_CURRENT_BINARY_DIR}/vtkmodules/${module}.py")
endforeach()
configure_file(vtk/__init__.py.in
"${CMAKE_CURRENT_BINARY_DIR}/vtk/__init__.py" @ONLY)
list(APPEND configured_py_files "${CMAKE_CURRENT_BINARY_DIR}/vtk/__init__.py")
configure_file(vtkmodules/all.py.in
"${CMAKE_CURRENT_BINARY_DIR}/vtkmodules/all.py" @ONLY)
list(APPEND configured_py_files "${CMAKE_CURRENT_BINARY_DIR}/vtkmodules/all.py")
# Kit module adapters
foreach(kit IN LISTS vtk_kits)
set(_module_kit ${kit}${VTK_KIT_SUFFIX})
foreach(dep IN LISTS _${kit}_modules)
configure_file(vtk/kit_module__init__.py.in
"${CMAKE_CURRENT_BINARY_DIR}/vtk/${dep}.py" @ONLY)
list(APPEND configured_py_files "${CMAKE_CURRENT_BINARY_DIR}/vtk/${dep}.py")
configure_file(vtkmodules/kit_module.py.in
"${CMAKE_CURRENT_BINARY_DIR}/vtkmodules/${dep}.py" @ONLY)
list(APPEND configured_py_files "${CMAKE_CURRENT_BINARY_DIR}/vtkmodules/${dep}.py")
endforeach()
unset(_module_kit)
endforeach()
......@@ -298,14 +298,15 @@ endforeach()
# Now copy configured files to build-cfg specific dir.
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copy-complete"
COMMAND ${CMAKE_COMMAND}
-E copy_directory "${CMAKE_CURRENT_BINARY_DIR}/vtk" "${VTK_BUILD_PYTHON_MODULES_DIR}/vtk"
-E copy_directory "${CMAKE_CURRENT_BINARY_DIR}/vtkmodules" "${VTK_BUILD_PYTHON_MODULES_DIR}/vtkmodules"
COMMAND ${CMAKE_COMMAND}
-E touch "${CMAKE_CURRENT_BINARY_DIR}/copy-complete"
DEPENDS ${configured_py_files})
# Build all py files that form the `vtk` package.
vtk_python_package(vtkpython_pyc vtk DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/copy-complete")
vtk_python_package(vtkpython_pyc vtkmodules DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/copy-complete")
vtk_python_module(vtk_python_module vtk.py)
# Let's add a target that generates the `vtk` python package
# including all the platform dependent and independent modules.
......
import compileall
compileall.compile_dir('@VTK_BINARY_DIR@/Wrapping/Python')
file = open('@VTK_BINARY_DIR@/Wrapping/Python/vtk_compile_complete', 'w')
file.write('Done')
"""This is the vtk module."""
import sys, importlib
vtkmodules = importlib.import_module("vtkmodules")
vtkmodules_all = importlib.import_module("vtkmodules.all")
# merge components from `all` to `vtkmodules` package.
for key in dir(vtkmodules_all):
if not hasattr(vtkmodules, key):
setattr(vtkmodules, key, getattr(vtkmodules_all, key))
# replace ourselves with the `vtkmodules` package. This is essential
# to ensure the importing of other modules/packages from `vtkmodules`
# works seamlessly when accessed via `vtk` pseudo-package.
sys.modules[__name__] = vtkmodules
r"""
Currently, this package is experimental and may change in the future.
"""
......@@ -681,4 +681,3 @@ if __name__ == "__main__":
# Test with the above trivial sample test.
main( [ (SampleTest, 'test') ] )
......@@ -368,4 +368,3 @@ if __name__ == "__main__":
button.pack(fill='x')
frame.mainloop()
......@@ -470,4 +470,3 @@ def vtkRenderWidgetConeExample():
if __name__ == "__main__":
vtkRenderWidgetConeExample()
......@@ -400,4 +400,3 @@ def vtkRenderWindowInteractorConeExample():
if __name__ == "__main__":
vtkRenderWindowInteractorConeExample()
"""Miscellaneous functions and classes that don't fit into specific
categories."""
import sys, os, vtk
import sys, os
def calldata_type(type):
"""set_call_data_type(type) -- convenience decorator to easily set the CallDataType attribute
......@@ -18,7 +18,10 @@ def calldata_type(type):
lt.AddObserver(vtk.vtkCommand.ErrorEvent, onError)
lt.SetTableRange(2,1)
"""
supported_call_data_types = ['string0', vtk.VTK_STRING, vtk.VTK_OBJECT, vtk.VTK_INT, vtk.VTK_LONG, vtk.VTK_DOUBLE, vtk.VTK_FLOAT]
from vtk import vtkCommonCore
supported_call_data_types = ['string0', vtkCommonCore.VTK_STRING,
vtkCommonCore.VTK_OBJECT, vtkCommonCore.VTK_INT,
vtkCommonCore.VTK_LONG, vtkCommonCore.VTK_DOUBLE, vtkCommonCore.VTK_FLOAT]
if type not in supported_call_data_types:
raise TypeError("'%s' is not a supported VTK call data type. Supported types are: %s" % (type, supported_call_data_types))
def wrap(f):
......@@ -69,6 +72,10 @@ def vtkRegressionTestImage( renWin ):
This function writes out a regression .png file for a vtkWindow.
Does anyone involved in testing care to elaborate?
"""
from vtkmodules.vtkRenderingCore import vtkWindowToImageFilter
from vtkmodules.vtkIOImage import vtkPNGReader
from vtkmodules.vtkImagingCore import vtkImageDifference
imageIndex=-1;
for i in range(0, len(sys.argv)):
if sys.argv[i] == '-V' and i < len(sys.argv)-1:
......@@ -77,22 +84,22 @@ def vtkRegressionTestImage( renWin ):
if imageIndex != -1:
fname = os.path.join(vtkGetDataRoot(), sys.argv[imageIndex])
rt_w2if = vtk.vtkWindowToImageFilter()
rt_w2if = vtkWindowToImageFilter()
rt_w2if.SetInput(renWin)
if os.path.isfile(fname):
pass
else:
rt_pngw = vtk.vtkPNGWriter()
rt_pngw = vtkPNGWriter()
rt_pngw.SetFileName(fname)
rt_pngw.SetInputConnection(rt_w2if.GetOutputPort())
rt_pngw.Write()
rt_pngw = None
rt_png = vtk.vtkPNGReader()
rt_png = vtkPNGReader()
rt_png.SetFileName(fname)
rt_id = vtk.vtkImageDifference()
rt_id = vtkImageDifference()
rt_id.SetInputConnection(rt_w2if.GetOutputPort())
rt_id.SetImageConnection(rt_png.GetOutputPort())
rt_id.Update()
......
......@@ -2,68 +2,68 @@
Utility functions to mimic the template support functions for vtkVariant
"""
import vtk
from .. import vtkCommonCore
import sys
_variant_type_map = {
'void' : vtk.VTK_VOID,
'char' : vtk.VTK_CHAR,
'unsigned char' : vtk.VTK_UNSIGNED_CHAR,
'signed char' : vtk.VTK_SIGNED_CHAR,
'short' : vtk.VTK_SHORT,
'unsigned short' : vtk.VTK_UNSIGNED_SHORT,
'int' : vtk.VTK_INT,
'unsigned int' : vtk.VTK_UNSIGNED_INT,
'long' : vtk.VTK_LONG,
'unsigned long' : vtk.VTK_UNSIGNED_LONG,
'long long' : vtk.VTK_LONG_LONG,
'unsigned long long' : vtk.VTK_UNSIGNED_LONG_LONG,
'float' : vtk.VTK_FLOAT,
'double' : vtk.VTK_DOUBLE,
'string' : vtk.VTK_STRING,
'unicode string' : vtk.VTK_UNICODE_STRING,
'vtkObjectBase' : vtk.VTK_OBJECT,
'vtkObject' : vtk.VTK_OBJECT,
'void' : vtkCommonCore.VTK_VOID,
'char' : vtkCommonCore.VTK_CHAR,
'unsigned char' : vtkCommonCore.VTK_UNSIGNED_CHAR,
'signed char' : vtkCommonCore.VTK_SIGNED_CHAR,
'short' : vtkCommonCore.VTK_SHORT,
'unsigned short' : vtkCommonCore.VTK_UNSIGNED_SHORT,
'int' : vtkCommonCore.VTK_INT,
'unsigned int' : vtkCommonCore.VTK_UNSIGNED_INT,
'long' : vtkCommonCore.VTK_LONG,
'unsigned long' : vtkCommonCore.VTK_UNSIGNED_LONG,
'long long' : vtkCommonCore.VTK_LONG_LONG,
'unsigned long long' : vtkCommonCore.VTK_UNSIGNED_LONG_LONG,
'float' : vtkCommonCore.VTK_FLOAT,
'double' : vtkCommonCore.VTK_DOUBLE,
'string' : vtkCommonCore.VTK_STRING,
'unicode string' : vtkCommonCore.VTK_UNICODE_STRING,
'vtkObjectBase' : vtkCommonCore.VTK_OBJECT,
'vtkObject' : vtkCommonCore.VTK_OBJECT,
}
_variant_method_map = {
vtk.VTK_VOID : '',
vtk.VTK_CHAR : 'ToChar',
vtk.VTK_UNSIGNED_CHAR : 'ToUnsignedChar',
vtk.VTK_SIGNED_CHAR : 'ToSignedChar',
vtk.VTK_SHORT : 'ToShort',
vtk.VTK_UNSIGNED_SHORT : 'ToUnsignedShort',
vtk.VTK_INT : 'ToInt',
vtk.VTK_UNSIGNED_INT : 'ToUnsignedInt',
vtk.VTK_LONG : 'ToLong',
vtk.VTK_UNSIGNED_LONG : 'ToUnsignedLong',
vtk.VTK_LONG_LONG : 'ToLongLong',
vtk.VTK_UNSIGNED_LONG_LONG : 'ToUnsignedLongLong',
vtk.VTK_FLOAT : 'ToFloat',
vtk.VTK_DOUBLE : 'ToDouble',
vtk.VTK_STRING : 'ToString',
vtk.VTK_UNICODE_STRING : 'ToUnicodeString',
vtk.VTK_OBJECT : 'ToVTKObject',
vtkCommonCore.VTK_VOID : '',
vtkCommonCore.VTK_CHAR : 'ToChar',
vtkCommonCore.VTK_UNSIGNED_CHAR : 'ToUnsignedChar',
vtkCommonCore.VTK_SIGNED_CHAR : 'ToSignedChar',
vtkCommonCore.VTK_SHORT : 'ToShort',
vtkCommonCore.VTK_UNSIGNED_SHORT : 'ToUnsignedShort',
vtkCommonCore.VTK_INT : 'ToInt',
vtkCommonCore.VTK_UNSIGNED_INT : 'ToUnsignedInt',
vtkCommonCore.VTK_LONG : 'ToLong',
vtkCommonCore.VTK_UNSIGNED_LONG : 'ToUnsignedLong',
vtkCommonCore.VTK_LONG_LONG : 'ToLongLong',
vtkCommonCore.VTK_UNSIGNED_LONG_LONG : 'ToUnsignedLongLong',
vtkCommonCore.VTK_FLOAT : 'ToFloat',
vtkCommonCore.VTK_DOUBLE : 'ToDouble',
vtkCommonCore.VTK_STRING : 'ToString',
vtkCommonCore.VTK_UNICODE_STRING : 'ToUnicodeString',
vtkCommonCore.VTK_OBJECT : 'ToVTKObject',
}
_variant_check_map = {
vtk.VTK_VOID : 'IsValid',
vtk.VTK_CHAR : 'IsChar',
vtk.VTK_UNSIGNED_CHAR : 'IsUnsignedChar',
vtk.VTK_SIGNED_CHAR : 'IsSignedChar',
vtk.VTK_SHORT : 'IsShort',
vtk.VTK_UNSIGNED_SHORT : 'IsUnsignedShort',
vtk.VTK_INT : 'IsInt',
vtk.VTK_UNSIGNED_INT : 'IsUnsignedInt',
vtk.VTK_LONG : 'IsLong',
vtk.VTK_UNSIGNED_LONG : 'IsUnsignedLong',
vtk.VTK_LONG_LONG : 'IsLongLong',
vtk.VTK_UNSIGNED_LONG_LONG : 'IsUnsignedLongLong',
vtk.VTK_FLOAT : 'IsFloat',
vtk.VTK_DOUBLE : 'IsDouble',
vtk.VTK_STRING : 'IsString',
vtk.VTK_UNICODE_STRING : 'IsUnicodeString',
vtk.VTK_OBJECT : 'IsVTKObject',
vtkCommonCore.VTK_VOID : 'IsValid',
vtkCommonCore.VTK_CHAR : 'IsChar',
vtkCommonCore.VTK_UNSIGNED_CHAR : 'IsUnsignedChar',
vtkCommonCore.VTK_SIGNED_CHAR : 'IsSignedChar',
vtkCommonCore.VTK_SHORT : 'IsShort',
vtkCommonCore.VTK_UNSIGNED_SHORT : 'IsUnsignedShort',
vtkCommonCore.VTK_INT : 'IsInt',
vtkCommonCore.VTK_UNSIGNED_INT : 'IsUnsignedInt',
vtkCommonCore.VTK_LONG : 'IsLong',
vtkCommonCore.VTK_UNSIGNED_LONG : 'IsUnsignedLong',
vtkCommonCore.VTK_LONG_LONG : 'IsLongLong',
vtkCommonCore.VTK_UNSIGNED_LONG_LONG : 'IsUnsignedLongLong',
vtkCommonCore.VTK_FLOAT : 'IsFloat',
vtkCommonCore.VTK_DOUBLE : 'IsDouble',
vtkCommonCore.VTK_STRING : 'IsString',
vtkCommonCore.VTK_UNICODE_STRING : 'IsUnicodeString',
vtkCommonCore.VTK_OBJECT : 'IsVTKObject',
}
......@@ -77,7 +77,7 @@ def vtkVariantCreate(v, t):
if not issubclass(type(t), int):
t = _variant_type_map[t]
return vtk.vtkVariant(v, t)
return vtkCommonCore.vtkVariant(v, t)
def vtkVariantExtract(v, t=None):
......@@ -88,7 +88,7 @@ def vtkVariantExtract(v, t=None):
integer VTK type constant for the type. Set the type to 'None" to
extract the value in its native type.
"""
v = vtk.vtkVariant(v)
v = vtkCommonCore.vtkVariant(v)
if t == None:
t = v.GetType()
......@@ -111,7 +111,7 @@ def vtkVariantCast(v, t):
if not issubclass(type(t), int):
t = _variant_type_map[t]
v = vtk.vtkVariant(v, t)
v = vtkCommonCore.vtkVariant(v, t)
if v.IsValid():
return getattr(v, _variant_method_map[t])()
......@@ -127,8 +127,8 @@ def vtkVariantStrictWeakOrder(s1, s2):
This is in contrast with the Python 3 version of this method (and the
VTK C++ version), which return true or false.
"""
s1 = vtk.vtkVariant(s1)
s2 = vtk.vtkVariant(s2)
s1 = vtkCommonCore.vtkVariant(s1)
s2 = vtkCommonCore.vtkVariant(s2)
t1 = s1.GetType()
t2 = s2.GetType()
......@@ -156,7 +156,7 @@ def vtkVariantStrictWeakOrder(s1, s2):
r2 = getattr(s2, _variant_method_map[t2])()
# compare vtk objects by classname, then address
if t1 == vtk.VTK_OBJECT:
if t1 == vtkCommonCore.VTK_OBJECT:
c1 = r1.GetClassName()
c2 = r2.GetClassName()
if c1 != c2:
......@@ -197,8 +197,8 @@ def vtkVariantStrictEquality(s1, s2):
"""
Check two variants for strict equality of type and value.
"""
s1 = vtk.vtkVariant(s1)
s2 = vtk.vtkVariant(s2)
s1 = vtkCommonCore.vtkVariant(s1)
s2 = vtkCommonCore.vtkVariant(s2)
t1 = s1.GetType()
t2 = s2.GetType()
......@@ -227,12 +227,11 @@ def vtkVariantLessThan(s1, s2):
"""
Return true if s1 < s2.
"""
return (vtk.vtkVariant(s1) < vtk.vtkVariant(s2))
return (vtkCommonCore.vtkVariant(s1) < vtkCommonCore.vtkVariant(s2))
def vtkVariantEqual(s1, s2):
"""
Return true if s1 == s2.
"""
return (vtk.vtkVariant(s1) == vtk.vtkVariant(s2))
return (vtkCommonCore.vtkVariant(s1) == vtkCommonCore.vtkVariant(s2))
......@@ -703,4 +703,3 @@ def wxVTKRenderWindowInteractorConeExample():
if __name__ == "__main__":
wxVTKRenderWindowInteractorConeExample()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment