[Paraview] How do you set LIC parameters in a python trace script?

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Sep 12 10:48:54 EDT 2011


Burlen

I've committed a fix for this
(http://paraview.org/Bug/view.php?id=12360) in git-next. It will be
included in 3.12 barring any dashboard issues.

Utkarsh

On Wed, Jul 6, 2011 at 8:44 PM, Burlen Loring <bloring at lbl.gov> wrote:
> Yep, it's loaded using the LoadPlugin function along with our reader plugin.
>  PV_PLUGIN_DEBUG=1 verified it. If I don't change any of the LIC attributes
> the script runs and I get a LIC successfully rendered.
>
> What I just now noticed is that if the LIC plugin gets loaded before other
> plugins the problem goes away! So something about loading other plugins
> after the LIC makes LIC's attributes disapear. I sent a script that
> illustrates by loading the SLAC tools plugin. If you swap the loads the
> script will run.
>
> On 07/06/2011 04:28 PM, Utkarsh Ayachit wrote:
>>
>> Burlen,
>>
>> Are you sure the plugin is loaded?
>>
>> Utkarsh
>>
>> On Wed, Jul 6, 2011 at 4:29 PM, Burlen Loring<bloring at lbl.gov>  wrote:
>>>
>>> Hi,
>>>
>>> I am able to use a script written from python trace to render a LIC but
>>> when
>>> I try to change any of the LIC parameters also from python trace I get
>>> attribute errors (below). In the python shell launched from PV a dir
>>> shows
>>> these attributes, however dir run from in the script shows they are
>>> missing.
>>> How do I get the LIC attributes to be seen in a python script?
>>>
>>> Thanks
>>> Burlen
>>>
>>> Traceback (most recent call last):
>>>  File "test4.py", line 60, in<module>
>>>    DataRepresentation2.LICNumberOfSteps = 12
>>>  File
>>>
>>> "/work/ext/ParaView/PV3-3.10.0/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py",
>>> line 207, in __setattr__
>>>    "to add this attribute.")
>>> AttributeError: Attribute LICNumberOfSteps 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.
>>>
>>> _______________________________________________
>>> 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