[vtk-developers] Subclassing vtkRenderPass in python

Michael Hogg michael.christopher.hogg at gmail.com
Sat Jan 10 07:20:45 EST 2015


Hi,

Can anyone tell me how to subclass vtkRenderPass in python? I have tried to
create subclass myRenderPass, but when I try to create an instance of this
class Python just crashes with no warnings / messages.

This is what I did:

import vtk

class myRenderPass(vtk.vtkRenderPass):
    def __init__(self):
        super(myRenderPass,self).__init__(self)
    def Render(self,s):
        self.DelegatePass.Render(s)
        self.NumberOfRenderedProps =
self.DelegatePass.GetNumberOfRenderedProps()

myRenderPass()

Could anyone offer some suggestions? I know that vtkRenderPass is an
abstract class, so I may not be defining one of these virtual functions.
But from the C++ code, it appears that only Render() must be defined.

Cheers,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150110/708f4dd0/attachment.html>


More information about the vtk-developers mailing list