[vtkusers] TypeError: cannot create 'vtkclass' instances
    Prabhu Ramachandran 
    prabhu at aero.iitm.ernet.in
       
    Mon Jan  6 08:38:39 EST 2003
    
    
  
>>>>> "SGD" == sebastien gd <sebastien_gd at yahoo.fr> writes:
    SGD> Hello I begin with python and I have this problem.  I wand to
    SGD> create a new vtkInteractorStyle so I have creae a nex class
    SGD> like this from vtkpython import *
    SGD> class sliceInteractorStyle(vtkInteractorStyleSwitch) :
Nope, you can't do that.  Read this for more details:
  http://public.kitware.com/cgi-bin/cvsweb.cgi/vtk/python/python.txt
In order to do what you need you can use the approach specified in the
above url or easier still define a function to handle your OnChar and
then add an observer to the renderwindow for the KeyPress/whatever
event.  The examples in VTK CVS should give you some idea of how to do
this -- look at Examples/GUI/Python/CustomInteraction.py.
cheers,
prabhu
    
    
More information about the vtkusers
mailing list