[Paraview] python to change reader filename and animate AVS files

Berk Geveci berk.geveci at kitware.com
Sun Oct 26 13:13:47 EDT 2008


Hmmm. I am not sure how difficult it would be to do this. If this
feature is important to you, I suggested putting on the tracker:
http://paraview.org/Bug
I can't promise that we will get to it soon though.

-berk

On Wed, Oct 22, 2008 at 4:19 PM, David Fuentes <fuentesdt at gmail.com> wrote:
>
>
> Control-C
>
> seems to be disabled in the GUI python shell?
>
>
> Tools -> Python Shell
>
> execfile("script.py")
>
>
>
> Control-C  doesn't seems to be able to interrupt the script execution?
> When looping through time instances I want to stop the script
> at a given time.  Is there a method to interrupt the script execution?
>
>
>
> thanks,
> df
>
>
>
>
> On Fri, 17 Oct 2008, Berk Geveci wrote:
>
>> I am afraid you cannot. I think it is a good idea though. You may want
>> to consider filing a feature request here: http://paraview.org/Bug
>>
>> On Fri, Oct 17, 2008 at 4:03 PM, David Fuentes <fuentesdt at gmail.com>
>> wrote:
>>>
>>> Can you return control to the GUI during the execution of the python
>>> script?
>>> During the loop I want to enable GUI interaction w/ the view,
>>> i.e. use mouse to rotate/translate/etc...
>>> but ParaView will not let me move/rotate until After the script is
>>> complete.
>>>
>>>
>>>
>>>
>>> df
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Fri, 17 Oct 2008, Berk Geveci wrote:
>>>
>>>> What you need is something like:
>>>>
>>>> pm=servermanager.ProxyManager()
>>>> femdata = pm.GetProxy("sources","femdata")
>>>> for i in range(10):
>>>> femdata.FileName = "foo%d.inp" % i
>>>> servermanager.GetRenderView().StillRender()
>>>>
>>>> ParaView takes care of updating other objects for you. If you want to
>>>> learn more, I suggest searching for "demand driven pipeline". The VTK
>>>> book is a good source of information.
>>>>
>>>> -berk
>>>>
>>>> On Fri, Oct 17, 2008 at 12:50 PM, David Fuentes <fuentesdt at gmail.com>
>>>> wrote:
>>>>>
>>>>>
>>>>>
>>>>> Not sure if the AVS file reader is "time aware" but,
>>>>> using the python interface it seems possible to write a script
>>>>> to animate a time series of AVS files.  Changing the reader filename
>>>>> via
>>>>> the
>>>>> python interface seems to work:
>>>>>
>>>>>
>>>>>  pm=servermanager.ProxyManager()
>>>>>  femdata = pm.GetProxy("sources","femdata")
>>>>>  femdata.SetPropertyWithName("FileName",".../new_filename.inp")
>>>>>
>>>>>
>>>>>
>>>>> To create an animation would probably have to update various
>>>>> other objects attached to the reader though.
>>>>> How could you determine all objects attached to the reader
>>>>> that need to be updated?
>>>>>
>>>>>
>>>>> using paraview 3.2.1,
>>>>> df
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> ParaView mailing list
>>>>> ParaView at paraview.org
>>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>>
>>>>
>>>
>>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list