Bugfix: Shapekey NLA Tracks were shown mixed with the ones for Objects
authorJoshua Leung <aligorith@gmail.com>
Sun, 27 Sep 2009 06:27:45 +0000 (06:27 +0000)
committerJoshua Leung <aligorith@gmail.com>
Sun, 27 Sep 2009 06:27:45 +0000 (06:27 +0000)
source/blender/editors/animation/anim_filter.c

index 74b93089bc0c6f023ba76bf531d6f212857cf4ac..13b050e44973baa311d4bfcfdca22318ef3cb593 100644 (file)
@@ -1226,8 +1226,21 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
                ANIMDATA_FILTER_CASES(key,
                        { /* AnimData blocks - do nothing... */ },
                        { /* nla */
-                               /* add NLA tracks */
-                               items += animdata_filter_nla(anim_data, adt, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
+                               /* include shapekey-expand widget? */
+                               if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
+                                       /* check if filtering by active status */
+                                       if ANIMCHANNEL_ACTIVEOK(key) {
+                                               ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, base, ANIMTYPE_OBJECT, (ID *)ob);
+                                               if (ale) {
+                                                       BLI_addtail(anim_data, ale);
+                                                       items++;
+                                               }
+                                       }
+                               }
+                               
+                               /* add NLA tracks - only if expanded or so */
+                               if (FILTER_SKE_OBJD(key) || (filter_mode & ANIMFILTER_CURVESONLY))
+                                       items += animdata_filter_nla(anim_data, adt, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
                        },
                        { /* drivers */
                                /* include shapekey-expand widget? */