[vtkusers] subclassing vtk classes from python works in 5.0.3 but not 5.0.4 - bug or unsupported behavior?
Carlos Scheidegger
cscheid at sci.utah.edu
Wed May 27 00:45:39 EDT 2009
Hi,
In some code we have, we use the following piece of python:
class vtkImagePlaneWidget_fixed(vtk.vtkImagePlaneWidget):
def SetLookupTable(self, lookup_table):
self.UserControlledLookupTableOn()
vtk.vtkImagePlaneWidget.SetLookupTable(self, lookup_table)
description[vtkImagePlaneWidget_fixed] = vtk.vtkImagePlaneWidget
This works fine in VTK 5.0.3 (in particular, in the version that ships with
Ubuntu 8.10 and 8.04). However, in VTK 5.0.4, the class definition is accepted
without error, but as soon as we try to reference it, we get
>>> description[vtkImagePlaneWidget_fixed] = vtk.vtkImagePlaneWidget
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: mro
Do you guys see similar behavior? Is this a bug or did it only work on
previous VTK versions because of unsupported behavior?
Thanks!
-carlos
More information about the vtkusers
mailing list