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:
Diffstat (limited to 'source/blender/editors/space_nla/nla_draw.c')
-rw-r--r--source/blender/editors/space_nla/nla_draw.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index b0d5360e29b..6fe980cf657 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -266,7 +266,7 @@ static void nla_strip_get_color_inside(AnimData *adt, NlaStrip *strip, float col
}
else if (strip->type == NLASTRIP_TYPE_META) {
/* Meta Clip */
- // TODO: should temporary metas get different colors too?
+ /* TODO: should temporary metas get different colors too? */
if (strip->flag & NLASTRIP_FLAG_SELECT) {
/* selected - use a bold purple color */
UI_GetThemeColor3fv(TH_NLA_META_SEL, color);
@@ -408,6 +408,24 @@ static uint nla_draw_use_dashed_outlines(const float color[4], bool muted)
return shdr_pos;
}
+/** This check only accounts for the track's disabled flag and whether the strip is being tweaked.
+ * It does not account for muting or soloing. */
+static bool is_nlastrip_enabled(AnimData *adt, NlaTrack *nlt, NlaStrip *strip)
+{
+ /** This shouldn't happen. If passed NULL, then just treat strip as enabled. */
+ BLI_assert(adt);
+ if (!adt) {
+ return true;
+ }
+
+ if ((nlt->flag & NLATRACK_DISABLED) == 0) {
+ return true;
+ }
+
+ /** For disabled tracks, only the tweaked strip is enabled. */
+ return adt->actstrip == strip;
+}
+
/* main call for drawing a single NLA-strip */
static void nla_draw_strip(SpaceNla *snla,
AnimData *adt,
@@ -470,7 +488,7 @@ static void nla_draw_strip(SpaceNla *snla,
}
/* draw 'inside' of strip itself */
- if (non_solo == 0) {
+ if (non_solo == 0 && is_nlastrip_enabled(adt, nlt, strip)) {
immUnbindProgram();
/* strip is in normal track */