Salome HOME
Porting ParaVis presentations to ParaView-5.0.0 : set correct value of the Lock(Data...
[modules/paravis.git] / src / Macro / annotate_groups.py
index 3d1214872b22197ac34fdab6c2d651a1df60c57d..73e8178c9e56e507fc0d297fc0aa02986414b308 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2014  CEA/DEN, EDF R&D
+# Copyright (C) 2014-2015  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -240,7 +240,14 @@ if data.GetDataObjectType() == vtkDataObjectTypes.GetTypeIdFromClassName("vtkMul
       raise RuntimeError("Point data array has no '%s'." % FAMILY_NODE)
 
     scalarBarlabel = "POINTS"
-    activeRepresentation = 'Points'
+    
+    # Check that PointSprite plugin is available
+    if hasattr(representation, "MaxPixelSize"):
+       activeRepresentation = 'Point Sprite'
+       if representation.MaxPixelSize == 64:
+           representation.MaxPixelSize = 8
+    else:
+        activeRepresentation = 'Points'
 
     dataArray = pointData.GetArray(FAMILY_NODE)
     for tupleId in range(dataArray.GetNumberOfTuples()):
@@ -285,7 +292,7 @@ for idFamily in sortedArray:
       if mapRelations.has_key(famName):
         annotationList.append(str(', ').join(mapRelations.get(famName)))
       else:
-        annotationList.append(str('None group'))
+        annotationList.append(str('No group'))
 
 # Generate indexed colour for array
 indexedColor = []