[Paraview] Paraview Branding: how to force the update?

Jerome Velut jerome.velut at kitware.com
Fri Dec 13 04:32:49 EST 2013


Hi,

I won't bother you all again : a simple pqrenderview->resetCamera() did the
trick!

Best,
Jerome


On Fri, Dec 13, 2013 at 10:09 AM, Jerome Velut <jerome.velut at kitware.com>wrote:

> Thanks Utkarsh!
>
> The pqObjectBuilder signal connection was the solution: Thanks a lot!
>
> However, I have another question now, similar to forcing update. I want to
> change the render views' look:
> * Set parallel projection by default on 3 views. I got it to work by
> setting the CameraParallelProjection in the ViewProxy of some pqRenderView :
>
>     vtkSMIntVectorProperty* projProp;
>     projProp =
> vtkSMIntVectorProperty::SafeDownCast(pqview->getViewProxy()->GetProperty("CameraParallelProjection"));
>     projProp->SetElements1( parallelProjection );
>
> * Set black background by default : I did the same with the Background
> property
>
>   vtkSMDoubleVectorProperty* bg;
>   bg =
> vtkSMDoubleVectorProperty::SafeDownCast(pqview->getViewProxy()->GetProperty("Background"));
>   bg->SetElements3(0,0,0);
>
> 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!
>
> Do I have to do something more than the parallel/perspective projection
> setting?
>
> Thanks!
> Jerome
>
>
>
>
> On Thu, Dec 12, 2013 at 3:39 PM, Utkarsh Ayachit <
> utkarsh.ayachit at kitware.com> wrote:
>
>> Jerome,
>>
>> Look at  Qt/Core/Testing/Cxx/BasicApp.cxx. There;s nothing more to
>> "apply" then calling UpdateVTKObjects() on the proxy and for the first
>> time also creating the "display" or "representation". BasicApp.cxx
>> does that for the elevation filter.
>>
>> BasicApp creates the sources/filters directly. If you still want to
>> let the Sources/Filters menu create the source/filter proxy, then  you
>> can listen to signals fired by pqObjectBuilder rather than
>> pqServerManagerModel to know when the source is created. Yes, the
>> filename error is because you're doing the work prematurely.
>> pqServerManagerModel fires as soon as the object is registered, it may
>> have been initialized yet.
>>
>> Hope that helps. Please feel free to post back to the mailing list
>> your observations/solutions so that others could benefit too :).
>>
>> Utkarsh
>>
>> On Thu, Dec 12, 2013 at 9:32 AM, Jerome Velut <jerome.velut at kitware.com>
>> wrote:
>> > Hi Utkarsh,
>> >
>> > I am sorry to bother you with this issue already related in several
>> threads
>> > of the mailing list. I am currently harnessing the possibility of deep
>> > customization of ParaView.
>> > * I got rid of the pqTabbed..Widget and provide 4 statics pqViewFrame
>> in a
>> > central grid layout
>> > * When a data is added to pipeline, I want it to be read immediately and
>> > visualized in all 4 views.
>> >
>> > For now, I have to press the apply button. But in the future, this
>> panel may
>> > disappear. What I did was to connect the SIGNAL(sourceAdded) of the
>> > serverManagerModel to a custom slot "onSourceAdded"
>> >
>> > This slot is correctly called when I add a reader to the pipeline. The
>> slot
>> > implementation should mimic the "Apply" click then. I did that dirty by
>> > calling :
>> >    this->Internals->propertiesPanel->apply();
>> > Even this instruction doesn't have any effect. One more time, if I
>> click on
>> > the "Apply" button, the view that I set as active view renders the data.
>> >
>> > I alos tried with UpdateVTKObjects from the source proxy, wihtout any
>> > effect. Finally, calling source->updatePipeline() throw a warning from
>> the
>> > reader, stating that a fileName is not provided.
>> >
>> > From the last point, I guess I misused the API regarding some
>> > timing/sync/whatever.
>> >
>> > What's the best way for this really simple feature?
>> >
>> > Thanks a lot!
>> > Jerome
>> >
>> > --
>> > Jérôme Velut
>> > Research and Development
>> > Kitware SAS
>> > 26 rue Louis Guérin
>> > 69100 Villeurbanne, France
>> > F: +33 (0)4.37.45.04.15
>> > http://www.kitware.fr
>> > http://www.kitware.fr/company/team/velut.html
>> >
>>
>
>
>
> --
> Jérôme Velut
> Research and Development
> Kitware SAS
> 26 rue Louis Guérin
> 69100 Villeurbanne, France
> F: +33 (0)4.37.45.04.15
> http://www.kitware.fr
> http://www.kitware.fr/company/team/velut.html
>
>


-- 
Jérôme Velut
Research and Development
Kitware SAS
26 rue Louis Guérin
69100 Villeurbanne, France
F: +33 (0)4.37.45.04.15
http://www.kitware.fr
http://www.kitware.fr/company/team/velut.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20131213/6d788405/attachment-0001.htm>


More information about the ParaView mailing list