<div>I see. If that's the case, my other try would be to lock it in my plugin code.</div>
<div>To be more specific, I am not trying to create a new window for my plugin, but just to resize and lock the original render window.</div>
<div>Do you think this is doable?</div>
<div> </div>
<div>Li</div>
<div><br><br> </div>
<div class="gmail_quote">On Tue, Apr 10, 2012 at 4:14 PM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">Ah, in that case you cannot set the view size from Python, the Qt GUI<br>always overrides it. I don't think there's a way to lock the view size<br>
from Python for the GUI currently.<br>
<div class="HOEnZb">
<div class="h5"><br>On Tue, Apr 10, 2012 at 3:51 PM, Li Guan <<a href="mailto:li.9uan@gmail.com">li.9uan@gmail.com</a>> wrote:<br>> I am doing this in python shell..<br>><br>> On Tue, Apr 10, 2012 at 3:50 PM, Utkarsh Ayachit<br>
> <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>>><br>>> Are you doing this in the QT GUI or pvpython?<br>>><br>>> On Tue, Apr 10, 2012 at 3:20 PM, Li Guan <<a href="mailto:li.9uan@gmail.com">li.9uan@gmail.com</a>> wrote:<br>
>> > Thank you Utkarsh,<br>>> ><br>>> > But even if I do as you said, the actual view size is still [648, 507].<br>>> ><br>>> > In fact, you could try the following code out, and check the dumped<br>
>> > image<br>>> > size to be the wrong size as well.<br>>> ><br>>> > GetRenderView().ViewSize = [640, 480];<br>>> ><br>>> > GetActiveView().GetRenderWindow().Render();<br>
>> ><br>>> > WriteImage("./RGB.bmp");<br>>> ><br>>> ><br>>> > I just wonder if there is a way in python script that I can lock the<br>>> > view<br>>> > size to custom size [640,480], just like we click on the paraview tools<br>
>> > -><br>>> > Lock View Size Custom...?<br>>> ><br>>> > Best,<br>>> ><br>>> > Li<br>><br>><br></div></div></blockquote></div><br>