[Paraview] Extra camera reset in python macro
Eric E. Monson
emonson at cs.duke.edu
Wed Jan 27 16:33:04 EST 2010
Hello,
First of all, I've been playing around with the new python interface and trace functionality in PV, and it's really a great improvement!
But... :) It seems like the first time I run a macro (from the PV python shell "Run selected" button) which contains some camera adjustments, the camera gets reset at the end. If I delete all of the pipeline elements and run it again without restarting PV or pressing Disconnect, the scene ends up with the correct camera settings. If I disconnect before running it again, the "reset at end" behavior is repeated. The same thing happens when running in ipython, outside of PV.
Here's a sample script -- if the camera settings are correct you should not see space around the group of glyphed points (it is zoomed in a bit on the cluster):
# =============================
try: paraview.simple
except: from paraview.simple import *
PointSource2 = PointSource()
PointSource2.Radius = 200.0
PointSource2.NumberOfPoints = 100
Glyph1 = Glyph( GlyphType="Sphere" )
Glyph1.MaskPoints = 0
Glyph1.RandomMode = 0
Glyph1.SetScaleFactor = 1.0
Glyph1.ScaleMode = 'off'
Glyph1.Orient = 0
Glyph1.GlyphType.Radius = 5.0
DataRepresentation2 = Show()
RenderView1 = GetRenderView()
RenderView1.CameraViewUp = [0.01, 1.0, -0.06]
RenderView1.CameraPosition = [37.0, 190.5, 640.7]
RenderView1.CameraClippingRange = [91.9, 1018.7]
Render()
# =============================
The main problem is that this keeps me from using the python macros like the old lookmarks because I don't get a repeatable camera view right after starting up PV.
I'm using CVS ParaView from Jan 19 on OS X 10.6.2 built with CMake 2.9.20100113.
Thanks,
-Eric
------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group
More information about the ParaView
mailing list