Hi everybody, 
I wrote this code that create a scene and add a vtkUnstructuredGrid to
it:
Note: the object i pass to AddGridToScene (cloud) is derived from
vtkUnstructuredGrid, so i need to call AsVTK() for passing it to the
to_tvtk function:

class RenderWindow:
        def __init__(self):
                self.engine = Engine()
                self.engine.start()    
                if len(self.engine.scenes) == 0:
                        self.engine.new_scene()
                
                self.scene = self.engine.scenes[0]
                
                self.scene.scene.disable_render = True
                
                #set up initial props
                self.scene.scene.background = (0,0,0)
                self.scene.scene.parallel_projection = True
                self.scene.scene.x_minus_view()
                self.xrotation = 0
                self.yrotation = 0
                self.PointPicker = PointPicker(self)
                self.scene.scene.disable_render = False

                
        def AddGridToScene(self, cloud):
                self.source_cloud = cloud
                self.scene.scene.disable_render = True
                self.tvtksource = tvtk.to_tvtk(cloud.AsVTK())
                self.source = VTKDataSource(data = self.tvtksource) 
                self.engine.add_source(self.source, self.scene) 
                surfacef = Surface()
                self.engine.add_filter(surfacef, 
self.engine.scenes[0].children[0])
                self.scene.scene.disable_render = False

How can i update the object seen into my scene if i have modified the
"cloud" object?
For example: i call AddGridToScene, and after that i delete some points
from "cloud", how can i update the scene ?
I tried with self.tvtksource.update(), self.tvtksource.modified(),
self.source.update() but those does not work!!
Any idea??

Thanks


-- 
---------------------------
Luca Penasa
Student at Geosciences Dpt.
University of Padua (IT)
[email protected]
---------------------------
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to