[Paraview] Changing the texture of a pqDataRepresentation

Christoffer Green christoffer.green at gmail.com
Wed Jun 1 09:35:10 EDT 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110601/d0c1daab/attachment.htm>


More information about the ParaView mailing list