[Paraview-developers] Script commands that hide/show pipeline objects

Mathieu Westphal mathieu.westphal at kitware.com
Wed May 4 10:54:22 EDT 2016


no direct method, but still quite easy.

ss = GetSources()
for s in ss:
  Hide(ss[s])

Regards,

Mathieu Westphal

On Wed, May 4, 2016 at 4:33 PM, Hallock, Kevin <Kevin.Hallock at pfizer.com>
wrote:

> Thanks!  Is there a way to hide all visible pipeline objects?
>
> Kevin
>
> From: Mathieu Westphal <mathieu.westphal at kitware.com>
> Date: Wednesday, May 4, 2016 at 9:41 AM
> To: Kevin Hallock <Kevin.Hallock at pfizer.com>
> Cc: "paraview-developers at paraview.org" <paraview-developers at paraview.org>
> Subject: Re: [Paraview-developers] Script commands that hide/show
> pipeline objects
>
> Hello
>
> Hide(FindSource(“3rd-Ventricle.ply"))
>
> should do the trick.
>
> Mathieu Westphal
>
> On Wed, May 4, 2016 at 3:35 PM, Hallock, Kevin <Kevin.Hallock at pfizer.com>
> wrote:
>
>> Hi,
>>
>> I would like to write a script that hides all visible pipeline objects
>> and then shows individual objects based on their names in the pipeline
>> browser.
>>
>> Specifically, I have imported multiple PLY files (e.g. 3rd-Ventricle.ply)
>> and added source filter objects (e.g. cylinders).  When I use Hide(), it
>> will hide the active object, but if I try Hide(“3rd-Ventricle.ply”) I
>> receive the following error:
>>
>> Traceback (most recent call last):
>>
>> File "<string>", line 6, in <module>
>>
>> File "/Applications/paraview.app/Contents/Python/paraview/simple.py",
>> line 418, in Hide
>>
>> controller.Hide(proxy, proxy.Port, view)
>>
>> AttributeError: 'str' object has no attribute 'Port'
>>
>> Thanks,
>>
>> Kevin
>>
>> --
>> Kevin Hallock
>> Visualization and Modeling, Quantitative Medicine
>> Neuroscience and Pain Research Unit
>> Worldwide Research and Development
>> Pfizer Inc
>> 610 Main Street
>> Cambridge, MA 02139
>> Email: kevin.hallock at pfizer.com
>> Fax: 845-474-4001
>>
>> _______________________________________________
>> Powered by www.kitware.com
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com&d=CwMFaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=1g3UMDoFa-cwhQK9wtg4edOu2A5c1p0DOmW9iBPeZuA&s=bddd_ZIOeCLqVxChpKkk9nqiTYG7ca9q4ND4agsnNsI&e=>
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=CwMFaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=1g3UMDoFa-cwhQK9wtg4edOu2A5c1p0DOmW9iBPeZuA&s=RECG_NFAc7hWZGZ1FrGIFOhi4YBI9yfHxnvTUbbc08k&e=>
>>
>> Search the list archives at:
>> http://markmail.org/search/?q=Paraview-developers
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3DParaview-2Ddevelopers&d=CwMFaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=1g3UMDoFa-cwhQK9wtg4edOu2A5c1p0DOmW9iBPeZuA&s=CrS-1BLl7FNx6hg56ZzJBNj7p1VOK_lAvkgMpuClF8Q&e=>
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview-developers
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__public.kitware.com_mailman_listinfo_paraview-2Ddevelopers&d=CwMFaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=1g3UMDoFa-cwhQK9wtg4edOu2A5c1p0DOmW9iBPeZuA&s=7b3i5eGGYBWb1szkciQ5fdIcSzsNhATIcnqjMEBcsqw&e=>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20160504/f652591a/attachment-0001.html>


More information about the Paraview-developers mailing list