|
| 1 | +""" |
| 2 | +out color_out c |
| 3 | +""" |
| 4 | + |
| 5 | +# Initialization |
| 6 | +if 'BEInputName' not in self.keys(): |
| 7 | + self['BEInputName'] = 'Color' |
| 8 | +if 'BEColor' not in self.keys(): |
| 9 | + self['BEColor'] = (0.0, 0.0, 0.0, 1.0) |
| 10 | + col_prop = self.id_properties_ui("BEColor") |
| 11 | + # Also it could be subtype="COLOR" |
| 12 | + col_prop.update(soft_min=0.0, soft_max=1.0, default=(0, 0, 0, 1.0), subtype="COLOR") # Maybe COLOR_GAMMA |
| 13 | +if 'BEColorDefault' not in self.keys(): |
| 14 | + self['BEColorDefault'] = (0.0, 0.0, 0.0, 1.0) |
| 15 | + col_prop = self.id_properties_ui("BEColorDefault") |
| 16 | + # Also it could be subtype="COLOR" |
| 17 | + col_prop.update(soft_min=0.0, soft_max=1.0, default=(0, 0, 0, 1.0), subtype="COLOR") # Maybe COLOR_GAMMA |
| 18 | + |
| 19 | +# Outputs |
| 20 | +color_out = [[tuple(self['BEColor'])]] |
| 21 | + |
| 22 | +# UI |
| 23 | +def ui(self, context, layout): |
| 24 | + layout.prop(self, '["BEInputName"]', text="Name") |
| 25 | + layout.separator() |
| 26 | + layout.prop(self, '["BEColor"]', text="Color") |
| 27 | + layout.separator() |
| 28 | + layout.prop(self, '["BEColorDefault"]', text="Default") |
0 commit comments