I am trying to write a simple few lines of Python code to mimick the view
plane direction buttons available in the GUI, but I'm finding some of the
commands don't seem to accept my input. The version of Paraview is 3.5.0 and
I'm using paraview.simple. For example:

cam = GetActiveCamera()

cam.SetPosition(-15,10,0) #works
cam.GetPosition()               #works
( -15.0, 10.0, 0.0)
Render()

cam.SetFocalPoint(0,10,0)       #works
cam.GetFocalPoint()             #works
( 0.0, 10.0, 0.0)
Render()

cam.GetViewUp()
(0.0, 1.0, 0.0)
cam.SetViewUp(0,0,1)    #error
Traceback (most recent call last):
  File "<console>", line 1, in ?
TypeError: 'list' object is not callable
cam.SetViewUp = (0,0,1) #appears to have accepted it
cam.GetViewUp()
(0.0, 1.0, 0.0)         #does not update the view

Do I need to update to the latest dev version to get this working? It
appears to work fine with the old Paraview-python API.

===================================

Adriano Gagliardi MEng PhD
Project Scientist
Computational Aerodynamics
Aircraft Research Association Ltd.
Manton Lane
Bedford

Tel: 01234 32 4644
E-mail: [email protected]
Url: www.ara.co.uk 


---------------------------
This email contains information that is private and confidential and is 
intended only for the addressee.  If you are not the intended recipient please 
delete it and notify us immediately by e-mailing the sender.
Note: All email sent to or from this address may be accessed by someone other 
than the recipient, for system management and security reasons.
Aircraft Research Association Ltd.  Registered in England, Registration No 
503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 
196351245


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to