The texture property does not take a filename, it's a proxy-property that needs a source that produces an image-data that can be used as the texture. Look at code in ParaView/Qt/Components/pqTextureComboBox.cxx to see how this is done especially pqTextureComboBox::loadTexture(const QString& filename).
Utkarsh On Wed, Jun 1, 2011 at 9:35 AM, Christoffer Green <[email protected]> wrote: > Hello! > I was trying (and failing) to change the image texture of > a pqDataRepresentation in a plugin and I was wondering > if anyone could lend a hand. > This is the code I have: > > //this->Representation is a pqDataRepresentation* > pqSMAdaptor::setElementProperty(this->Representation->getProxy()->GetProperty("Texture"), > "C:/Users/Green/Desktop/tmp/2_cc/anatomy/2ch.geo.png"); > this->Representation->getProxy()->UpdateVTKObjects(); > > Changing the texture via the GUI with the texture combobox works fine and > the path to the texture is accurate. > I am doing this when I get a dataUpdated() signal from > the pqDataRepresentation (after having read a file from disk > and creating the data that gets represented), is it perhaps needed to wait > until a specific update signal to do this? > 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
