[Paraview] SurfaceLIC and python interface

Sebastien Jourdain sebastien.jourdain at kitware.com
Thu Jul 26 08:03:47 EDT 2012


Hi Frank,

I think you need to use the C++ API as the representation was already
wrapped based on another type of representation that was not providing
those properties

Here is an example on how to set one of your property.

DataRepresentation1.SMProxy.GetProperty('LICIntensity').SetElement(0,1.0)

Alternatively, when you load you plugin, you can try to provide your
globals as argument. That might solve the problem too.

LoadPlugin('file', True, globals() )

Seb

On Thu, Jul 26, 2012 at 4:48 AM, Albina, Frank
<frank.albina at sauber-motorsport.com> wrote:
> Hi!
>
>
> Forgot to tell that the PV version is 3.14.1.
>
>
> Cheers,
>
>
>
> Frank.
>
>
>
> From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org]
> On Behalf Of Albina, Frank
> Sent: Donnerstag, 26. Juli 2012 10:26
> To: paraview at paraview.org
> Subject: [Paraview] SurfaceLIC and python interface
>
>
>
> Dear All!
>
>
>
> I am trying to run the SurfaceLIC representation under pvbatch. From the
> python trace tool under the GUI, I could find the following output which
> helps me setting the LIC intensity and LICStepSize:
>
>
>
> RenderView1 = GetRenderView()
>
> DataRepresentation1 = Show()
>
> DataRepresentation1.Representation = 'Surface LIC'
>
> DataRepresentation1.InterpolateScalarsBeforeMapping = 0
>
> DataRepresentation1.LICIntensity = 1.0
>
> DataRepresentation1.LICStepSize = 0.25
>
>
>
> Unfortunately, doing the same within a python script does not work, since I
> get :
>
>
>
> AttributeError: Attribute LICIntensity does not exist.  This class does not
> allow addition of new attributes to avoid mistakes due to typos. Use
> add_attribute() if you really want to add this attribute.
>
>
>
> The above attributes LICIntensity and LICStepSize are not available from the
> python shell either, even after having set the representation to 'Surface
> LIC'.  I get the same issue either with the Kitware binaries or those
> compiled by myself. Even forcing the load of the SurfaceLIC plugin with
> paraview.servermanager.LoadPlugin("libSurfaceLIC.so") does not solve the
> issue.
>
>
>
> I am surely missing one step. Could someone tell me which?
>
>
>
> Thanks a lot in advance.
>
>
>
> Cheers,
>
>
>
> Frank Albina.
>
>
> _______________________________________________
> 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
>


More information about the ParaView mailing list