Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-10-02 19:36:51 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-10-02 19:56:34 +0300
commitd1a1302b01f445f9c877d6b8c51f6c561e0fda16 (patch)
tree9f38d4a9a16c54dd7661b695d2f1bdd99611b915 /source/blender
parent03506ee4d145e94a2d364341565a811613984721 (diff)
UI: add NLA track and channel theme color
Patch contributed by Paul (Thirio). Differential Revision: https://developer.blender.org/D5967
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenloader/intern/versioning_userdef.c1
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c2
-rw-r--r--source/blender/editors/include/UI_resources.h1
-rw-r--r--source/blender/editors/interface/resources.c3
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h3
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c12
6 files changed, 20 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index bbae1c8e85e..e769e72d8e1 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -154,6 +154,7 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
FROM_DEFAULT_V4_UCHAR(tui.icon_folder);
FROM_DEFAULT_V4_UCHAR(space_clip.path_keyframe_before);
FROM_DEFAULT_V4_UCHAR(space_clip.path_keyframe_after);
+ copy_v4_v4_uchar(btheme->space_nla.nla_track, btheme->space_nla.header);
}
#undef FROM_DEFAULT_V4_UCHAR
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index d80b96f0d74..8951677b32f 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -3411,7 +3411,7 @@ static void acf_nlatrack_color(bAnimContext *UNUSED(ac), bAnimListElem *ale, flo
}
/* set color for nla track */
- UI_GetThemeColorShade3fv(TH_HEADER, ((nonSolo == false) ? 20 : -20), r_color);
+ UI_GetThemeColorShade3fv(TH_NLA_TRACK, ((nonSolo == false) ? 20 : -20), r_color);
}
/* name for nla track entries */
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index 76ab4a53eb8..89579b88d24 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -283,6 +283,7 @@ typedef enum ThemeColorID {
TH_NLA_TWEAK, /* 'tweaking' track in NLA */
TH_NLA_TWEAK_DUPLI, /* error/warning flag for other strips referencing dupli strip */
+ TH_NLA_TRACK,
TH_NLA_TRANSITION,
TH_NLA_TRANSITION_SEL,
TH_NLA_META,
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 8a570933a33..c9bfafbe764 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -841,6 +841,9 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
cp = ts->nla_tweakdupli;
break;
+ case TH_NLA_TRACK:
+ cp = ts->nla_track;
+ break;
case TH_NLA_TRANSITION:
cp = ts->nla_transition;
break;
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index f36802d33b3..75f29695eb3 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -394,6 +394,8 @@ typedef struct ThemeSpace {
/** NLA - warning color for duplicate instances of tweaking strip. */
unsigned char nla_tweakdupli[4];
+ /** NLA "Track" */
+ unsigned char nla_track[4];
/** NLA "Transition" strips. */
unsigned char nla_transition[4], nla_transition_sel[4];
/** NLA "Meta" strips. */
@@ -414,7 +416,6 @@ typedef struct ThemeSpace {
unsigned char metadatabg[4];
unsigned char metadatatext[4];
- char _pad2[4];
} ThemeSpace;
/* set of colors for use as a custom color set for Objects/Bones wire drawing */
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 078af30e36c..f08a3ce93a1 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -3201,6 +3201,18 @@ static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "View Sliders", "");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
+ prop = RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "ds_channel");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Channel", "Nonlinear Animation Channel");
+ RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
+
+ prop = RNA_def_property(srna, "nla_track", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "nla_track");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Track", "Nonlinear Animation Track");
+ RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
+
prop = RNA_def_property(srna, "active_action", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "anim_active");
RNA_def_property_array(prop, 4);