Scripts: capcolor.py

File capcolor.py, 377 bytes (added by goddard, 16 years ago)
Line 
1#
2# Syntax: runscript capcolor.py lightblue
3#
4# where argument can be a color name or red,green,blue,opacity
5# numeric values in range 0 to 1, e.g. 0,1,0,1 for opaque green.
6#
7import Commands
8color = Commands.convertColor(arguments[0])
9rgba = None if color is None else color.rgba()
10from SurfaceCap import surfcaps
11c = surfcaps.capper()
12c.set_cap_color(rgba)
13c.show_caps()