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:
authorJoshua Leung <aligorith@gmail.com>2013-11-20 10:03:55 +0400
committerJoshua Leung <aligorith@gmail.com>2013-11-20 16:33:02 +0400
commiteb727124852083be13f9fff5ce1def4ffe2a0959 (patch)
treee359816aa1a694fd31244e2d5473803ef7d5c213 /source/blender/editors
parent2f88fc35de4c0714acc3f56683bd13c89107ed8c (diff)
Ported over logic for which animchannel settings are supported by NLA Tracks
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c39
1 files changed, 36 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 977e0194c1f..02e3c6a7aa2 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -2795,9 +2795,42 @@ static short acf_nlatrack_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem
AnimData *adt = ale->adt;
/* visibility of settings depends on various states... */
-
- // XXX:
- return 0;
+ switch (setting) {
+ /* always supported */
+ case ACHANNEL_SETTING_SELECT:
+ case ACHANNEL_SETTING_SOLO:
+ return 1;
+
+ /* conditionally supported... */
+ case ACHANNEL_SETTING_PROTECT:
+ case ACHANNEL_SETTING_MUTE:
+ /* if this track is active and we're tweaking it, don't draw these toggles */
+ if (((nlt->flag & NLATRACK_ACTIVE) && (nlt->flag & NLATRACK_DISABLED)) == 0) {
+ /* is track enabled for solo drawing? */
+ if ((adt) && (adt->flag & ADT_NLA_SOLO_TRACK)) {
+ if (nlt->flag & NLATRACK_SOLO) {
+ /* ok - we've got a solo track, and this is it */
+ return 1;
+ }
+ else {
+ /* not ok - we've got a solo track, but this isn't it, so make it more obvious */
+ return 0;
+ }
+ }
+
+
+ /* ok - no tracks are solo'd, and this isn't being tweaked */
+ return 1;
+ }
+ else {
+ /* unsupported - this track is being tweaked */
+ return 0;
+ }
+
+ /* unsupported */
+ default:
+ return 0;
+ }
}
/* get the appropriate flag(s) for the setting when it is valid */