Both are means to do exactly the same thing so it's just style preference. I personally prefer vtkSMPropertyHelper() since the resulting code looks cleaner to me, but just a personal thing. Both are equally fine.
Utkarsh On Mon, Apr 11, 2011 at 9:07 AM, Gil Wertz <[email protected]> wrote: > And which one is better ? > > ________________________________ > > Wertz Gil > > [email protected] > > ________________________________ > > > >> Date: Mon, 11 Apr 2011 08:47:50 -0400 >> Subject: Re: [Paraview] set Representation opacity >> From: [email protected] >> To: [email protected] >> CC: [email protected] >> >> Indeed. Another way I like to use to set properties is as follows: >> >> vtkSMProxy *proxy = representation->getProxy(); >> vtkSMPropertyHelper(proxy, "Opacity").Set(value); >> proxy->UpdateVTKObjects(); >> >> Utkarsh >> >> On Mon, Apr 11, 2011 at 6:10 AM, Gil Wertz <[email protected]> wrote: >> > I founded a way to do that "easily" : >> > >> > vtkSMProxy *proxy = representation->getProxy(); >> > vtkSMProperty * prop = proxy->GetProperty("Opacity"); >> > pqSMAdaptor::setElementProperty(prop, value); >> > proxy->UpdateVTKObjects(); >> > this->m_RenderView->render(); >> > >> > Regards >> > >> > ________________________________ >> > >> > Wertz Gil >> > >> > [email protected] >> > >> > ________________________________ >> > >> > >> > >> > ________________________________ >> > From: [email protected] >> > To: [email protected] >> > Date: Mon, 11 Apr 2011 09:28:08 +0200 >> > Subject: [Paraview] set Representation opacity >> > >> > I try to set pqPipelineRepresentation opacity but have no conclusive >> > result >> > ... >> > >> > There is a getOpacity but no setOpacity function, I looked at paraview's >> > code but I didn't find an easy way ( no way at all ) to set the opacity >> > of >> > my pqPipelineRepresentations that are in my pqRenderView. >> > >> > Any idea ? >> > >> > Maybe using pqPipelineRepresentation is not the best way. >> > >> > I add representation to my pqRenderView like this : >> > m_object_builder->createDataRepresentation(m_input->getOutputPort(0), >> > this->m_RenderView); >> > >> > Where m_input is a pqPipelineSource. (and I need to set the opacity of >> > this >> > newly created representation) >> > >> > Thanks >> > >> > ________________________________ >> > >> > Wertz Gil >> > >> > [email protected] >> > >> > ________________________________ >> > >> > >> > _______________________________________________ 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 >> > >> > > _______________________________________________ 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
