Closed MaticPogacnik closed 5 years ago
Yes, sorry. As shown in the plots_image.bob and scripts/select_colormap.py example, one needs to use a script because the color map could be one of the predefined ones, or a custom one. Too hard to handle all that in a rule.
Rule for Image widget to change color map generates invalid script:
` from org.csstudio.display.builder.runtime.script import PVUtil
if true: widget.setPropertyValue('color_map', "GRAY")
else: widget.setPropertyValue('color_map', "GRAY") `
Which is not working as setPropertyValue is expecting ColorMap object as second parameter not string. Workaround for now is custom script, which use predefined PredefinedColorMaps class.