From 10d775df3d31ce7622ebb74ed7276cff5f1ffe90 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 26 Jun 2011 14:50:19 +0000 Subject: AnimChannels Filtering Refactor - Part 4 This commit is aimed at cleaning up the filtering code by changing the filtering idiom/pattern used. While the old code used a "check then do" approach, the new code does a "grab then assimilate". The main benefits are that: * the code duplication that used to exist has now been removed, making it easier to add new channel types for data * a recursive "peeking" ability now means that the old problems with data existing deep in the tree (i.e. figuring out whether a channel should be shown based on whether it will have any descendents) should now work much better than before. In the process, I've found and fixed a few previously unnoticed bugs with how some channels were constructed, so hopefully things work a bit better now. TODO's: * Action-Group filtering stuff hasn't been refactored yet. This was causing some grief in the past, so I still need to check this carefully. * Material Nodes support (missing in trunk) should be easy to slot in now :) --- source/blender/editors/include/ED_anim_api.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/include/ED_anim_api.h') diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index e8e179e8c84..7853bd0b5c2 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -184,7 +184,6 @@ typedef enum eAnim_KeyType { /* ----------------- Filtering -------------------- */ /* filtering flags - under what circumstances should a channel be returned */ -// TODO: flag to just test if there's any channel inside worthy of being added - return 1 as soon as this is encountered, but don't add typedef enum eAnimFilter_Flags { /* data which channel represents is fits the dopesheet filters (i.e. scene visibility criteria) */ // XXX: it's hard to think of any examples where this *ISN'T* the case... perhaps becomes implicit? @@ -216,7 +215,10 @@ typedef enum eAnimFilter_Flags { ANIMFILTER_ANIMDATA = (1<<10), /* duplicate entries for animation data attached to multi-user blocks must not occur */ - ANIMFILTER_NODUPLIS = (1<<11) + ANIMFILTER_NODUPLIS = (1<<11), + + /* for checking if we should keep some collapsed channel around (internal use only!) */ + ANIMFILTER_TMP_PEEK = (1<<30) } eAnimFilter_Flags; /* ---------- Flag Checking Macros ------------ */ -- cgit v1.2.3