Attached is a script that demonstrates what I meant. Note, this is just a
workaround and not a graceful solution :).
Utkarsh
On Fri, May 11, 2018 at 3:37 PM Sgouros, Thomas <[email protected]>
wrote:
> Alas, indeed. Just as I thought I was starting to understand what's going
on. Was I just misled because there is a trace output that has this in it?
> # get layout
> layout1 = GetLayoutByName("Layout #1")
> # split cell
> layout1.SplitHorizontal(0, 0.5)
> Without layout support, can I use pvpython to present two render views
and link them with a camera link? Can you suggest what direction might
succeed?
> You may have suggested this already, but I'm not sure the hint about
view.GetRenderWindow().SetPosition(x, y) is enough for me. I don't really
get how that's a way forward. What are you suggesting I use that function
to do?
> Thanks,
> -Tom
> On Fri, May 11, 2018 at 3:04 PM, Utkarsh Ayachit <
[email protected]> wrote:
>> Tom,
>> Alas, there's no layout support in pvpython. There indeed is a layout
proxy
>> (vtkSMLayoutProxy), but they rely on the Qt ParaView components to layout
>> the windows. The proxy itself is the "model", if you will. And it works
>> when you execute the layout related updates in the Python shell in the
>> ParaView UI.
>> A clumpsy way to set a window's position in Python is:
>> > view.GetRenderWindow().SetPosition(x, y)
>> You can use that to lay out the windows, short of doing something more
>> elaborate with a GUI library.
>> Utkarsh
>> On Fri, May 11, 2018 at 2:34 PM Sgouros, Thomas <[email protected]
>> wrote:
>> > Hi All:
>> > I've become accustomed to throwing around render view objects in
>> pvpython, swapping them in and out of the view with simple.Show() and
>> simple.Hide(). Now I have to learn about layout objects. Can someone
>> suggest the best way to think about these? Are they containers into
which I
>> can drop one or more render views and move them around, or are they more
>> like molds into which I can pour a render view and then use the layout as
>> handles with which to manipulate the views?
>> > Where can I find a list of the methods of a layout object? Or would it
be
>> better to call it a layout proxy?
>> > Thank you,
>> > -Tom
>> > _______________________________________________
>> > 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
>> > Search the list archives at: http://markmail.org/search/?q=ParaView
>> > Follow this link to subscribe/unsubscribe:
>> > https://public.kitware.com/mailman/listinfo/paraview
from paraview.simple import *
# NOTE THIS IS NOT INTENDED FOR USE IN PYTHON SHELL IN PARAVIEW UI
# BUT ONLY FOR `pvython`
s = Sphere()
a = []
for x in range(4):
v = CreateRenderView()
Show(s, v)
a.append(v)
if len(a) >= 2:
AddCameraLink(a[-2], a[-1], "clink%d" % len(a))
a[0].GetRenderWindow().SetPosition(0, 0)
a[1].GetRenderWindow().SetPosition(0, 410)
a[2].GetRenderWindow().SetPosition(410, 0)
a[3].GetRenderWindow().SetPosition(410, 410)
for x in a:
Render(x)
Interact(a[0])
_______________________________________________
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
Search the list archives at: http://markmail.org/search/?q=ParaView
Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview