[Paraview] Reader Plugin stopped working with ParaView 3.12

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Feb 3 16:57:33 EST 2012


Jageet,

Attached is patch to a bug that got introduced in 3.12. I've pushed it
to git and it will be included in 3.14. This was causing the issue
that you were seeing with 3.12. Thanks for bringing this to our
attention.

Utkarsh

On Fri, Jan 20, 2012 at 9:09 AM, Utkarsh Ayachit
<utkarsh.ayachit at kitware.com> wrote:
> I presume all you're missing is a call to this->view()->render() after
> all's done.
>
> Utkarsh
>
> On Tue, Jan 17, 2012 at 4:07 PM, Jagjeet Nain <jagjeet.nain at gmail.com> wrote:
>> Hi,
>> 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.
>>
>> This reader used to load image geometry as points and then used to load
>> image as texture to be overlaid on points.
>> After porting to Paraview 3.12, only Points geometry gets displayed but
>> image does not get displayed .
>> 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.
>> 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.
>> 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.
>> Below is the code which loads texture as image. This method is connected to
>> the dataUpdated(pqPipelineSource*)
>>
>> bool loadTexture()
>> {
>>
>> QFileInfo finfo(this->filename);
>>   if (!finfo.isReadable() )
>>     {
>>     return false;
>>     }
>>
>> vtkSMSourceProxy* sp = vtkSMSourceProxy::SafeDownCast(this->proxy());
>> vtkSMStringVectorProperty *name = vtkSMStringVectorProperty::SafeDownCast(
>> sp->GetProperty("FileName") );
>> this->filename = name->GetElement(0);
>>
>> pqPipelineSource* ps =
>> qobject_cast<pqPipelineSource*>(this->referenceProxy());
>> //we should never have more than 1 view for this, so we don't need to worry
>> about this
>> pqDataRepresentation *rep = ps->getRepresentation(  this->view() );
>> if ( rep )
>> {
>> vtkSMProxyManager* pxm = vtkSMProxyManager::GetProxyManager();
>> vtkSMProxy* texture = pxm->NewProxy("textures", "ImageTexture");
>> //texture->SetConnectionID( this->proxy()->GetConnectionID() );
>> //texture->SetServers(vtkProcessModule::CLIENT|vtkProcessModule::RENDER_SERVER);
>>
>> pqSMAdaptor::setElementProperty(texture->GetProperty("FileName"), filename);
>> pqSMAdaptor::setEnumerationProperty(texture->GetProperty("SourceProcess"),
>> "Client");
>> texture->UpdateVTKObjects();
>>
>> pxm->RegisterProxy(TEXTURESGROUP,
>> vtksys::SystemTools::GetFilenameName(filename.toAscii().data()).c_str(),
>> texture);
>>
>> vtkSMProperty* textureProperty = rep->getProxy()->GetProperty("Texture");
>> if ( textureProperty )
>> {
>> pqSMAdaptor::setProxyProperty(textureProperty, texture);
>> texture->UpdateVTKObjects();
>> }
>> texture->Delete();
>> }
>>   return true;
>> }
>>
>>
>> Can somebody please point me out what extra should I do in the above code to
>> make it Paraview 3.12 compatible.
>> with regards
>> Jagjeet
>>
>> _______________________________________________
>> 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
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fixed-BUG-12910.-Proxy-property-was-not-being-pushed.patch
Type: text/x-patch
Size: 8946 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120203/ec56d097/attachment-0001.bin>


More information about the ParaView mailing list