[Paraview] 3D widget in branded app panel?

David Thompson david.thompson at kitware.com
Mon Nov 9 10:55:03 EST 2015


Hi Utkarsh,

> I believe you're missing a pq3DWIdget::select() call after the showWigdte().

That did it.

	Thanks!
	David

> 
> On Mon, Nov 9, 2015 at 10:15 AM, David Thompson
> <david.thompson at kitware.com> wrote:
>> Hi all,
>> 
>> I need to add some 3D widgets to a custom ParaView application. I've succeeded in creating a pqImplicitPlaneWidget and pqSphereWidget and adding their Qt widgets to the UI. However, the 3D widget never appears in the render view; the plane/sphere show up, but not the widgets. It's unclear from the documentation/code what proxy I should pass to the widget constructors for the "controlled" proxy. This is what I'm currently doing:
>> 
>>  pqServer* server = paraViewApp->getActiveServer();
>>  pqObjectBuilder* builder = paraViewApp->getObjectBuilder();
>>  QPointer<pqPipelineSource> source =
>>    builder->createSource("sources", "PlaneSource", server);
>>  vtkSMProxy* ctrlProxy = source->getProxy();
>>  vtkSMProxy* refProxy = ...; // proxy of the pqPipelineSource whose bounds should be used by the widget
>>  pq3DWidget* pvwidget = new pqImplicitPlaneWidget(refProxy, ctrlProxy);
>>  pqActiveObjects& actives(pqActiveObjects::instance());
>>  pvwidget->setView(actives.activeView());
>>  pqDataRepresentation* rep =
>>    builder->createDataRepresentation(
>>      source->getOutputPort(0), actives.activeView())
>>  panelLayout->addWidget(pvwidget);
>>  pvwidget->showWidget();
>> 
>> I've even tried
>> 
>>  double bds[6] = { -85, 85, -202, -34, -216, -47 };
>>  pvwidget->resetBounds(bds);
>> 
>> to fix the bounds to something meaningful, but this has no effect.
>> 
>> Any hints would be useful.
>> 
>>        Thanks,
>>        David
>> _______________________________________________
>> 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:
>> http://public.kitware.com/mailman/listinfo/paraview



More information about the ParaView mailing list