[Paraview] help with a simple script?

Sebastien Jourdain sebastien.jourdain at kitware.com
Fri Nov 16 13:40:36 EST 2012


Hi Celia,

I'm not sure to follow what you mean by "it freezes" and "new layout
window".

When you render something from Python, the window is not interactive, so
maybe that's what you call freeze. And you need to manually call Render()
to update its content.
Regarding the layout window, I don't really have a clue what that could be.

So I let you explain a bit more.

Thanks,

Seb


On Fri, Nov 16, 2012 at 1:21 PM, Celia Bremer <fuwsle at hotmail.com> wrote:

>
> Thank you. That worked but I still have problems: as soon as the OpenGL
> window opens to render, it freezes, even if all the objects are hidden. I
> think I'll have to do it from the Python shell from PV instead. I have just
> one more question.
>
> When I load a state using LoadState(), that automatically opens a new
> layout window. If I open the same state file from the GUI, no new window is
> opened, so I don't think it's a property stored in the state file. If I'm
> going to loop through 60 state files, I imagine all these windows would
> become a problem. How do I either close the window, or prevent it from
> opening in the first place?
>
> Celia
>
> ----------------------------------------
> > From: dave.demarle at kitware.com
> > Date: Fri, 16 Nov 2012 10:52:45 -0500
> > Subject: Re: [Paraview] help with a simple script?
> > To: fuwsle at hotmail.com
> > CC: sebastien.jourdain at kitware.com; paraview at paraview.org
> >
> >> from paraview import servermanager
> >> from paraview.simple import *
> >> servermanager.LoadState("test.pvsm")
> >
> > SetActiveView(GetRenderView()) #you are missing this
> >
> >> view = GetActiveView()
> >> view.ViewTime
> >>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20121116/4a410daf/attachment.htm>


More information about the ParaView mailing list