diff options
author | Antonioya <blendergit@gmail.com> | 2019-04-03 11:25:49 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-04-03 11:25:49 +0300 |
commit | 382b2a9c66a9f8b64581dc2a360dffbbbe706e21 (patch) | |
tree | 4c0bd232085a821f3fe132eb4bb002f95d7d2099 /source/blender/makesrna/intern/rna_gpencil.c | |
parent | a813e259d6309b25fbd0a6d506df810ad2b11395 (diff) |
GPencil: Implement custom channel color in Dopesheet
A new parameter in the layer adjustment panel allows to define the color of the channel in Dopesheet.
This is needed when there are a lot of layers.
See D4623 for more details.
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index eefac818abe..73203beb3e2 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -1145,6 +1145,15 @@ static void rna_def_gpencil_layer(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Opacity", "Layer Opacity"); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); + /* layer channel color (grease pencil) */ + prop = RNA_def_property(srna, "channel_color", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, NULL, "color"); + RNA_def_property_array(prop, 3); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_ui_text(prop, "Custom Channel Color", + "Custom color for animation channel in Dopesheet"); + RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); /* Stroke Drawing Color (Annotations) */ prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA); |