]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Update dump trace/study tests.
authorrnv <rnv@opencascade.com>
Thu, 10 Mar 2016 12:19:00 +0000 (15:19 +0300)
committerrnv <rnv@opencascade.com>
Tue, 15 Mar 2016 13:45:30 +0000 (16:45 +0300)
13 files changed:
src/PV_SWIG/presentations.py
test/VisuPrs/dump_study/A0.py
test/VisuPrs/dump_study/A1.py
test/VisuPrs/dump_study/A2.py
test/VisuPrs/dump_study/A3.py
test/VisuPrs/dump_study/A4.py
test/VisuPrs/dump_study/A5.py
test/VisuPrs/dump_study/A6.py
test/VisuPrs/dump_study/A8.py
test/VisuPrs/dump_study/B0.py
test/VisuPrs/dump_study/B3.py
test/VisuPrs/dump_study/B4.py
test/VisuPrs/dump_study/CMakeLists.txt

index 02097ac433c63dacc4f51bbf9d19135c61e7c072..736ecc3536cccafeddfe49c5655e5fe68ce7546f 100644 (file)
@@ -1122,7 +1122,7 @@ def ScalarMapOnField(proxy, entity, field_name, timestamp_nb,
 
     lookup_table.RGBPoints = [data_range[0], 0, 0, 1, data_range[1], 1, 0, 0]
     # Set properties
-    scalarmap.ColorArrayName = (EntityType.get_pvtype(entity), field_name)
+    pvs.ColorBy(scalarmap, (EntityType.get_pvtype(entity), field_name))
     scalarmap.LookupTable = lookup_table
 
     # Add scalar bar
@@ -1213,7 +1213,7 @@ def CutPlanesOnField(proxy, entity, field_name, timestamp_nb,
     lookup_table.RGBPoints = [data_range[0], 0, 0, 1, data_range[1], 1, 0, 0]
 
     # Set properties
-    cut_planes.ColorArrayName = (EntityType.get_pvtype(entity), field_name)
+    pvs.ColorBy(cut_planes, (EntityType.get_pvtype(entity), field_name))
     cut_planes.LookupTable = lookup_table
 
     # Add scalar bar
@@ -1360,7 +1360,7 @@ def CutLinesOnField(proxy, entity, field_name, timestamp_nb,
     lookup_table.RGBPoints = [data_range[0], 0, 0, 1, data_range[1], 1, 0, 0]
 
     # Set properties
-    cut_lines.ColorArrayName = (EntityType.get_pvtype(entity), field_name)
+    pvs.ColorBy(cut_lines, (EntityType.get_pvtype(entity), field_name))
     cut_lines.LookupTable = lookup_table
 
     # Set wireframe represenatation mode
@@ -1439,7 +1439,7 @@ def CutSegmentOnField(proxy, entity, field_name, timestamp_nb,
     lookup_table.RGBPoints = [data_range[0], 0, 0, 1, data_range[1], 1, 0, 0]
 
     # Set properties
-    cut_segment.ColorArrayName = (EntityType.get_pvtype(entity), field_name)
+    pvs.ColorBy(cut_segment, (EntityType.get_pvtype(entity), field_name))
     cut_segment.LookupTable = lookup_table
 
     # Set wireframe represenatation mode
@@ -1562,9 +1562,9 @@ def VectorsOnField(proxy, entity, field_name, timestamp_nb,
 
     # Set properties
     if (is_colored):
-        vectors.ColorArrayName = (EntityType.get_pvtype(entity), 'GlyphVector')
+        pvs.ColorBy(vectors, (EntityType.get_pvtype(entity), 'GlyphVector'))
     else:
-        vectors.ColorArrayName = (None, '')
+        pvs.ColorBy(vectors, (EntityType.get_pvtype(entity), None))
     vectors.LookupTable = lookup_table
 
     vectors.LineWidth = 1.0
@@ -1666,9 +1666,9 @@ def DeformedShapeOnField(proxy, entity, field_name,
 
     # Set properties
     if is_colored:
-        defshape.ColorArrayName = (EntityType.get_pvtype(entity), field_name)
+        pvs.ColorBy(defshape, (EntityType.get_pvtype(entity), field_name))
     else:
-        defshape.ColorArrayName = (None, '')
+        pvs.ColorBy(defshape, (EntityType.get_pvtype(entity), None))
     defshape.LookupTable = lookup_table
 
     # Set wireframe represenatation mode
@@ -1789,7 +1789,7 @@ def DeformedShapeAndScalarMapOnField(proxy, entity, field_name,
     lookup_table.RGBPoints = [data_range[0], 0, 0, 1, data_range[1], 1, 0, 0]
 
     # Set properties
-    defshapemap.ColorArrayName = (EntityType.get_pvtype(scalar_field_entity), scalar_field)
+    pvs.ColorBy(defshapemap, (EntityType.get_pvtype(scalar_field_entity), scalar_field))
     defshapemap.LookupTable = lookup_table
 
     # Add scalar bar
@@ -1964,7 +1964,7 @@ def Plot3DOnField(proxy, entity, field_name, timestamp_nb,
     lookup_table.RGBPoints = [data_range[0], 0, 0, 1, data_range[1], 1, 0, 0]
 
     # Set properties
-    plot3d.ColorArrayName = (EntityType.get_pvtype(entity), field_name)
+    pvs.ColorBy(plot3d, (EntityType.get_pvtype(entity), field_name))
     plot3d.LookupTable = lookup_table
 
     # Add scalar bar
@@ -2045,7 +2045,7 @@ def IsoSurfacesOnField(proxy, entity, field_name, timestamp_nb,
     if (scalar_range is None):
         scalar_range = get_data_range(proxy, entity,
                                       field_name, cut_off=True)
-
+        
     # Get contour values for the range
     surfaces = get_contours(scalar_range, nb_surfaces)
 
@@ -2072,9 +2072,9 @@ def IsoSurfacesOnField(proxy, entity, field_name, timestamp_nb,
 
     # Set display properties
     if (is_colored):
-        isosurfaces.ColorArrayName = (EntityType.get_pvtype(entity), field_name)
+        pvs.ColorBy(isosurfaces, (EntityType.get_pvtype(entity), field_name))
     else:
-        isosurfaces.ColorArrayName = (None, '')
+        pvs.ColorBy(isosurfaces, (EntityType.get_pvtype(entity), None))
         if color:
             isosurfaces.DiffuseColor = color
     isosurfaces.LookupTable = lookup_table
@@ -2201,9 +2201,9 @@ def GaussPointsOnField(proxy, entity, field_name,
 
     # Set display properties
     if is_colored:
-        gausspnt.ColorArrayName = (EntityType.get_pvtype(entity), field_name)
+        pvs.ColorBy(gausspnt, (EntityType.get_pvtype(entity), field_name))
     else:
-        gausspnt.ColorArrayName = (None, '')
+        pvs.ColorBy(gausspnt, (EntityType.get_pvtype(entity), None))
         if color:
             gausspnt.DiffuseColor = color
 
@@ -2339,9 +2339,9 @@ def GaussPointsOnField1(proxy, entity, field_name,
 
     # Set display properties
     if is_colored:
-        gausspnt.ColorArrayName = (EntityType.get_pvtype(entity), field_name)
+        pvs.ColorBy(gausspnt, (EntityType.get_pvtype(entity), field_name))
     else:
-        gausspnt.ColorArrayName = (None, '')
+        pvs.ColorBy(gausspnt, (EntityType.get_pvtype(entity), None))
         if color:
             gausspnt.DiffuseColor = color
 
@@ -2499,9 +2499,9 @@ def StreamLinesOnField(proxy, entity, field_name, timestamp_nb,
 
     # Set properties
     if is_colored:
-        streamlines.ColorArrayName = (EntityType.get_pvtype(entity), field_name)
+        pvs.ColorBy(streamlines, (EntityType.get_pvtype(entity), field_name))
     else:
-        streamlines.ColorArrayName = (None, '')
+        pvs.ColorBy(streamlines, (EntityType.get_pvtype(entity), None))
         if color:
             streamlines.DiffuseColor = color
 
@@ -2544,7 +2544,7 @@ def MeshOnEntity(proxy, mesh_name, entity):
         proxy.GetDataInformation().GetNumberOfCells()):
         my_view = pvs.GetRenderView()
         prs = pvs.GetRepresentation(proxy, view=my_view)
-        prs.ColorArrayName = (None, '')
+        pvs.ColorBy(prs, (EntityType.get_pvtype(entity), None))
 
     return prs
 
@@ -2583,7 +2583,7 @@ def MeshOnGroup(proxy, extrGroups, group_name):
         if nb_points or nb_cells:
 #            prs = pvs.GetRepresentation(proxy)
             prs = pvs.Show()
-            prs.ColorArrayName = ''
+            prs.ColorArrayName = (None, '')
             display_only(prs)
 
     return prs
index 762f28c7a2ac318a7f065464b814eee6f7828e91..55a1c7e8dd3d187d77a2d75bd581176de4fb678f 100644 (file)
@@ -44,6 +44,8 @@ if med_reader is None :
 med_field = "vitesse"
 
 scalarmap = ScalarMapOnField(med_reader, EntityType.NODE, med_field, 1)
+scalarmap.Visibility = 1
+scalarmap.SetScalarBarVisibility(GetActiveView(),1)
 
 # apply settings
 scalarmap.Position = settings["Offset"]
@@ -60,8 +62,9 @@ bar.NumberOfLabels = settings["NbLabels"]
 bar.Title = settings["Title"]
 bar.Orientation = settings["Orientation"]
 
-text  = smtrace.stop_trace()
+
 # 3. Dump Study
+text  = smtrace.stop_trace()
 path_to_save = os.path.join(os.getenv("HOME"), "ScalarMap.py")
 save_trace( path_to_save, text )
 
@@ -74,8 +77,8 @@ view = CreateRenderView()
 execfile(path_to_save)
 
 # 6. Checking of the settings done before dump
-recreated_bar = view.Representations[0]
-recreated_scalarmap = view.Representations[1]
+recreated_bar = view.Representations[1]
+recreated_scalarmap = view.Representations[0]
 
 errors = 0
 tolerance = 1e-05
index e0ef96d7c0bfe97eb5e5757d12d9792015e705ec..2123c74fdb6f748259ae43b065ec9ce276e83379 100644 (file)
@@ -23,6 +23,15 @@ from paravistest import datadir, delete_with_inputs
 from presentations import *
 from pvsimple import *
 
+from paravistest import save_trace
+from paraview import smtrace
+GetActiveViewOrCreate('RenderView')
+
+config = smtrace.start_trace()
+config.SetFullyTraceSupplementalProxies(True)
+config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
+
+
 settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal', "NbSurfaces": 444}
 
 # 1. TimeStamps.med import
@@ -36,6 +45,8 @@ if med_reader is None :
 med_field = "vitesse"
 
 isosurfaces = IsoSurfacesOnField(med_reader, EntityType.NODE, med_field, 1)
+isosurfaces.Visibility = 1
+isosurfaces.SetScalarBarVisibility(GetActiveView(),1)
 
 # apply settings
 isosurfaces.Position = settings["Offset"]
@@ -59,8 +70,9 @@ bar.Title = settings["Title"]
 bar.Orientation = settings["Orientation"]
 
 # 3. Dump Study
+text  = smtrace.stop_trace()
 path_to_save = os.path.join(os.getenv("HOME"), "IsoSurfaces.py")
-SaveTrace( path_to_save )
+save_trace( path_to_save, text )
 
 # 4. Delete the created objects, recreate the view
 delete_with_inputs(isosurfaces)
@@ -71,8 +83,8 @@ view = CreateRenderView()
 execfile(path_to_save)
 
 # 6. Checking of the settings done before dump
-recreated_bar = view.Representations[0]
-recreated_isosurfaces = view.Representations[1]
+recreated_bar = view.Representations[1]
+recreated_isosurfaces = view.Representations[0]
 
 errors = 0
 tolerance = 1e-05
index b996b2e54b4133894ae60bc0b375181efab8d782..9ec74067a8f8ba906245960b221ac77c350b2217 100644 (file)
 from paravistest import datadir, delete_with_inputs
 from presentations import *
 from pvsimple import *
+from paravistest import save_trace
+from paraview import smtrace
+
+GetActiveViewOrCreate('RenderView')
+
+config = smtrace.start_trace()
+config.SetFullyTraceSupplementalProxies(True)
+config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
 
 settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal'}
 
@@ -36,6 +44,8 @@ if med_reader is None :
 med_field = "vitesse"
 
 cutplanes = CutPlanesOnField(med_reader, EntityType.NODE, med_field, 1)
+cutplanes.Visibility = 1
+cutplanes.SetScalarBarVisibility(GetActiveView(),1)
 
 # apply settings
 cutplanes.Position = settings["Offset"]
@@ -60,8 +70,9 @@ bar.Title = settings["Title"]
 bar.Orientation = settings["Orientation"]
 
 # 3. Dump Study
+text  = smtrace.stop_trace()
 path_to_save = os.path.join(os.getenv("HOME"), "CutPlanes.py")
-SaveTrace( path_to_save )
+save_trace( path_to_save, text )
 
 # 4. Delete the created objects, recreate the view
 delete_with_inputs(cutplanes)
@@ -72,8 +83,8 @@ view = CreateRenderView()
 execfile(path_to_save)
 
 # 6. Checking of the settings done before dump
-recreated_bar = view.Representations[0]
-recreated_cutplanes = view.Representations[1]
+recreated_bar = view.Representations[1]
+recreated_cutplanes = view.Representations[0]
 
 errors = 0
 tolerance = 1e-05
index 2e3cfa3ed584bc0f24fa9dc0ec7412a925a5e127..1d43ea55d6375c0dd42a41dae3a4ea507624ace3 100644 (file)
 from paravistest import datadir, delete_with_inputs
 from presentations import *
 from pvsimple import *
+from paravistest import save_trace
+from paraview import smtrace
+
+GetActiveViewOrCreate('RenderView')
+
+config = smtrace.start_trace()
+config.SetFullyTraceSupplementalProxies(True)
+config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
 
 settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal', "Scale": 0.333, "ColorArray": "", "ColorComponents": [0.111, 0.222, 0.333]}
 
@@ -35,7 +43,9 @@ if med_reader is None :
 # 2. DeformedShape creation
 med_field = "vitesse"
 
-deformedshape = DeformedShapeOnField(med_reader, EntityType.NODE, med_field, 1)
+deformedshape = DeformedShapeOnField(med_reader, EntityType.NODE, med_field, 1, None, True)
+deformedshape.Visibility = 1
+deformedshape.SetScalarBarVisibility(GetActiveView(),1)
 
 # apply settings
 deformedshape.Position = settings["Offset"]
@@ -57,8 +67,9 @@ bar.Title = settings["Title"]
 bar.Orientation = settings["Orientation"]
 
 # 3. Dump Study
+text  = smtrace.stop_trace()
 path_to_save = os.path.join(os.getenv("HOME"), "DeformedShape.py")
-SaveTrace( path_to_save )
+save_trace( path_to_save, text )
 
 # 4. Delete the created objects, recreate the view
 delete_with_inputs(deformedshape)
@@ -69,8 +80,8 @@ view = CreateRenderView()
 execfile(path_to_save)
 
 # 6. Checking of the settings done before dump
-recreated_bar = view.Representations[0]
-recreated_deformedshape = view.Representations[1]
+recreated_bar = view.Representations[1]
+recreated_deformedshape = view.Representations[0]
 
 errors = 0
 tolerance = 1e-05
@@ -159,8 +170,8 @@ if abs(scale - settings["Scale"]) > tolerance:
 
 # Color array name
 array_name = recreated_deformedshape.ColorArrayName[1]
-if array_name != settings["ColorArray"]:
-    print "ERROR!!! Color array name of presentation is incorrect: ",  array_name, " instead of ", settings["arrayName"]
+if array_name != med_field:
+    print "ERROR!!! Color array name of presentation is incorrect: ",  array_name , " instead of ", med_field
     errors += 1
 
 # Color
index ce566bb4821fcb19ca6bb5ced80dc92b99e075fc..f725439bdb843e79eb6e2c67fa79a8c18e75a5ce 100644 (file)
 from paravistest import datadir, delete_with_inputs
 from presentations import *
 from pvsimple import *
+from paravistest import save_trace
+from paraview import smtrace
+
+GetActiveViewOrCreate('RenderView')
+
+config = smtrace.start_trace()
+config.SetFullyTraceSupplementalProxies(True)
+config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
+
 
 settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 1), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation"}
 
@@ -36,6 +45,8 @@ if med_reader is None :
 med_field = "pression"
 
 gausspoints = GaussPointsOnField(med_reader, EntityType.CELL, med_field, 1)
+gausspoints.Visibility = 1
+gausspoints.SetScalarBarVisibility(GetActiveView(),1)
 
 # apply settings
 gausspoints.Position = settings["Offset"]
@@ -51,8 +62,9 @@ bar.NumberOfLabels = settings["NbLabels"]
 bar.Title = settings["Title"]
 
 # 3. Dump Study
+text  = smtrace.stop_trace()
 path_to_save = os.path.join(os.getenv("HOME"), "GaussPoints.py")
-SaveTrace( path_to_save )
+save_trace( path_to_save, text )
 
 # 4. Delete the created objects, recreate the view
 delete_with_inputs(gausspoints)
@@ -63,8 +75,8 @@ view = CreateRenderView()
 execfile(path_to_save)
 
 # 6. Checking of the settings done before dump
-recreated_bar = view.Representations[0]
-recreated_gausspoints = view.Representations[1]
+recreated_bar = view.Representations[1]
+recreated_gausspoints = view.Representations[0]
 
 errors = 0
 tolerance = 1e-05
index 4a6583af3875c2c5e9f732c9f87926a872a3c3bb..391dd504f215de4210f2909affc7317c48aea747 100644 (file)
 from paravistest import datadir, delete_with_inputs
 from presentations import *
 from pvsimple import *
+from paravistest import save_trace
+from paraview import smtrace
+
+GetActiveViewOrCreate('RenderView')
+
+config = smtrace.start_trace()
+config.SetFullyTraceSupplementalProxies(True)
+config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
 
 settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal', "ScaleFactor": 0.25, "NbContours": 4}
 
@@ -36,6 +44,8 @@ if med_reader is None :
 med_field = "VITESSE"
 
 plot3d = Plot3DOnField(med_reader, EntityType.NODE, med_field, 1, is_contour=True)
+plot3d.Visibility = 1
+plot3d.SetScalarBarVisibility(GetActiveView(),1)
 
 # apply settings
 plot3d.Position = settings["Offset"]
@@ -68,8 +78,9 @@ bar.Title = settings["Title"]
 bar.Orientation = settings["Orientation"]
 
 # 3. Dump Study
+text  = smtrace.stop_trace()
 path_to_save = os.path.join(os.getenv("HOME"), "Plot3D.py")
-SaveTrace( path_to_save )
+save_trace( path_to_save, text )
 
 # 4. Delete the created objects, recreate the view
 delete_with_inputs(plot3d)
@@ -80,8 +91,8 @@ view = CreateRenderView()
 execfile(path_to_save)
 
 # 6. Checking of the settings done before dump
-recreated_bar = view.Representations[0]
-recreated_plot3d = view.Representations[1]
+recreated_bar = view.Representations[1]
+recreated_plot3d = view.Representations[0]
 
 errors = 0
 tolerance = 1e-05
index 7a024830d278f37f09efc65f30a5717c8782dd93..81c89b6a9711e4aa06d8c64a2ecb677dd38cf1a5 100644 (file)
 from paravistest import datadir, delete_with_inputs
 from presentations import *
 from pvsimple import *
+from paravistest import save_trace
+from paraview import smtrace
+
+GetActiveViewOrCreate('RenderView')
+
+config = smtrace.start_trace()
+config.SetFullyTraceSupplementalProxies(True)
+config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
 
 settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal', "Scale": 0.12929}
 
@@ -36,6 +44,8 @@ if med_reader is None:
 med_field = "vitesse"
 
 prs = DeformedShapeAndScalarMapOnField(med_reader, EntityType.NODE, med_field, 1)
+prs.Visibility = 1
+prs.SetScalarBarVisibility(GetActiveView(),1)
 
 # apply settings
 prs.Position = settings["Offset"]
@@ -57,8 +67,9 @@ bar.Title = settings["Title"]
 bar.Orientation = settings["Orientation"]
 
 # 3. Dump Study
+text  = smtrace.stop_trace()
 path_to_save = os.path.join(os.getenv("HOME"), "ScalarMapOnDeformedShape.py")
-SaveTrace( path_to_save )
+save_trace( path_to_save, text )
 
 # 4. Delete the created objects, recreate the view
 delete_with_inputs(prs)
@@ -69,8 +80,8 @@ view = CreateRenderView()
 execfile(path_to_save)
 
 # 6. Checking of the settings done before dump
-recreated_bar = view.Representations[0]
-recreated_prs = view.Representations[1]
+recreated_bar = view.Representations[1]
+recreated_prs = view.Representations[0]
 
 errors = 0
 tolerance = 1e-05
index 32a28fd1fef14a80e04316f422ab1f8462a7e01e..f45e9f96e4668070b9af48ba5cd9efeb856e20d1 100644 (file)
 from paravistest import datadir, delete_with_inputs
 from presentations import *
 from pvsimple import *
+from paravistest import save_trace
+from paraview import smtrace
 
-settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal', "Scale": 0.333, "ColorArray": "", "ColorComponents": [0.111, 0.222, 0.333],  "LineWidth": 2, "GlyphType": 'Cone', "GlyphPos": [-0.5, 0.0, 0.0]}
+GetActiveViewOrCreate('RenderView')
+
+config = smtrace.start_trace()
+config.SetFullyTraceSupplementalProxies(True)
+config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
+
+
+settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal', "Scale": 0.333, "ColorComponents": [0.111, 0.222, 0.333],  "LineWidth": 2, "GlyphType": 'Cone', "GlyphPos": [-0.5, 0.0, 0.0]}
 
 # 1. TimeStamps.med import
 file_path = datadir + "TimeStamps.med"
@@ -35,7 +44,9 @@ if med_reader is None :
 # 2. Vectors creation
 med_field = "vitesse"
 
-vectors = VectorsOnField(med_reader, EntityType.NODE, med_field, 1)
+vectors = VectorsOnField(med_reader, EntityType.NODE, med_field, 1,is_colored=True)
+vectors.Visibility = 1
+vectors.SetScalarBarVisibility(GetActiveView(),1)
 
 # apply settings
 vectors.Position = settings["Offset"]
@@ -45,8 +56,7 @@ vectors.LookupTable.Discretize = settings["Discretize"]
 vectors.LookupTable.NumberOfTableValues = settings["NbColors"]
 vectors.LookupTable.UseLogScale = settings["UseLogScale"]
 
-vectors.Input.SetScaleFactor = settings["Scale"]
-vectors.ColorArrayName = (None, '')
+vectors.Input.ScaleFactor = settings["Scale"]
 vectors.AmbientColor = settings["ColorComponents"]
 
 vectors.LineWidth = settings["LineWidth"]
@@ -63,8 +73,9 @@ bar.Orientation = settings["Orientation"]
 cone_glyth_type = type(vectors.Input.GlyphType)
 
 # 3. Dump Study
+text  = smtrace.stop_trace()
 path_to_save = os.path.join(os.getenv("HOME"), "Vectors.py")
-SaveTrace( path_to_save )
+save_trace( path_to_save, text )
 
 # 4. Delete the created objects, recreate the view
 delete_with_inputs(vectors)
@@ -75,8 +86,8 @@ view = CreateRenderView()
 execfile(path_to_save)
 
 # 6. Checking of the settings done before dump
-recreated_bar = view.Representations[0]
-recreated_vectors = view.Representations[1]
+recreated_bar = view.Representations[1]
+recreated_vectors = view.Representations[0]
 
 errors = 0
 tolerance = 1e-05
@@ -158,15 +169,15 @@ if orientation != settings["Orientation"]:
     errors += 1
 
 # Scale factor
-scale = recreated_vectors.Input.SetScaleFactor
+scale = recreated_vectors.Input.ScaleFactor
 if abs(scale - settings["Scale"]) > tolerance:
     print "ERROR!!! Scale of presentation is incorrect: ",  scale, " instead of ", settings["Scale"]
     errors += 1
 
 # Color array name
 array_name = recreated_vectors.ColorArrayName[1]
-if array_name != settings["ColorArray"]:
-    print "ERROR!!! Color array name of presentation is incorrect: ",  array_name, " instead of ", settings["arrayName"]
+if array_name != med_field:
+    print "ERROR!!! Color array name of presentation is incorrect: ",  array_name, " instead of ", med_field
     errors += 1
 
 # Color
index 61f7aaf53c6cb741ed6c93aa6be3baad840e1ff8..714ee9b855d690f4bf546f492474a8de70a49965 100644 (file)
 from paravistest import datadir
 from presentations import *
 from pvsimple import *
+from paravistest import save_trace
+from paraview import smtrace
+
+GetActiveViewOrCreate('RenderView')
+
+config = smtrace.start_trace()
+config.SetFullyTraceSupplementalProxies(True)
+config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
 
 # 1. TimeStamps.med import
 file_path = datadir + "TimeStamps.med"
@@ -57,8 +65,9 @@ for name in prs_names:
         prs_list.append(prs)
 
 # 3. Dump Study
+text  = smtrace.stop_trace()
 path_to_save = os.path.join(os.getenv("HOME"), "AllPresentations.py")
-SaveTrace( path_to_save )
+save_trace( path_to_save, text )
 
 # 4. Delete the created objects, recreate the view
 source_list = GetSources().values()
index 5269eff4b05db159f484a8008ee0420df96d7875..cee60c692868df2b3bf402def74f90c5d5c1b265 100644 (file)
 import paravistest
 from presentations import *
 from pvsimple import *
+from paravistest import save_trace
+from paraview import smtrace
+
+config = smtrace.start_trace()
+config.SetFullyTraceSupplementalProxies(True)
+config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
 
 # 1. Table creation
 title = "My Table"
@@ -69,8 +75,9 @@ table.UpdatePipeline()
 orig_script = table.Script
 
 # 2. Dump Study
+text  = smtrace.stop_trace()
 path_to_save = os.path.join(os.getenv("HOME"), "table.py")
-SaveTrace(path_to_save)
+save_trace( path_to_save, text )
 
 # 3. Delete the table
 Delete(table)
index 80556bd5de46a58488410f84544740c6f31a9a1d..d964d250958cd7a500dc4fa0039259180ca71cd3 100644 (file)
 import paravistest
 from presentations import *
 from pvsimple import *
+from paravistest import save_trace
+from paraview import smtrace
+
+config = smtrace.start_trace()
+config.SetFullyTraceSupplementalProxies(True)
+config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
+
 
 # 1. Table creation
 title = "My Table"
@@ -69,8 +76,9 @@ table.UpdatePipeline()
 orig_script = table.Script
 
 # 2. Dump Study
+text  = smtrace.stop_trace()
 path_to_save = os.path.join(os.getenv("HOME"), "table.py")
-SaveTrace(path_to_save)
+save_trace( path_to_save, text )
 
 # 3. Delete the table
 Delete(table)
index f5316281fc6c0ef94ea98d729d731d84f09d0feb..90aa0dcd771f7090e88dcc73e66ee80701e5af07 100644 (file)
@@ -18,7 +18,7 @@
 #
 
 SET(BASE_TESTS A0 B0)
-SET(ALL_TESTS  A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B3 B4 B5)
+SET(ALL_TESTS  A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B3 B4 B5)
 
 # For make test
 IF(SALOME_PARAVIS_ALL_TEST)