Hello,

I'm facing some issues with Mayavi (great soft BTW) and especially when
handling camera through udp api.

Here is my use case:
I have a python script to display a graph. Once the graph is drawn, I use
serve_udp() method to wait for commands over udp protocol.
I want to send commands like camera.zoom(), camera.roll().

For example, when I want to zoom on a particular node in the graph, I
retrieve x,y,z coordinates of the node and send
sock.sendto('camera.view(focalpoint=(str(x)+','+str(y)+','+str(z)+'))', '',
9008) ) to focus on the particular 3D point in the scene.

Where view() function is defined based on the doc :
http://docs.enthought.com/mayavi/mayavi/auto/mlab_camera.html

Mayavi tells me that « exceptions.AttributeError: 'OpenGLCamera' object has
no attribute 'view' »


But passing the same command inside the drawing script (using from
mayavi.tools import camera) works well.
So I guessed that the two camera classes are not the same.

I've then tried to read doc related to OpenGLcamera such as here :
http://www.vtk.org/Wiki/VTK/Examples/Python/Camera

But passing 'camera.SetFocalPoint(x,y,z)' through udp protocol raises the
same error : exceptions.AttributeError: 'OpenGLCamera' object has no
attribute 'SetFocalPoint'

Only camera.zoom(), camera.roll() seem to work.
Where am I wrong ? Is there a list of available methods to be used this way
?

Many thanks in advance.

Greetings,
BH
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
MayaVi-users mailing list
MayaVi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to