<div dir="ltr"><div><div>Hi,<br><br></div>I won&#39;t bother you all again : a simple pqrenderview-&gt;resetCamera() did the trick!<br><br></div>Best,<br>Jerome<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Dec 13, 2013 at 10:09 AM, Jerome Velut <span dir="ltr">&lt;<a href="mailto:jerome.velut@kitware.com" target="_blank">jerome.velut@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div><div><div>Thanks Utkarsh!<br><br></div>The pqObjectBuilder signal connection was the solution: Thanks a lot!<br><br></div>However, I have another question now, similar to forcing update. I want to change the render views&#39; look:<br>

</div>* Set parallel projection by default on 3 views. I got it to work by setting the CameraParallelProjection in the ViewProxy of some pqRenderView :<br><br>    vtkSMIntVectorProperty* projProp;<br>    projProp = vtkSMIntVectorProperty::SafeDownCast(pqview-&gt;getViewProxy()-&gt;GetProperty(&quot;CameraParallelProjection&quot;));<br>

    projProp-&gt;SetElements1( parallelProjection );<br><br></div>* Set black background by default : I did the same with the Background property<br><br>  vtkSMDoubleVectorProperty* bg;<br>  bg = vtkSMDoubleVectorProperty::SafeDownCast(pqview-&gt;getViewProxy()-&gt;GetProperty(&quot;Background&quot;));<br>

  bg-&gt;SetElements3(0,0,0);<br><br></div>Though the projection is correctly set to parallel after pqrenderview-&gt;render(), the background still shows the paraview blue-gray. Strangely, if I open the View settings panel, the background color is black!<br>

<br></div><div>Do I have to do something more than the parallel/perspective projection setting?<br><br></div><div>Thanks!<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>
Jerome<br></div><div><div><div><div><br><br></div></div></div></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Dec 12, 2013 at 3:39 PM, Utkarsh Ayachit <span dir="ltr">&lt;<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Jerome,<br>
<br>
Look at  Qt/Core/Testing/Cxx/BasicApp.cxx. There;s nothing more to<br>
&quot;apply&quot; then calling UpdateVTKObjects() on the proxy and for the first<br>
time also creating the &quot;display&quot; or &quot;representation&quot;. BasicApp.cxx<br>
does that for the elevation filter.<br>
<br>
BasicApp creates the sources/filters directly. If you still want to<br>
let the Sources/Filters menu create the source/filter proxy, then  you<br>
can listen to signals fired by pqObjectBuilder rather than<br>
pqServerManagerModel to know when the source is created. Yes, the<br>
filename error is because you&#39;re doing the work prematurely.<br>
pqServerManagerModel fires as soon as the object is registered, it may<br>
have been initialized yet.<br>
<br>
Hope that helps. Please feel free to post back to the mailing list<br>
your observations/solutions so that others could benefit too :).<br>
<span><font color="#888888"><br>
Utkarsh<br>
</font></span><div><div><br>
On Thu, Dec 12, 2013 at 9:32 AM, Jerome Velut &lt;<a href="mailto:jerome.velut@kitware.com" target="_blank">jerome.velut@kitware.com</a>&gt; wrote:<br>
&gt; Hi Utkarsh,<br>
&gt;<br>
&gt; I am sorry to bother you with this issue already related in several threads<br>
&gt; of the mailing list. I am currently harnessing the possibility of deep<br>
&gt; customization of ParaView.<br>
&gt; * I got rid of the pqTabbed..Widget and provide 4 statics pqViewFrame in a<br>
&gt; central grid layout<br>
&gt; * When a data is added to pipeline, I want it to be read immediately and<br>
&gt; visualized in all 4 views.<br>
&gt;<br>
&gt; For now, I have to press the apply button. But in the future, this panel may<br>
&gt; disappear. What I did was to connect the SIGNAL(sourceAdded) of the<br>
&gt; serverManagerModel to a custom slot &quot;onSourceAdded&quot;<br>
&gt;<br>
&gt; This slot is correctly called when I add a reader to the pipeline. The slot<br>
&gt; implementation should mimic the &quot;Apply&quot; click then. I did that dirty by<br>
&gt; calling :<br>
&gt;    this-&gt;Internals-&gt;propertiesPanel-&gt;apply();<br>
&gt; Even this instruction doesn&#39;t have any effect. One more time, if I click on<br>
&gt; the &quot;Apply&quot; button, the view that I set as active view renders the data.<br>
&gt;<br>
&gt; I alos tried with UpdateVTKObjects from the source proxy, wihtout any<br>
&gt; effect. Finally, calling source-&gt;updatePipeline() throw a warning from the<br>
&gt; reader, stating that a fileName is not provided.<br>
&gt;<br>
&gt; From the last point, I guess I misused the API regarding some<br>
&gt; timing/sync/whatever.<br>
&gt;<br>
&gt; What&#39;s the best way for this really simple feature?<br>
&gt;<br>
&gt; Thanks a lot!<br>
&gt; Jerome<br>
&gt;<br>
&gt; --<br>
&gt; Jérôme Velut<br>
&gt; Research and Development<br>
&gt; Kitware SAS<br>
&gt; 26 rue Louis Guérin<br>
&gt; 69100 Villeurbanne, France<br>
&gt; F: <a href="tel:%2B33%20%280%294.37.45.04.15" value="+33437450415" target="_blank">+33 (0)4.37.45.04.15</a><br>
&gt; <a href="http://www.kitware.fr" target="_blank">http://www.kitware.fr</a><br>
&gt; <a href="http://www.kitware.fr/company/team/velut.html" target="_blank">http://www.kitware.fr/company/team/velut.html</a><br>
&gt;<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Jérôme Velut<br>Research and Development<br>Kitware SAS
<br>26 rue Louis Guérin
<br>69100 Villeurbanne, France
<br>F: <a href="tel:%2B33%20%280%294.37.45.04.15" value="+33437450415" target="_blank">+33 (0)4.37.45.04.15</a>
<br><a href="http://www.kitware.fr/" target="_blank">http://www.kitware.fr</a><br><div><a href="http://www.kitware.fr/company/team/velut.html" target="_blank">http://www.kitware.fr/company/team/velut.html</a></div><div><br>

</div>
</div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Jérôme Velut<br>Research and Development<br>Kitware SAS
<br>26 rue Louis Guérin
<br>69100 Villeurbanne, France
<br>F: +33 (0)4.37.45.04.15
<br><a href="http://www.kitware.fr/" target="_blank">http://www.kitware.fr</a><br><div><a href="http://www.kitware.fr/company/team/velut.html" target="_blank">http://www.kitware.fr/company/team/velut.html</a></div><div><br>
</div>
</div>