Hi Celia,<div><br></div><div>I think you found a bug, but I think I have something for you.</div><div>The following method should clear the view/layouts.</div><div><br></div><div>Seb</div><div><br></div><div>$ <span style="color:rgb(0,0,0);font-family:Courier;font-size:13pt">def clearLayout():</span></div>
<div><span style="color:rgb(0,0,0);font-family:Courier;font-size:13pt">... pxm = servermanager.ProxyManager()</span></div>
<p style="margin:0px"><span style="font-family:Courier;font-size:13pt;color:rgb(0,0,0)">... for layout in GetLayouts():</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:13pt;color:rgb(0,0,0)">... pxm.UnRegisterProxy("layouts", </span><span style="color:rgb(0,0,0);font-family:Courier;font-size:17px">layout</span><span style="font-family:Courier;font-size:13pt;color:rgb(0,0,0)">[0], GetLayouts()[</span><span style="color:rgb(0,0,0);font-family:Courier;font-size:17px">layout</span><span style="font-family:Courier;font-size:13pt;color:rgb(0,0,0)">])</span></p>
<div><br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 16, 2012 at 2:28 PM, Celia Bremer <span dir="ltr"><<a href="mailto:fuwsle@hotmail.com" target="_blank">fuwsle@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Seb,<br>
<br>
When I say that the OpenGL window freezes, I mean the window is unresponsive in that I can't minimize it, and Windows task manager says "Not Responding". There's nothing in the window except for the purple background, even when there should be something, e.g. if I did Show(o) before calling Render(), where o is one of the pipeline objects.<br>
<br>
The thing I called layout windows, and I suppose it's really called something else (view layouts?), happens when I run the script from the Python shell that comes with the GUI. I'm referring to the tabs, "Layout #1", "Layout #2", etc. Here:<br>
<br>
>>> paraview version 3.14.1, Date: 2012-02-17<br>
from paraview.simple import *<br>
>>> GetLayouts()<br>
{('ViewLayout1', '275'): <paraview.servermanager.ViewLayout object at 0x0000000010FB4748>}<br>
>>> servermanager.LoadState("testpipeline.pvsm")<br>
>>> GetLayouts()<br>
{('ViewLayout1', '275'): <paraview.servermanager.ViewLayout object at 0x0000000010FB4748>, ('ViewLayout5', '2353'): <paraview.servermanager.ViewLayout object at 0x0000000010FB47B8>}<br>
>>> servermanager.LoadState("testpipeline.pvsm")<br>
>>> GetLayouts()<br>
{('ViewLayout1', '275'): <paraview.servermanager.ViewLayout object at 0x0000000010FB4748>, ('ViewLayout5', '3972'): <paraview.servermanager.ViewLayout object at 0x0000000012EC3240>, ('ViewLayout5', '2353'): <paraview.servermanager.ViewLayout object at 0x0000000010FB47B8>}<br>
<br>
This happens even if I use an empty state file, i.e. what I get when I open Paraview GUI, save state, save as empty.pvsm. If I load this state from the GUI, it opens in the original layout window, ViewLayout1, without any craziness. If I open it from the shell as above, the first tab splits into 2 views, the right view looks all weird (attached), a new tab opens and the state file is loaded into a second tab. If I load the state file again, then the second tab splits like the first (and if there was any content, it stays on the left hand side), a third tab opens, and the content shows up in the third tab. And so on. The names of these new tabs depend on the state file (above: 1 5 5, it might be 3 1 3 3, or if I use an empty state file, then it's 1 1 1 1), so I don't know what's the deal with that, but as long as I can close them before moving on to the next state file, I don't think it'll cause problems.<br>
<br>
Celia<br>
<br>
________________________________<br>
> Date: Fri, 16 Nov 2012 13:40:36 -0500<br>
<div class="im">> Subject: Re: [Paraview] help with a simple script?<br>
</div>> From: <a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a><br>
> To: <a href="mailto:fuwsle@hotmail.com">fuwsle@hotmail.com</a><br>
> CC: <a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>; <a href="mailto:paraview@paraview.org">paraview@paraview.org</a><br>
<div class="im">><br>
> Hi Celia,<br>
><br>
> I'm not sure to follow what you mean by "it freezes" and "new layout window".<br>
><br>
> When you render something from Python, the window is not interactive,<br>
> so maybe that's what you call freeze. And you need to manually call<br>
> Render() to update its content.<br>
> Regarding the layout window, I don't really have a clue what that could be.<br>
><br>
> So I let you explain a bit more.<br>
><br>
> Thanks,<br>
><br>
> Seb<br>
><br>
><br>
> On Fri, Nov 16, 2012 at 1:21 PM, Celia Bremer<br>
</div><div class="im">> <<a href="mailto:fuwsle@hotmail.com">fuwsle@hotmail.com</a><mailto:<a href="mailto:fuwsle@hotmail.com">fuwsle@hotmail.com</a>>> wrote:<br>
><br>
> Thank you. That worked but I still have problems: as soon as the OpenGL<br>
> window opens to render, it freezes, even if all the objects are hidden.<br>
> I think I'll have to do it from the Python shell from PV instead. I<br>
> have just one more question.<br>
><br>
> When I load a state using LoadState(), that automatically opens a new<br>
> layout window. If I open the same state file from the GUI, no new<br>
> window is opened, so I don't think it's a property stored in the state<br>
> file. If I'm going to loop through 60 state files, I imagine all these<br>
> windows would become a problem. How do I either close the window, or<br>
> prevent it from opening in the first place?<br>
><br>
> Celia<br>
><br>
> ----------------------------------------<br>
</div>>> From: <a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a><mailto:<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>><br>
<div class="im">>> Date: Fri, 16 Nov 2012 10:52:45 -0500<br>
>> Subject: Re: [Paraview] help with a simple script?<br>
</div>>> To: <a href="mailto:fuwsle@hotmail.com">fuwsle@hotmail.com</a><mailto:<a href="mailto:fuwsle@hotmail.com">fuwsle@hotmail.com</a>><br>
>> CC:<br>
> <a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a><mailto:<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>>;<br>
> <a href="mailto:paraview@paraview.org">paraview@paraview.org</a><mailto:<a href="mailto:paraview@paraview.org">paraview@paraview.org</a>><br>
<div class="HOEnZb"><div class="h5">>><br>
>>> from paraview import servermanager<br>
>>> from paraview.simple import *<br>
>>> servermanager.LoadState("test.pvsm")<br>
>><br>
>> SetActiveView(GetRenderView()) #you are missing this<br>
>><br>
>>> view = GetActiveView()<br>
>>> view.ViewTime<br>
>>><br>
> </div></div></blockquote></div><br></div>