[Paraview] pvpython rendering

Milan Frank milan.frank at gmail.com
Fri Apr 7 06:28:11 EDT 2006


Hi all,

I'm trying to render a simple sphere with the pvpython interpreter.
Does anyone know what I'm doing wrong?

a) I was expecting a sphere to be displayed ...
b) I was expecting interactivity from the renderer window ...

I have the following piece of code:

from vtkPVServerCommonPython import *
from vtkPVServerManagerPython import *

import msvcrt

pm = vtkSMObject.GetProxyManager()

ss = pm.NewProxy("sources", "SphereSource")
pm.RegisterProxy("sources", "SphereSource0", ss)

ef = pm.NewProxy("filters", "ElevationFilter")
pm.RegisterProxy("filters", "ElevationFilter0", ef)

ef.AddInput(ss, "SetInput", 0)

rm = pm.NewProxy("rendermodules", "LODRenderModule")
rm.UpdateVTKObjects()

sd = rm.CreateDisplayProxy()
sd.SetInput(ef)

rm.AddDisplay(sd)

rm.ResetCamera()
rm.InteractiveRender()

msvcrt.getch()

The resulting window is in the screen.png picture.

Thanks for any advices and/or comments,
Milan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen.png
Type: image/png
Size: 8197 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/paraview/attachments/20060407/ef1e989a/screen-0001.png


More information about the ParaView mailing list