From: rnv Date: Fri, 6 Feb 2015 11:15:37 +0000 (+0300) Subject: Issue '0022741: [CEA 1251] Display the groups of a med file with one color per family... X-Git-Tag: V7_6_0a1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2c89496d91d88b74a98229f025e9fbe43031a16e;p=modules%2Fparavis.git Issue '0022741: [CEA 1251] Display the groups of a med file with one color per family.': fix remarks. --- diff --git a/src/Macro/annotate_groups.py b/src/Macro/annotate_groups.py index 3d121487..93454743 100644 --- a/src/Macro/annotate_groups.py +++ b/src/Macro/annotate_groups.py @@ -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 = []