[Paraview] MultiWindow with python scripts

Lalith Wijerathne lalithwij at gmail.com
Fri Jul 31 11:32:01 EDT 2009


Hi

I am trying tp use a python script to open MultiWindow paraview
session and make a movie. As an example, I used the
LoadStateMultiView.pvsm file included with ParaviewData. When I open
this *.pvsm using the GUI (File->LoadState ), I can get a four equal
sized 2x2 set of windows as shown below.
    ___________
   |         |         |
   |_____|_____|
   |         |        |
   |_____|_____|


   However, when I use the following python script, those windows no
longer have the 2x2 equal size arrangement. Those are arranged in the
following format

    ____________
   |         |           |
   |         |______|
   |         |     |     |
   |_____|___|___|

The python script I am using is

############################

import exceptions
from paraview import servermanager
filename = "/home/Softwares/Paravew/ParaviewData/ParaViewData/Data/LoadStateMultiView.pvsm"
try:
  fp = open(filename, "r")
  fp.close()
except:
  raise exceptions.RuntimeError, \
    "Session file not found"

if not servermanager.ActiveConnection:
  servermanager.Connect()
servermanager.LoadState(filename)
Render()
pxm = servermanager.ProxyManager()
scene1 = pxm.GetProxy('animation', 'AnimationScene1')
scene1.NumberOfFrames = 10
writer = servermanager.vtkSMAnimationSceneImageWriter()
writer.SetFileName('/home/lalith/Desktop/test2.jpg')
writer.SetFrameRate(1)
writer.SetAnimationScene(scene1.SMProxy)
writer.Save()

#############################

  Also, the tiled images saved by this script has  borders along each
small window.
Could anybody help me to  get the proper window arrangement with a
python script.

Thanks in advance

Lalith


More information about the ParaView mailing list