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

Reply via email to