<div>Hello!</div><div><br></div><div>I was trying (and failing) to change the image texture of a pqDataRepresentation in a plugin and I was wondering</div><div>if anyone could lend a hand.</div><div><br></div><div>This is the code I have:</div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><br></div><div>//this->Representation is a pqDataRepresentation*</div><div>pqSMAdaptor::setElementProperty(this->Representation->getProxy()->GetProperty("Texture"), "C:/Users/Green/Desktop/tmp/2_cc/anatomy/2ch.geo.png");</div>
<div>this->Representation->getProxy()->UpdateVTKObjects();</div></blockquote><div><br></div><div>Changing the texture via the GUI with the texture combobox works fine and the path to the texture is accurate.</div>
<div>I am doing this when I get a dataUpdated() signal from the pqDataRepresentation (after having read a file from disk </div><div>and creating the data that gets represented), is it perhaps needed to wait until a specific update signal to do this?</div>
<div><br></div><div>Thanks.</div><div><br></div><div>BR/ Christoffer</div>