[Paraview] Save Data for all branches
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Thu Mar 3 07:16:36 EST 2011
You can use the "macro" functionality to add python scripts are macros
and they show up in the toolbar.
Utkarsh
On Thu, Mar 3, 2011 at 4:55 AM, <owen.arnold at stfc.ac.uk> wrote:
> This is great. Our users would probably need a way of executing such a script without having to open the python shell. Is there any way we could provide this sort of facility for them? Ideally we're after a one-click type approach. We're happy to consider Custom Applications.
>
> Thanks.
>
> -----Original Message-----
> From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com]
> Sent: 02 March 2011 14:34
> To: Arnold, Owen (-,RAL,ISIS)
> Cc: paraview at paraview.org
> Subject: Re: [Paraview] Save Data for all branches
>
> Here's a simple script that saves all "sinks".
>
>
> from paraview.simple import *
>
> counter = 0
> sources = GetSources()
> for source in sources.values():
> has_consumer = False
> for i in range(0, source.GetNumberOfConsumers()):
> consumer = source.GetConsumerProxy(i)
> if consumer in sources.values():
> has_consumer = True
> print has_consumer
> break
> if not has_consumer:
> writer = CreateWriter("/tmp/foo%d.vtk" % counter, source)
> counter = counter + 1
> writer.UpdatePipeline()
> del writer
>
>
> On Wed, Mar 2, 2011 at 8:08 AM, <owen.arnold at stfc.ac.uk> wrote:
>> Hi,
>>
>>
>>
>> Is it there any way to save data from all pipeline branches without
>> selecting them individually? Is this something that could be scripted?
>>
>>
>>
>> Thanks in advance,
>>
>>
>>
>> Owen.
>>
>> --
>> Scanned by iCritical.
>>
>> _______________________________________________
>> 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
>>
>>
> --
> Scanned by iCritical.
>
More information about the ParaView
mailing list