Hi,

I am running into an issue with a source that I set to invisible in the code. The following code starts with a source and a filter, then swaps the source against an new source and changes the visibility of the new source to invisible. When I manually change the visibility in the pipeline browser, ParaView breaks. Similarly, when I delete the filter, ParaView breaks. I am currently developing against ParaView 3.98.1.

I start with a pipeline which looks like:

src1 --> filter

Then I create a second source src2 and run:
-----------------------------------------------------------
pqPipelineFilter* filter = qobject_cast<pqPipelineFilter*>(src1->getConsumer(0));

vtkSMPropertyHelper(filter->getProxy(), "Input").Set(src2->getProxy());


// Set src2 invisible
pqRepresentation* representation = qobject_cast<pqRepresentation*>(src2->getRepresentation(pqActiveObjects::instance().activeView()));

representation->setVisible(false);


// Update the pipeline
filter->updateHelperProxies();
filter->updatePipeline();

vtkSMProxy* proxy = filter->getProxy();
proxy->UpdateVTKObjects();
proxy->UpdatePropertyInformation();


// Render the active view to make the changes visible.
pqActiveObjects::instance().activeView()->render();
-------------------------------------------------------------

When I manually change the visibility of src2 in the pipeline browser, ParaView breaks in the method vtkPainterPolyDataMapper::ComputeBounds() at this->GetInput()->GetBounds(this->Bounds);. The problem is that the vtkDatSet pointer that is being retrieved with GetInput is NULL. The same thing happens when I manually delete the filter.

Note that this problem vanishes when I set representation->setVisible(true) (which I don't really want)

Does anyone have an idea what is going wrong here?


Many thanks and with best regards,

Anton

This message is commercial in confidence and may be privileged. It is intended for the
addressee(s) only. Access to this message by anyone else is unauthorized and strictly prohibited.
If you have received this message in error, please inform the sender immediately. Please note that
messages sent or received by the Tessella e-mail system may be monitored and stored in an
information retrieval system.



_______________________________________________
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