[Paraview] Problem with Pyton-Script: GetDisplayProperties fails...
Stefan Melber
Stefan.Melber at DLR.de
Tue Oct 11 00:10:33 EDT 2011
Dear Jean,
thank you for the tip. FindSource gives me the right direction - however
- FindSource alone does not help, still the same error. What i found is,
you need to call SetActiveView(GetRenderView()) above. So the running
script now looks like
try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
servermanager.LoadState("test.pvsm")
view = GetRenderView()
SetActiveView(GetRenderView())
GetSources()
#src = GetActiveSource()
src = FindSource("test")
dp = GetDisplayProperties(src)
dp.Visibility = 0
Best regards and thank you,
Stefan
> The culprit is not dp, but src
>
> GetActiveSource() most likely returns nothing
>
> use FindSource("name"), or GetSources()
>
> -----------------
> Jean M. Favre
> Swiss National Supercomputing Center
>
More information about the ParaView
mailing list