X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPV_SWIG%2Fparavis.py;h=da1119a1943270836bbb4713feb23049446343b3;hb=0e871e04b7ccebd73efc62bd6bf3f74baeffda8a;hp=db3ad3159d56175de598415c38c87e62bfb5a51f;hpb=4b015556d5938cc157ae97bdc018d08367c0729a;p=modules%2Fparavis.git diff --git a/src/PV_SWIG/paravis.py b/src/PV_SWIG/paravis.py index db3ad315..da1119a1 100644 --- a/src/PV_SWIG/paravis.py +++ b/src/PV_SWIG/paravis.py @@ -67,12 +67,31 @@ def ImportFile(theFileName): "Import a file of any format supported by ParaView" myParavis.ImportFile(theFileName) -## Initialize PARAVIS interface + +def createFunction(theName): + "Create function - constructor of Paravis object" + def MyFunction(): + return myParavis.CreateClass(theName) + return MyFunction + + +def createConstructors(): + "Create constructor functions according to list of extracted classes" + g = globals() + aClassNames = myParavis.GetClassesList(); + for aName in aClassNames: + g[aName] = createFunction(aName) + +## Initialize of a PARAVIS interface myParavis = Initialize(orb, naming_service,lcc,myStudyManager,myStudy, 2) +## Initialize constructor functions +createConstructors() + ## Initialize Paravis static objects -#vtkSMObject = vtkSMObject() -#vtkProcessModule = vtkProcessModule() -#vtkPVPythonModule = vtkPVPythonModule() -#vtkSMProxyManager = vtkSMProxyManager() +vtkSMObject = vtkSMObject() +vtkProcessModule = vtkProcessModule() +vtkPVPythonModule = vtkPVPythonModule() +vtkSMProxyManager = vtkSMProxyManager() +