Hi,

i have an problem with an simple pyton-script and ParaView (v3.12rc2) - trying to use "GetDisplayProperties" in the script (below)

try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

servermanager.LoadState("test.pvsm")
view = GetRenderView()
src = GetActiveSource()

dp = GetDisplayProperties(src)
dp.Visibility = 0


gives an error message:


Traceback (most recent call last):
  File "test.py", line 9, in <module>
    dp = GetDisplayProperties(src)
File "/opt/PARAVIEW_3_12_0_rc2/ParaView-3.12.0-RC2.bin/Utilities/VTKPythonWrapping/site-packages/paraview/simple.py", line 189, in GetDisplayProperties
    return GetRepresentation(proxy, view)
File "/opt/PARAVIEW_3_12_0_rc2/ParaView-3.12.0-RC2.bin/Utilities/VTKPythonWrapping/site-packages/paraview/simple.py", line 178, in GetRepresentation
    rep = servermanager.GetRepresentation(proxy, view)
File "/opt/PARAVIEW_3_12_0_rc2/ParaView-3.12.0-RC2.bin/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", line 1936, in GetRepresentation
    for rep in view.Representations:
AttributeError: 'NoneType' object has no attribute 'Representations'


If i comment out both lines with "dp", everything is fine.

Any ideas what is wrong here?

Best regards and thank you,

     Stefan

_______________________________________________
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

Reply via email to