YOu might want to listen to representationAdded(..) signal fired by the source. I am guessing you're trying to access the representation even before its created.
Utkarsh On Tue, Feb 1, 2011 at 7:52 AM, Christoffer Green <[email protected]> wrote: > Hello > I am developing an application based on the clone2 source in paraview 3.8.1. > I am using the following code to automatically show and accept loaded data: > > this->ui->proxyTabWidget->setShowOnAccept(true); > new pqAutoApplyReaction(this->ui->actionAutoApply); > > And I am using pqLoadDataReaction::loadData(stringList) to add the data. > I am wondering how one can know when the data/objects have actually been > loaded? This so you can make changes to that data. > After loading new data I want to do the following (change the ColorMap on > the new objects): > > pqDataRepresentation *currentDisplay = > qobject_cast<pqPipelineRepresentation*>(pqActiveObjects::instance().activeRepresentation()); > vtkSMProxy *lookupTable = currentDisplay->getLookupTable()->getProxy(); > > But that code crashes (since the objects have not yet loaded?). > Any ideas? Thanks. > BR/ Christoffer > > > _______________________________________________ > 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 > > Follow this link to subscribe/unsubscribe: > http://www.paraview.org/mailman/listinfo/paraview > > _______________________________________________ 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 Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
