Hi,<div>I had a reader plugin which used to work fine with ParaView 3.8.1, but stopped working when it was compiled with paraview 3.12.</div><div><br></div><div>This reader used to load image geometry as points and then used to load image as texture to be overlaid on points.</div>
<div>After porting to Paraview 3.12, only Points geometry gets displayed but image does not get displayed . </div><div>After executing the reader, I can see that image name is populated in the "Apply Texture" list of Display panel and it is also active but still image is not shown.</div>
<div>When I select "None" and then re-select same(as previous) image name in the drop down list of "Apply Texture", then image gets displayed.</div><div><b>So in short although correct image name is getting populated in the list and that is active as well but image only gets displayed in the second activation. This was not the case with Paraview 3.8.1.</b></div>
<div>Below is the code which loads texture as image. This method is connected to the dataUpdated(pqPipelineSource*)</div><div><br></div><div><div>bool loadTexture()</div><div>{ </div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>QFileInfo finfo(this->filename);</div>
<div> if (!finfo.isReadable() )</div><div> {</div><div> return false;</div><div> }</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>vtkSMSourceProxy* sp = vtkSMSourceProxy::SafeDownCast(this->proxy());</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>vtkSMStringVectorProperty *name = vtkSMStringVectorProperty::SafeDownCast( sp->GetProperty("FileName") );</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>this->filename = name->GetElement(0);</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>pqPipelineSource* ps = qobject_cast<pqPipelineSource*>(this->referenceProxy());</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>//we should never have more than 1 view for this, so we don't need to worry about this</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>pqDataRepresentation *rep = ps->getRepresentation( this->view() );</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>if ( rep )</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>{</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>vtkSMProxyManager* pxm = vtkSMProxyManager::GetProxyManager();</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>vtkSMProxy* texture = pxm->NewProxy("textures", "ImageTexture");</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>//texture->SetConnectionID( this->proxy()->GetConnectionID() );</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>//texture->SetServers(vtkProcessModule::CLIENT|vtkProcessModule::RENDER_SERVER);</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>pqSMAdaptor::setElementProperty(texture->GetProperty("FileName"), filename);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>pqSMAdaptor::setEnumerationProperty(texture->GetProperty("SourceProcess"), "Client");</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>texture->UpdateVTKObjects();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>pxm->RegisterProxy(TEXTURESGROUP,</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>vtksys::SystemTools::GetFilenameName(filename.toAscii().data()).c_str(),</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>texture);</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>vtkSMProperty* textureProperty = rep->getProxy()->GetProperty("Texture");<span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>if ( textureProperty )</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>{</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>pqSMAdaptor::setProxyProperty(textureProperty, texture);<span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>texture->UpdateVTKObjects();</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>texture->Delete();</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div> return true;</div><div>}</div></div><div><br></div><div><br></div><div>Can somebody please point me out what extra should I do in the above code to make it Paraview 3.12 compatible.</div>
<div>with regards</div><div>Jagjeet</div>