diff options
author | Joshua Leung <aligorith@gmail.com> | 2012-05-24 05:25:31 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2012-05-24 05:25:31 +0400 |
commit | 8e97203f7d1101d8069b22f0f9a5666812704e22 (patch) | |
tree | 160ce3d1d9751745629d71c42ce3f6f963698843 /source/blender/makesrna/intern/rna_space.c | |
parent | 57b488574a0720eb749e9daa16df1979db9bbe6f (diff) |
Restoring Group Colours for Animation Channels - Part 1
This commit restores the group colours support for F-Curves and F-Curve Groups
in the DopeSheet and Graph Editors. Currently the relevant settings for groups
are only exposed via RNA, but a followup commit will add support for
automatically setting these colours. By default, DopeSheet and Graph Editors are
set to display these colours if/when they are available.
This functionality used to be in 2.48, and is a useful mechanism for visually
distinguishing between channels for different controls when animating (if group
colours are used on the rigs too).
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 0e2fc6e8f11..e4d380ef48c 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2262,6 +2262,12 @@ static void rna_def_space_dopesheet(BlenderRNA *brna) "(Action and Shape Key Editors only)"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, NULL); + prop = RNA_def_property(srna, "show_group_colors", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NODRAWGCOLORS); + RNA_def_property_ui_text(prop, "Show Group Colors", + "Draw groups and channels with colours matching their corresponding groups"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, NULL); + /* editing */ prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOTRANSKEYCULL); @@ -2367,6 +2373,12 @@ static void rna_def_space_graph(BlenderRNA *brna) "(disable for better performance)"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); + prop = RNA_def_property(srna, "show_group_colors", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWGCOLORS); + RNA_def_property_ui_text(prop, "Show Group Colors", + "Draw groups and channels with colours matching their corresponding groups"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); + /* editing */ prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOTRANSKEYCULL); |