<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' 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->getViewProxy()->GetProperty("CameraParallelProjection"));<br>
projProp->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->getViewProxy()->GetProperty("Background"));<br>
bg->SetElements3(0,0,0);<br><br></div>Though the projection is correctly set to parallel after pqrenderview->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!<br></div><div>Jerome<br></div><div><div><div><div><br><br></div></div></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Dec 12, 2013 at 3:39 PM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></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>
"apply" then calling UpdateVTKObjects() on the proxy and for the first<br>
time also creating the "display" or "representation". 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'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 class="HOEnZb"><font color="#888888"><br>
Utkarsh<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Thu, Dec 12, 2013 at 9:32 AM, Jerome Velut <<a href="mailto:jerome.velut@kitware.com">jerome.velut@kitware.com</a>> wrote:<br>
> Hi Utkarsh,<br>
><br>
> I am sorry to bother you with this issue already related in several threads<br>
> of the mailing list. I am currently harnessing the possibility of deep<br>
> customization of ParaView.<br>
> * I got rid of the pqTabbed..Widget and provide 4 statics pqViewFrame in a<br>
> central grid layout<br>
> * When a data is added to pipeline, I want it to be read immediately and<br>
> visualized in all 4 views.<br>
><br>
> For now, I have to press the apply button. But in the future, this panel may<br>
> disappear. What I did was to connect the SIGNAL(sourceAdded) of the<br>
> serverManagerModel to a custom slot "onSourceAdded"<br>
><br>
> This slot is correctly called when I add a reader to the pipeline. The slot<br>
> implementation should mimic the "Apply" click then. I did that dirty by<br>
> calling :<br>
> this->Internals->propertiesPanel->apply();<br>
> Even this instruction doesn't have any effect. One more time, if I click on<br>
> the "Apply" button, the view that I set as active view renders the data.<br>
><br>
> I alos tried with UpdateVTKObjects from the source proxy, wihtout any<br>
> effect. Finally, calling source->updatePipeline() throw a warning from the<br>
> reader, stating that a fileName is not provided.<br>
><br>
> From the last point, I guess I misused the API regarding some<br>
> timing/sync/whatever.<br>
><br>
> What's the best way for this really simple feature?<br>
><br>
> Thanks a lot!<br>
> Jerome<br>
><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">+33 (0)4.37.45.04.15</a><br>
> <a href="http://www.kitware.fr" target="_blank">http://www.kitware.fr</a><br>
> <a href="http://www.kitware.fr/company/team/velut.html" target="_blank">http://www.kitware.fr/company/team/velut.html</a><br>
><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: +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>