Animation Channel Filtering Refactor - Part 1
authorJoshua Leung <aligorith@gmail.com>
Tue, 21 Jun 2011 01:41:39 +0000 (01:41 +0000)
committerJoshua Leung <aligorith@gmail.com>
Tue, 21 Jun 2011 01:41:39 +0000 (01:41 +0000)
* Removed list-expanders for Materials, Textures, and Particles. So
instead of:
  Object
     Materials
        Material 1
             ... material 1 anim data ...
  we now have
  Object
     Material 1
         ... material 1 anim data ...
 This makes it faster+easier to get to these items. If you don't want
to see all of these, you can still use the data-block filters from the
header to hide these.

* Internal cleanup - removed "owner" and "ownertype" settings from
bAnimListElem. The purpose of these was muddled, and more of a hassle
to maintain than doing anything useful - it was only really used for
the stuff above.

* Removed need for "sa->spacedata.first" casts all over the show for
animation editor tools which needed access to editor data. This can
now be retrieved directly.

source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_graph/graph_select.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/transform/transform_generics.c

index 51fde09b0744cc2df920272174bd454da7360ef1..c71ffe9cd5eadea81ae6f74204a4f351a37767eb 100644 (file)
@@ -159,8 +159,8 @@ static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, floa
        short indent= (acf->get_indent_level) ? acf->get_indent_level(ac, ale) : 0;
        
        /* get context info needed... */
-       if ((ac->sa) && (ac->sa->spacetype == SPACE_ACTION))
-               saction= (SpaceAction *)ac->sa->spacedata.first;
+       if ((ac->sl) && (ac->spacetype == SPACE_ACTION))
+               saction= (SpaceAction *)ac->sl;
                
        if (ale->type == ANIMTYPE_FCURVE) {
                FCurve *fcu= (FCurve *)ale->data;
@@ -235,13 +235,6 @@ static short acf_generic_indention_flexible(bAnimContext *UNUSED(ac), bAnimListE
 {
        short indent= 0;
        
-       if (ale->id) {
-               /* special exception for materials, textures, and particles */
-               // xxx should tex use indention 2?
-               if (ELEM3(GS(ale->id->name),ID_MA,ID_PA,ID_TE))
-                       indent++;
-       }
-       
        /* grouped F-Curves need extra level of indention */
        if (ale->type == ANIMTYPE_FCURVE) {
                FCurve *fcu= (FCurve *)ale->data;
@@ -274,24 +267,11 @@ static short acf_generic_group_offset(bAnimContext *ac, bAnimListElem *ale)
        if (ale->id) {
                /* special exception for textures */
                if (GS(ale->id->name) == ID_TE) {
-                       /* minimum offset */
                        offset += 21;
-                       
-                       /* special offset from owner type */
-                       switch (ale->ownertype) {
-                               case ANIMTYPE_DSMAT:
-                                       offset += 21;
-                                       break;
-                                       
-                               case ANIMTYPE_DSLAM:
-                               case ANIMTYPE_DSWOR:
-                                       offset += 14;
-                                       break;
-                       }
                }
                /* special exception for materials and particles */
                else if (ELEM(GS(ale->id->name),ID_MA,ID_PA)) 
-                       offset += 21;
+                       offset += 14;
                        
                /* if not in Action Editor mode, groupings must carry some offset too... */
                else if (ac->datatype != ANIMCONT_ACTION)
@@ -324,46 +304,6 @@ static short acf_generic_none_setting_valid(bAnimContext *ac, bAnimListElem *ale
 }
 #endif
 
-/* check if some setting exists for this object-based data-expander (category only) */
-static short acf_generic_dsexpand_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting)
-{
-       switch (setting) {
-               /* only expand supported everywhere */
-               case ACHANNEL_SETTING_EXPAND:
-                       return 1;
-                       
-               /* visible 
-                *      - only available in Graph Editor 
-                *      - NOT available for 'filler' channels
-                */
-               case ACHANNEL_SETTING_VISIBLE: 
-                       if (ELEM3(ale->type, ANIMTYPE_FILLMATD, ANIMTYPE_FILLPARTD, ANIMTYPE_FILLTEXD))
-                               return 0;
-                       else
-                               return ((ac) && (ac->spacetype == SPACE_IPO));
-                       
-               default:
-                       return 0;
-       }
-}
-
-/* get pointer to the setting (category only) */
-static void *acf_generic_dsexpand_setting_ptr(bAnimListElem *ale, int setting, short *type)
-{
-       Object *ob= (Object *)ale->data;
-       
-       /* clear extra return data first */
-       *type= 0;
-       
-       switch (setting) {
-               case ACHANNEL_SETTING_EXPAND: /* expanded */
-                       GET_ACF_FLAG_PTR(ob->nlaflag); // XXX
-               
-               default: /* unsupported */
-                       return NULL;
-       }
-}
-
 /* check if some setting exists for this object-based data-expander (datablock only) */
 static short acf_generic_dataexpand_setting_valid(bAnimContext *ac, bAnimListElem *UNUSED(ale), int setting)
 {
@@ -459,8 +399,8 @@ static void *acf_summary_setting_ptr(bAnimListElem *ale, int setting, short *typ
        /* if data is valid, return pointer to active dopesheet's relevant flag 
         *      - this is restricted to DopeSheet/Action Editor only
         */
-       if ((ac->sa) && (ac->spacetype == SPACE_ACTION) && (setting == ACHANNEL_SETTING_EXPAND)) {
-               SpaceAction *saction= (SpaceAction *)ac->sa->spacedata.first;
+       if ((ac->sl) && (ac->spacetype == SPACE_ACTION) && (setting == ACHANNEL_SETTING_EXPAND)) {
+               SpaceAction *saction= (SpaceAction *)ac->sl;
                bDopeSheet *ads= &saction->ads;
                
                /* return pointer to DopeSheet's flag */
@@ -782,7 +722,7 @@ static short acf_group_setting_valid(bAnimContext *ac, bAnimListElem *UNUSED(ale
        /* for now, all settings are supported, though some are only conditionally */
        switch (setting) {
                case ACHANNEL_SETTING_VISIBLE: /* Only available in Graph Editor */
-                       return ((ac->sa) && (ac->sa->spacetype==SPACE_IPO));
+                       return (ac->spacetype==SPACE_IPO);
                        
                default: /* always supported */
                        return 1;
@@ -879,7 +819,7 @@ static short acf_fcurve_setting_valid(bAnimContext *ac, bAnimListElem *ale, int
                                return 0; // NOTE: in this special case, we need to draw ICON_ZOOMOUT
                                
                case ACHANNEL_SETTING_VISIBLE: /* Only available in Graph Editor */
-                       return ((ac->sa) && (ac->sa->spacetype==SPACE_IPO));
+                       return (ac->spacetype==SPACE_IPO);
                        
                /* always available */
                default:
@@ -1101,203 +1041,6 @@ static bAnimChannelType ACF_FILLDRIVERS =
        acf_filldrivers_setting_ptr             /* pointer for setting */
 };
 
-/* Materials Expander  ------------------------------------------- */
-
-// TODO: just get this from RNA?
-static int acf_fillmatd_icon(bAnimListElem *UNUSED(ale))
-{
-       return ICON_MATERIAL_DATA;
-}
-
-static void acf_fillmatd_name(bAnimListElem *UNUSED(ale), char *name)
-{
-       BLI_strncpy(name, "Materials", ANIM_CHAN_NAME_SIZE);
-}
-
-/* get the appropriate flag(s) for the setting when it is valid  */
-static int acf_fillmatd_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
-{
-       /* clear extra return data first */
-       *neg= 0;
-       
-       switch (setting) {
-               case ACHANNEL_SETTING_EXPAND: /* expanded */
-                       return OB_ADS_SHOWMATS;
-               
-               default: /* unsupported */
-                       return 0;
-       }
-}
-
-/* materials expander type define */
-static bAnimChannelType ACF_FILLMATD= 
-{
-       "Materials Filler",                             /* type name */
-       
-       acf_generic_dataexpand_color,   /* backdrop color */
-       acf_generic_dataexpand_backdrop,/* backdrop */
-       acf_generic_indention_1,                /* indent level */
-       acf_generic_basic_offset,               /* offset */
-       
-       acf_fillmatd_name,                              /* name */
-       acf_fillmatd_icon,                              /* icon */
-       
-       acf_generic_dsexpand_setting_valid,     /* has setting */
-       acf_fillmatd_setting_flag,                              /* flag for setting */
-       acf_generic_dsexpand_setting_ptr                /* pointer for setting */
-};
-
-/* Particles Expander  ------------------------------------------- */
-
-// TODO: just get this from RNA?
-static int acf_fillpartd_icon(bAnimListElem *UNUSED(ale))
-{
-       return ICON_PARTICLE_DATA;
-}
-
-static void acf_fillpartd_name(bAnimListElem *UNUSED(ale), char *name)
-{
-       BLI_strncpy(name, "Particles", ANIM_CHAN_NAME_SIZE);
-}
-
-/* get the appropriate flag(s) for the setting when it is valid  */
-static int acf_fillpartd_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
-{
-       /* clear extra return data first */
-       *neg= 0;
-       
-       switch (setting) {
-               case ACHANNEL_SETTING_EXPAND: /* expanded */
-                       return OB_ADS_SHOWPARTS;
-               
-               default: /* unsupported */
-                       return 0;
-       }
-}
-
-/* particles expander type define */
-static bAnimChannelType ACF_FILLPARTD= 
-{
-       "Particles Filler",                             /* type name */
-       
-       acf_generic_dataexpand_color,   /* backdrop color */
-       acf_generic_dataexpand_backdrop,/* backdrop */
-       acf_generic_indention_1,                /* indent level */
-       acf_generic_basic_offset,               /* offset */
-       
-       acf_fillpartd_name,                             /* name */
-       acf_fillpartd_icon,                             /* icon */
-       
-       acf_generic_dsexpand_setting_valid,     /* has setting */
-       acf_fillpartd_setting_flag,                             /* flag for setting */
-       acf_generic_dsexpand_setting_ptr                /* pointer for setting */
-};
-
-/* Textures Expander  ------------------------------------------- */
-
-/* offset for groups + grouped entities */
-static short acf_filltexd_offset(bAnimContext *ac, bAnimListElem *ale)
-{
-       short offset= acf_generic_basic_offset(ac, ale);
-       
-       if (ale->id) {
-               /* materials */
-               switch (GS(ale->id->name)) {
-                       case ID_MA:
-                               offset += 21;
-                               break;
-                               
-                       case ID_LA:
-                       case ID_WO:
-                               offset += 14;
-                               break;
-               }
-       }
-       
-       return offset;
-}
-
-// TODO: just get this from RNA?
-static int acf_filltexd_icon(bAnimListElem *UNUSED(ale))
-{
-       return ICON_TEXTURE_DATA;
-}
-
-static void acf_filltexd_name(bAnimListElem *UNUSED(ale), char *name)
-{
-       BLI_strncpy(name, "Textures", ANIM_CHAN_NAME_SIZE);
-}
-
-/* get pointer to the setting (category only) */
-static void *acf_filltexd_setting_ptr(bAnimListElem *ale, int setting, short *type)
-{
-       ID *id= (ID *)ale->data;
-       
-       /* clear extra return data first */
-       *type= 0;
-       
-       switch (setting) {
-               case ACHANNEL_SETTING_EXPAND: /* expanded */
-               {
-                       switch (GS(id->name)) {
-                               case ID_MA:
-                               {
-                                       Material *ma= (Material *)id;
-                                       GET_ACF_FLAG_PTR(ma->flag);
-                               }
-                               
-                               case ID_LA:
-                               {
-                                       Lamp *la= (Lamp *)id;
-                                       GET_ACF_FLAG_PTR(la->flag);
-                               }
-                                       
-                               case ID_WO:
-                               {
-                                       World *wo= (World *)id;
-                                       GET_ACF_FLAG_PTR(wo->flag);
-                               }
-                       }
-               }
-               
-               default: /* unsupported */
-                       return NULL;
-       }
-}
-
-/* get the appropriate flag(s) for the setting when it is valid  */
-static int acf_filltexd_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
-{
-       /* clear extra return data first */
-       *neg= 0;
-       
-       switch (setting) {
-               case ACHANNEL_SETTING_EXPAND: /* expanded */
-                       /* NOTE: the exact same flag must be used for other texture stack types too! */
-                       return MA_DS_SHOW_TEXS; 
-               
-               default: /* unsupported */
-                       return 0;
-       }
-}
-
-/* particles expander type define */
-static bAnimChannelType ACF_FILLTEXD= 
-{
-       "Textures Filler",                              /* type name */
-       
-       acf_generic_dataexpand_color,   /* backdrop color */
-       acf_generic_dataexpand_backdrop,/* backdrop */
-       acf_generic_indention_flexible, /* indent level */
-       acf_filltexd_offset,                    /* offset */
-       
-       acf_filltexd_name,                              /* name */
-       acf_filltexd_icon,                              /* icon */
-       
-       acf_generic_dsexpand_setting_valid,     /* has setting */       
-       acf_filltexd_setting_flag,                      /* flag for setting */
-       acf_filltexd_setting_ptr                        /* pointer for setting */
-};
 
 /* Material Expander  ------------------------------------------- */
 
@@ -1307,12 +1050,6 @@ static int acf_dsmat_icon(bAnimListElem *UNUSED(ale))
        return ICON_MATERIAL_DATA;
 }
 
-/* offset for material expanders */
-static short acf_dsmat_offset(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale))
-{
-       return 21;
-}
-
 /* get the appropriate flag(s) for the setting when it is valid  */
 static int acf_dsmat_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
 {
@@ -1368,10 +1105,10 @@ static bAnimChannelType ACF_DSMAT=
 {
        "Material Data Expander",               /* type name */
        
-       acf_generic_channel_color,              /* backdrop color */
-       acf_generic_channel_backdrop,   /* backdrop */
-       acf_generic_indention_0,                /* indent level */
-       acf_dsmat_offset,                               /* offset */
+       acf_generic_dataexpand_color,   /* backdrop color */
+       acf_generic_dataexpand_backdrop,/* backdrop */
+       acf_generic_indention_1,                /* indent level */
+       acf_generic_basic_offset,               /* offset */
        
        acf_generic_idblock_name,               /* name */
        acf_dsmat_icon,                                 /* icon */
@@ -1466,22 +1203,10 @@ static int acf_dstex_icon(bAnimListElem *UNUSED(ale))
 }
 
 /* offset for texture expanders */
+// FIXME: soon to be obsolete?
 static short acf_dstex_offset(bAnimContext *UNUSED(ac), bAnimListElem *ale)
 {
-       short offset = 21;
-       
-       /* special offset from owner type */
-       // FIXME: too much now!
-       switch (ale->ownertype) {
-               case ANIMTYPE_DSMAT:
-                       offset += 14;
-                       
-               case ANIMTYPE_DSLAM:
-               case ANIMTYPE_DSWOR:
-                       offset += 7;
-       }
-       
-       return offset;
+       return 14; // XXX: simply include this in indention instead?
 }
 
 /* get the appropriate flag(s) for the setting when it is valid  */
@@ -1534,14 +1259,14 @@ static void *acf_dstex_setting_ptr(bAnimListElem *ale, int setting, short *type)
        }
 }
 
-/* material expander type define */
+/* texture expander type define */
 static bAnimChannelType ACF_DSTEX= 
 {
        "Texture Data Expander",                /* type name */
        
-       acf_generic_channel_color,              /* backdrop color */
-       acf_generic_channel_backdrop,   /* backdrop */
-       acf_generic_indention_0,                /* indent level */
+       acf_generic_dataexpand_color,   /* backdrop color */
+       acf_generic_dataexpand_backdrop,/* backdrop */
+       acf_generic_indention_1,                /* indent level */
        acf_dstex_offset,                               /* offset */
        
        acf_generic_idblock_name,               /* name */
@@ -2590,9 +2315,6 @@ static void ANIM_init_channel_typeinfo_data (void)
                
                animchannelTypeInfo[type++]= &ACF_FILLACTD;     /* Object Action Expander */
                animchannelTypeInfo[type++]= &ACF_FILLDRIVERS;  /* Drivers Expander */
-               animchannelTypeInfo[type++]= &ACF_FILLMATD;     /* Materials Expander */
-               animchannelTypeInfo[type++]= &ACF_FILLPARTD;    /* Particles Expander */
-               animchannelTypeInfo[type++]= &ACF_FILLTEXD;             /* Textures Expander */
                
                animchannelTypeInfo[type++]= &ACF_DSMAT;                /* Material Channel */
                animchannelTypeInfo[type++]= &ACF_DSLAM;                /* Lamp Channel */
@@ -2860,7 +2582,7 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
         *      - in Graph Editor, checkboxes for visibility in curves area
         *      - in NLA Editor, glowing dots for solo/not solo...
         */
-       if (ac->sa) {
+       if (ac->sl) {
                if ((ac->spacetype == SPACE_IPO) && acf->has_setting(ac, ale, ACHANNEL_SETTING_VISIBLE)) {
                        /* for F-Curves, draw color-preview of curve behind checkbox */
                        if (ale->type == ANIMTYPE_FCURVE) {
@@ -2930,17 +2652,17 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
                glColor3fv(color);
                
                /* check if we need to show the sliders */
-               if ((ac->sa) && ELEM(ac->spacetype, SPACE_ACTION, SPACE_IPO)) {
+               if ((ac->sl) && ELEM(ac->spacetype, SPACE_ACTION, SPACE_IPO)) {
                        switch (ac->spacetype) {
                                case SPACE_ACTION:
                                {
-                                       SpaceAction *saction= (SpaceAction *)ac->sa->spacedata.first;
+                                       SpaceAction *saction= (SpaceAction *)ac->sl;
                                        draw_sliders= (saction->flag & SACTION_SLIDERS);
                                }
                                        break;
                                case SPACE_IPO:
                                {
-                                       SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first;
+                                       SpaceIpo *sipo= (SpaceIpo *)ac->sl;
                                        draw_sliders= (sipo->flag & SIPO_SLIDERS);
                                }
                                        break;
@@ -3264,7 +2986,7 @@ void ANIM_channel_draw_widgets (bAnimContext *ac, bAnimListElem *ale, uiBlock *b
         *      - in Graph Editor, checkboxes for visibility in curves area
         *      - in NLA Editor, glowing dots for solo/not solo...
         */
-       if (ac->sa) {
+       if (ac->sl) {
                if ((ac->spacetype == SPACE_IPO) && acf->has_setting(ac, ale, ACHANNEL_SETTING_VISIBLE)) {
                        /* visibility toggle  */
                        draw_setting_widget(ac, ale, acf, block, offset, ymid, ACHANNEL_SETTING_VISIBLE);
@@ -3291,17 +3013,17 @@ void ANIM_channel_draw_widgets (bAnimContext *ac, bAnimListElem *ale, uiBlock *b
                short draw_sliders = 0;
                
                /* check if we need to show the sliders */
-               if ((ac->sa) && ELEM(ac->spacetype, SPACE_ACTION, SPACE_IPO)) {
+               if ((ac->sl) && ELEM(ac->spacetype, SPACE_ACTION, SPACE_IPO)) {
                        switch (ac->spacetype) {
                                case SPACE_ACTION:
                                {
-                                       SpaceAction *saction= (SpaceAction *)ac->sa->spacedata.first;
+                                       SpaceAction *saction= (SpaceAction *)ac->sl;
                                        draw_sliders= (saction->flag & SACTION_SLIDERS);
                                }
                                        break;
                                case SPACE_IPO:
                                {
-                                       SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first;
+                                       SpaceIpo *sipo= (SpaceIpo *)ac->sl;
                                        draw_sliders= (sipo->flag & SIPO_SLIDERS);
                                }
                                        break;
index 967002131c274ec1481c84afc8b6701a682cc8d4..b42fc47b14c2655331890a40bb567ebaecba02ed 100644 (file)
@@ -258,29 +258,29 @@ static short nlaedit_get_context (bAnimContext *ac, SpaceNla *snla)
  */
 short ANIM_animdata_context_getdata (bAnimContext *ac)
 {
-       ScrArea *sa= ac->sa;
+       SpaceLink *sl = ac->sl;
        short ok= 0;
        
        /* context depends on editor we are currently in */
-       if (sa) {
-               switch (sa->spacetype) {
+       if (sl) {
+               switch (ac->spacetype) {
                        case SPACE_ACTION:
                        {
-                               SpaceAction *saction= (SpaceAction *)sa->spacedata.first;
+                               SpaceAction *saction= (SpaceAction *)sl;
                                ok= actedit_get_context(ac, saction);
                        }
                                break;
                                
                        case SPACE_IPO:
                        {
-                               SpaceIpo *sipo= (SpaceIpo *)sa->spacedata.first;
+                               SpaceIpo *sipo= (SpaceIpo *)sl;
                                ok= graphedit_get_context(ac, sipo);
                        }
                                break;
                                
                        case SPACE_NLA:
                        {
-                               SpaceNla *snla= (SpaceNla *)sa->spacedata.first;
+                               SpaceNla *snla= (SpaceNla *)sl;
                                ok= nlaedit_get_context(ac, snla);
                        }
                                break;
@@ -303,6 +303,7 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
 {
        ScrArea *sa= CTX_wm_area(C);
        ARegion *ar= CTX_wm_region(C);
+       SpaceLink *sl= CTX_wm_space_data(C);
        Scene *scene= CTX_data_scene(C);
        
        /* clear old context info */
@@ -317,6 +318,7 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
        }
        ac->sa= sa;
        ac->ar= ar;
+       ac->sl= sl;
        ac->spacetype= (sa) ? sa->spacetype : 0;
        ac->regiontype= (ar) ? ar->regiontype : 0;
        
@@ -397,7 +399,7 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
 /* quick macro to add a pointer to an AnimData block as a channel */
 #define ANIMDATA_ADD_ANIMDATA(id) \
        {\
-               ale= make_new_animlistelem((id)->adt, ANIMTYPE_ANIMDATA, NULL, ANIMTYPE_NONE, (ID *)id);\
+               ale= make_new_animlistelem((id)->adt, ANIMTYPE_ANIMDATA, (ID *)id);\
                if (ale) {\
                        BLI_addtail(anim_data, ale);\
                        items++;\
@@ -432,7 +434,7 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
 /* this function allocates memory for a new bAnimListElem struct for the 
  * provided animation channel-data. 
  */
-static bAnimListElem *make_new_animlistelem (void *data, short datatype, void *owner, short ownertype, ID *owner_id)
+static bAnimListElem *make_new_animlistelem (void *data, short datatype, ID *owner_id)
 {
        bAnimListElem *ale= NULL;
        
@@ -443,10 +445,6 @@ static bAnimListElem *make_new_animlistelem (void *data, short datatype, void *o
                
                ale->data= data;
                ale->type= datatype;
-                       // XXX what is the point of the owner data?
-                       // xxx try and use this to simplify the problem of finding whether parent channels are working...
-               ale->owner= owner;
-               ale->ownertype= ownertype;
                
                ale->id= owner_id;
                ale->adt= BKE_animdata_from_id(owner_id);
@@ -509,55 +507,6 @@ static bAnimListElem *make_new_animlistelem (void *data, short datatype, void *o
                                ale->datatype= ALE_NONE;
                        }
                                break;
-                       case ANIMTYPE_FILLMATD:
-                       {
-                               Object *ob= (Object *)data;
-                               
-                               ale->flag= FILTER_MAT_OBJC(ob);
-                               
-                               ale->key_data= NULL;
-                               ale->datatype= ALE_NONE;
-                       }
-                               break;
-                       case ANIMTYPE_FILLPARTD:
-                       {
-                               Object *ob= (Object *)data;
-                               
-                               ale->flag= FILTER_PART_OBJC(ob);
-                               
-                               ale->key_data= NULL;
-                               ale->datatype= ALE_NONE;
-                       }
-                               break;
-                       case ANIMTYPE_FILLTEXD:
-                       {
-                               ID *id= (ID *)data;
-                               
-                               switch (GS(id->name)) {
-                                       case ID_MA:
-                                       {
-                                               Material *ma= (Material *)id;
-                                               ale->flag= FILTER_TEX_MATC(ma);
-                                       }
-                                               break;
-                                       case ID_LA:
-                                       {
-                                               Lamp *la= (Lamp *)id;
-                                               ale->flag= FILTER_TEX_LAMC(la);
-                                       }
-                                               break;
-                                       case ID_WO:
-                                       {
-                                               World *wo= (World *)id;
-                                               ale->flag= FILTER_TEX_WORC(wo);
-                                       }
-                                               break;
-                               }
-                               
-                               ale->key_data= NULL;
-                               ale->datatype= ALE_NONE;
-                       }
-                               break;
                        
                        case ANIMTYPE_DSMAT:
                        {
@@ -957,7 +906,7 @@ static FCurve *animdata_filter_fcurve_next (bDopeSheet *ads, FCurve *first, bAct
        return NULL;
 }
 
-static int animdata_filter_fcurves (ListBase *anim_data, bDopeSheet *ads, FCurve *first, bActionGroup *grp, void *owner, short ownertype, int filter_mode, ID *owner_id)
+static int animdata_filter_fcurves (ListBase *anim_data, bDopeSheet *ads, FCurve *first, bActionGroup *grp, int filter_mode, ID *owner_id)
 {
        FCurve *fcu;
        int items = 0;
@@ -973,7 +922,7 @@ static int animdata_filter_fcurves (ListBase *anim_data, bDopeSheet *ads, FCurve
         */
        for (fcu=first; ( (fcu = animdata_filter_fcurve_next(ads, fcu, grp, filter_mode, owner_id)) ); fcu=fcu->next)
        {
-               bAnimListElem *ale = make_new_animlistelem(fcu, ANIMTYPE_FCURVE, owner, ownertype, owner_id);
+               bAnimListElem *ale = make_new_animlistelem(fcu, ANIMTYPE_FCURVE, owner_id);
                
                if (ale) {
                        BLI_addtail(anim_data, ale);
@@ -985,7 +934,7 @@ static int animdata_filter_fcurves (ListBase *anim_data, bDopeSheet *ads, FCurve
        return items;
 }
 
-static int animdata_filter_action (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAction *act, int filter_mode, void *owner, short ownertype, ID *owner_id)
+static int animdata_filter_action (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAction *act, int filter_mode, ID *owner_id)
 {
        bAnimListElem *ale=NULL;
        bActionGroup *agrp;
@@ -1057,7 +1006,7 @@ static int animdata_filter_action (bAnimContext *ac, ListBase *anim_data, bDopeS
                        if ((filter_mode & ANIMFILTER_CHANNELS) || !(filter_mode & ANIMFILTER_CURVESONLY)) {
                                /* filter selection of channel specially here again, since may be open and not subject to previous test */
                                if ( ANIMCHANNEL_SELOK(SEL_AGRP(agrp)) ) {
-                                       ale= make_new_animlistelem(agrp, ANIMTYPE_GROUP, NULL, ANIMTYPE_NONE, owner_id);
+                                       ale= make_new_animlistelem(agrp, ANIMTYPE_GROUP, owner_id);
                                        if (ale) {
                                                BLI_addtail(anim_data, ale);
                                                items++;
@@ -1086,7 +1035,7 @@ static int animdata_filter_action (bAnimContext *ac, ListBase *anim_data, bDopeS
                                        {
                                                if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_AGRP(agrp)) {
                                                        /* NOTE: filter_gmode is used here, not standard filter_mode, since there may be some flags that shouldn't apply */
-                                                       items += animdata_filter_fcurves(anim_data, ads, first_fcu, agrp, owner, ownertype, filter_gmode, owner_id);
+                                                       items += animdata_filter_fcurves(anim_data, ads, first_fcu, agrp, filter_gmode, owner_id);
                                                }
                                        }
                                }
@@ -1097,7 +1046,7 @@ static int animdata_filter_action (bAnimContext *ac, ListBase *anim_data, bDopeS
        /* loop over un-grouped F-Curves (only if we're not only considering those channels in the animive group) */
        if (!(filter_mode & ANIMFILTER_ACTGROUPED))  {
                // XXX the 'owner' info here needs review...
-               items += animdata_filter_fcurves(anim_data, ads, (lastchan)?(lastchan->next):(act->curves.first), NULL, owner, ownertype, filter_mode, owner_id);
+               items += animdata_filter_fcurves(anim_data, ads, (lastchan)?(lastchan->next):(act->curves.first), NULL, filter_mode, owner_id);
        }
        
        /* return the number of items added to the list */
@@ -1112,7 +1061,7 @@ static int animdata_filter_action (bAnimContext *ac, ListBase *anim_data, bDopeS
  *     - for normal filtering (i.e. for editing), we only need the NLA-tracks but they can be in 'normal' evaluation
  *       order, i.e. first to last. Otherwise, some tools may get screwed up.
  */
-static int animdata_filter_nla (bAnimContext *UNUSED(ac), ListBase *anim_data, bDopeSheet *UNUSED(ads), AnimData *adt, int filter_mode, void *owner, short ownertype, ID *owner_id)
+static int animdata_filter_nla (bAnimContext *UNUSED(ac), ListBase *anim_data, bDopeSheet *UNUSED(ads), AnimData *adt, int filter_mode, ID *owner_id)
 {
        bAnimListElem *ale;
        NlaTrack *nlt;
@@ -1128,7 +1077,7 @@ static int animdata_filter_nla (bAnimContext *UNUSED(ac), ListBase *anim_data, b
                         *      - as AnimData may not have an action, we pass a dummy pointer just to get the list elem created, then
                         *        overwrite this with the real value - REVIEW THIS...
                         */
-                       ale= make_new_animlistelem((void *)(&adt->action), ANIMTYPE_NLAACTION, owner, ownertype, owner_id);
+                       ale= make_new_animlistelem((void *)(&adt->action), ANIMTYPE_NLAACTION, owner_id);
                        ale->data= (adt->action) ? adt->action : NULL;
                                
                        if (ale) {
@@ -1166,7 +1115,7 @@ static int animdata_filter_nla (bAnimContext *UNUSED(ac), ListBase *anim_data, b
                        if ( ANIMCHANNEL_SELOK(SEL_NLT(nlt)) ) {
                                /* only include if this track is active */
                                if (!(filter_mode & ANIMFILTER_ACTIVE) || (nlt->flag & NLATRACK_ACTIVE)) {
-                                       ale= make_new_animlistelem(nlt, ANIMTYPE_NLATRACK, owner, ownertype, owner_id);
+                                       ale= make_new_animlistelem(nlt, ANIMTYPE_NLATRACK, owner_id);
                                                
                                        if (ale) {
                                                BLI_addtail(anim_data, ale);
@@ -1204,7 +1153,7 @@ static int animdata_filter_shapekey (bAnimContext *ac, ListBase *anim_data, Key
                                        // TODO: consider 'active' too?
                                        
                                        /* owner-id here must be key so that the F-Curve can be resolved... */
-                                       ale= make_new_animlistelem(kb, ANIMTYPE_SHAPEKEY, NULL, ANIMTYPE_NONE, (ID *)key);
+                                       ale= make_new_animlistelem(kb, ANIMTYPE_SHAPEKEY, (ID *)key);
                                        
                                        if (ale) {
                                                BLI_addtail(anim_data, ale);
@@ -1221,7 +1170,7 @@ static int animdata_filter_shapekey (bAnimContext *ac, ListBase *anim_data, Key
                        if (filter_mode & ANIMFILTER_ANIMDATA)
                                ANIMDATA_ADD_ANIMDATA(key)
                        else if (key->adt->action)
-                               items= animdata_filter_action(ac, anim_data, NULL, key->adt->action, filter_mode, NULL, ANIMTYPE_NONE, (ID *)key);
+                               items= animdata_filter_action(ac, anim_data, NULL, key->adt->action, filter_mode, (ID *)key);
                }
        }
        
@@ -1250,7 +1199,7 @@ static int animdata_filter_gpencil (ListBase *anim_data, void *UNUSED(data), int
                        /* add gpd as channel too (if for drawing, and it has layers) */
                        if ((filter_mode & ANIMFILTER_CHANNELS) && (gpd->layers.first)) {
                                /* add to list */
-                               ale= make_new_animlistelem(gpd, ANIMTYPE_GPDATABLOCK, NULL, ANIMTYPE_NONE, NULL);
+                               ale= make_new_animlistelem(gpd, ANIMTYPE_GPDATABLOCK, NULL);
                                if (ale) {
                                        BLI_addtail(anim_data, ale);
                                        items++;
@@ -1266,7 +1215,7 @@ static int animdata_filter_gpencil (ListBase *anim_data, void *UNUSED(data), int
                                                /* only if editable */
                                                if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_GPL(gpl)) {
                                                        /* add to list */
-                                                       ale= make_new_animlistelem(gpl, ANIMTYPE_GPLAYER, gpd, ANIMTYPE_GPDATABLOCK, (ID*)gpd);
+                                                       ale= make_new_animlistelem(gpl, ANIMTYPE_GPLAYER, (ID*)gpd);
                                                        if (ale) {
                                                                BLI_addtail(anim_data, ale);
                                                                items++;
@@ -1285,11 +1234,7 @@ static int animdata_filter_gpencil (ListBase *anim_data, void *UNUSED(data), int
 /* NOTE: owner_id is either material, lamp, or world block, which is the direct owner of the texture stack in question */
 static int animdata_filter_dopesheet_texs (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, int filter_mode)
 {
-       ListBase texs = {NULL, NULL};
-       LinkData *ld;
        MTex **mtex = NULL;
-       short expanded=0;
-       int ownertype = ANIMTYPE_NONE;
        
        bAnimListElem *ale=NULL;
        int items=0, a=0;
@@ -1304,8 +1249,6 @@ static int animdata_filter_dopesheet_texs (bAnimContext *ac, ListBase *anim_data
                        Material *ma= (Material *)owner_id;
                        
                        mtex= (MTex**)(&ma->mtex);
-                       expanded= FILTER_TEX_MATC(ma);
-                       ownertype= ANIMTYPE_DSMAT;
                }
                        break;
                case ID_LA:
@@ -1313,8 +1256,6 @@ static int animdata_filter_dopesheet_texs (bAnimContext *ac, ListBase *anim_data
                        Lamp *la= (Lamp *)owner_id;
                        
                        mtex= (MTex**)(&la->mtex);
-                       expanded= FILTER_TEX_LAMC(la);
-                       ownertype= ANIMTYPE_DSLAM;
                }
                        break;
                case ID_WO:
@@ -1322,8 +1263,6 @@ static int animdata_filter_dopesheet_texs (bAnimContext *ac, ListBase *anim_data
                        World *wo= (World *)owner_id;
                        
                        mtex= (MTex**)(&wo->mtex);
-                       expanded= FILTER_TEX_WORC(wo);
-                       ownertype= ANIMTYPE_DSWOR;
                }
                        break;
                default: 
@@ -1352,69 +1291,34 @@ static int animdata_filter_dopesheet_texs (bAnimContext *ac, ListBase *anim_data
                        ok=1;)
                if (ok == 0) continue;
                
-               /* make a temp list elem for this */
-               ld= MEM_callocN(sizeof(LinkData), "DopeSheet-TextureCache");
-               ld->data= tex;
-               BLI_addtail(&texs, ld);
-       }
-       
-       /* if there were no channels found, no need to carry on */
-       if (texs.first == NULL)
-               return 0;
-       
-       /* include textures-expand widget? */
-       if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
-               ale= make_new_animlistelem(owner_id, ANIMTYPE_FILLTEXD, owner_id, ownertype, owner_id);
-               if (ale) {
-                       BLI_addtail(anim_data, ale);
-                       items++;
-               }
-       }
-       
-       /* add textures */
-       if ((expanded) || (filter_mode & ANIMFILTER_CURVESONLY)) {
-               /* for each texture in cache, add channels  */
-               for (ld= texs.first; ld; ld= ld->next) {
-                       Tex *tex= (Tex *)ld->data;
-                       
-                       /* include texture-expand widget? */
-                       if (filter_mode & ANIMFILTER_CHANNELS) {
-                               /* check if filtering by active status */
-                               if ANIMCHANNEL_ACTIVEOK(tex) {
-                                       ale= make_new_animlistelem(tex, ANIMTYPE_DSTEX, owner_id, ownertype, owner_id);
-                                       if (ale) {
-                                               BLI_addtail(anim_data, ale);
-                                               items++;
-                                       }
+               /* include texture-expand widget? */
+               if (filter_mode & ANIMFILTER_CHANNELS) {
+                       /* check if filtering by active status */
+                       if ANIMCHANNEL_ACTIVEOK(tex) {
+                               ale= make_new_animlistelem(tex, ANIMTYPE_DSTEX, owner_id);
+                               if (ale) {
+                                       BLI_addtail(anim_data, ale);
+                                       items++;
                                }
                        }
-                       
-                       /* add texture's animation data
-                        * NOTE: for these, we make the owner/ownertype the material/lamp/etc. not the texture, otherwise the
-                        * drawing code cannot resolve the indention easily
-                        */
-                       if (!(filter_mode & ANIMFILTER_VISIBLE) || FILTER_TEX_DATA(tex) || (filter_mode & ANIMFILTER_CURVESONLY)) {
-                               ANIMDATA_FILTER_CASES(tex, 
-                                       { /* AnimData blocks - do nothing... */ },
-                                       items += animdata_filter_nla(ac, anim_data, ads, tex->adt, filter_mode, owner_id, ownertype, (ID *)tex);, 
-                                       items += animdata_filter_fcurves(anim_data, ads, tex->adt->drivers.first, NULL, owner_id, ownertype, filter_mode, (ID *)tex);, 
-                                       items += animdata_filter_action(ac, anim_data, ads, tex->adt->action, filter_mode, owner_id, ownertype, (ID *)tex);)
-                       }
+               }
+               
+               /* add texture's animation data */
+               if (!(filter_mode & ANIMFILTER_VISIBLE) || FILTER_TEX_DATA(tex) || (filter_mode & ANIMFILTER_CURVESONLY)) {
+                       ANIMDATA_FILTER_CASES(tex, 
+                               { /* AnimData blocks - do nothing... */ },
+                               items += animdata_filter_nla(ac, anim_data, ads, tex->adt, filter_mode, (ID *)tex);, 
+                               items += animdata_filter_fcurves(anim_data, ads, tex->adt->drivers.first, NULL, filter_mode, (ID *)tex);, 
+                               items += animdata_filter_action(ac, anim_data, ads, tex->adt->action, filter_mode, (ID *)tex);)
                }
        }
        
-       /* free cache */
-       BLI_freelistN(&texs);
-       
        /* return the number of items added to the list */
        return items;
 }
 
 static int animdata_filter_dopesheet_mats (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Base *base, int filter_mode)
 {
-       ListBase mats = {NULL, NULL};
-       LinkData *ld;
-       
        bAnimListElem *ale=NULL;
        Object *ob= base->object;
        int items=0, a=0;
@@ -1426,93 +1330,64 @@ static int animdata_filter_dopesheet_mats (bAnimContext *ac, ListBase *anim_data
                
                /* for now, if no material returned, skip (this shouldn't confuse the user I hope) */
                if (ma == NULL) continue;
-
+               
                /* check if ok */
                ANIMDATA_FILTER_CASES(ma, 
                        { /* AnimData blocks - do nothing... */ },
                        ok=1;, 
                        ok=1;, 
                        ok=1;)
-
+                       
                /* need to check textures */
                if (ok == 0 && !(ads->filterflag & ADS_FILTER_NOTEX)) {
                        int mtInd;
-
+                       
                        for (mtInd=0; mtInd < MAX_MTEX; mtInd++) {
                                MTex *mtex = ma->mtex[mtInd];
-
-                               if(mtex && mtex->tex) {
+                               
+                               if (mtex && mtex->tex) {
                                        ANIMDATA_FILTER_CASES(mtex->tex,
                                        { /* AnimData blocks - do nothing... */ },
                                        ok=1;, 
                                        ok=1;, 
                                        ok=1;)
                                }
-
-                               if(ok)
+                               
+                               if (ok)
                                        break;
                        }
                }
                
                if (ok == 0) continue;
                
-               /* make a temp list elem for this */
-               ld= MEM_callocN(sizeof(LinkData), "DopeSheet-MaterialCache");
-               ld->data= ma;
-               BLI_addtail(&mats, ld);
-       }
-       
-       /* if there were no channels found, no need to carry on */
-       if (mats.first == NULL)
-               return 0;
-       
-       /* include materials-expand widget? */
-       if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
-               ale= make_new_animlistelem(ob, ANIMTYPE_FILLMATD, base, ANIMTYPE_OBJECT, (ID *)ob);
-               if (ale) {
-                       BLI_addtail(anim_data, ale);
-                       items++;
-               }
-       }
-       
-       /* add materials? */
-       if (FILTER_MAT_OBJC(ob) || (filter_mode & ANIMFILTER_CURVESONLY)) {
-               /* for each material in cache, add channels  */
-               for (ld= mats.first; ld; ld= ld->next) {
-                       Material *ma= (Material *)ld->data;
-                       
-                       /* include material-expand widget? */
-                       // hmm... do we need to store the index of this material in the array anywhere?
-                       if (filter_mode & ANIMFILTER_CHANNELS) {
-                               /* check if filtering by active status */
-                               if ANIMCHANNEL_ACTIVEOK(ma) {
-                                       ale= make_new_animlistelem(ma, ANIMTYPE_DSMAT, base, ANIMTYPE_OBJECT, (ID *)ma);
-                                       if (ale) {
-                                               BLI_addtail(anim_data, ale);
-                                               items++;
-                                       }
+               /* include material-expand widget? */
+               // hmm... do we need to store the index of this material in the array anywhere?
+               if (filter_mode & ANIMFILTER_CHANNELS) {
+                       /* check if filtering by active status */
+                       if ANIMCHANNEL_ACTIVEOK(ma) {
+                               ale= make_new_animlistelem(ma, ANIMTYPE_DSMAT, (ID *)ma);
+                               if (ale) {
+                                       BLI_addtail(anim_data, ale);
+                                       items++;
                                }
                        }
-                       
-                       /* add material's animation data */
-                       if (!(filter_mode & ANIMFILTER_VISIBLE) || FILTER_MAT_OBJD(ma) || (filter_mode & ANIMFILTER_CURVESONLY)) {
-                               /* material's animation data */
-                               ANIMDATA_FILTER_CASES(ma, 
-                                       { /* AnimData blocks - do nothing... */ },
-                                       items += animdata_filter_nla(ac, anim_data, ads, ma->adt, filter_mode, ma, ANIMTYPE_DSMAT, (ID *)ma);, 
-                                       items += animdata_filter_fcurves(anim_data, ads, ma->adt->drivers.first, NULL, ma, ANIMTYPE_DSMAT, filter_mode, (ID *)ma);, 
-                                       items += animdata_filter_action(ac, anim_data, ads, ma->adt->action, filter_mode, ma, ANIMTYPE_DSMAT, (ID *)ma);)
-                                       
-                               /* textures */
-                               if (!(ads->filterflag & ADS_FILTER_NOTEX))
-                                       items += animdata_filter_dopesheet_texs(ac, anim_data, ads, (ID *)ma, filter_mode);
-                       }
+               }
+               
+               /* add material's animation data */
+               if (!(filter_mode & ANIMFILTER_VISIBLE) || FILTER_MAT_OBJD(ma) || (filter_mode & ANIMFILTER_CURVESONLY)) {
+                       /* material's animation data */
+                       ANIMDATA_FILTER_CASES(ma, 
+                               { /* AnimData blocks - do nothing... */ },
+                               items += animdata_filter_nla(ac, anim_data, ads, ma->adt, filter_mode, (ID *)ma);, 
+                               items += animdata_filter_fcurves(anim_data, ads, ma->adt->drivers.first, NULL, filter_mode, (ID *)ma);, 
+                               items += animdata_filter_action(ac, anim_data, ads, ma->adt->action, filter_mode, (ID *)ma);)
+                               
+                       /* textures */
+                       if (!(ads->filterflag & ADS_FILTER_NOTEX))
+                               items += animdata_filter_dopesheet_texs(ac, anim_data, ads, (ID *)ma, filter_mode);
                }
        }
        
-       /* free cache */
-       BLI_freelistN(&mats);
-       
        /* return the number of items added to the list */
        return items;
 }
@@ -1522,51 +1397,39 @@ static int animdata_filter_dopesheet_particles (bAnimContext *ac, ListBase *anim
        bAnimListElem *ale=NULL;
        Object *ob= base->object;
        ParticleSystem *psys = ob->particlesystem.first;
-       int items= 0, first = 1;
+       int items= 0;
 
        for(; psys; psys=psys->next) {
                short ok = 0;
-
+               
                if(ELEM(NULL, psys->part, psys->part->adt))
                        continue;
-
+               
                ANIMDATA_FILTER_CASES(psys->part,
                        { /* AnimData blocks - do nothing... */ },
                        ok=1;, 
                        ok=1;, 
                        ok=1;)
                if (ok == 0) continue;
-
-               /* include particles-expand widget? */
-               if (first && (filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
-                       ale= make_new_animlistelem(ob, ANIMTYPE_FILLPARTD, base, ANIMTYPE_OBJECT, (ID *)ob);
-                       if (ale) {
-                               BLI_addtail(anim_data, ale);
-                               items++;
-                       }
-                       first = 0;
-               }
                
                /* add particle settings? */
-               if (FILTER_PART_OBJC(ob) || (filter_mode & ANIMFILTER_CURVESONLY)) {
-                       if ((filter_mode & ANIMFILTER_CHANNELS)) {
-                               /* check if filtering by active status */
-                               if ANIMCHANNEL_ACTIVEOK(psys->part) {
-                                       ale = make_new_animlistelem(psys->part, ANIMTYPE_DSPART, base, ANIMTYPE_OBJECT, (ID *)psys->part);
-                                       if (ale) {
-                                               BLI_addtail(anim_data, ale);
-                                               items++;
-                                       }
+               if ((filter_mode & ANIMFILTER_CHANNELS)) {
+                       /* check if filtering by active status */
+                       if ANIMCHANNEL_ACTIVEOK(psys->part) {
+                               ale = make_new_animlistelem(psys->part, ANIMTYPE_DSPART, (ID *)psys->part);
+                               if (ale) {
+                                       BLI_addtail(anim_data, ale);
+                                       items++;
                                }
                        }
-                       
-                       if (!(filter_mode & ANIMFILTER_VISIBLE) || FILTER_PART_OBJD(psys->part) || (filter_mode & ANIMFILTER_CURVESONLY)) {
-                               ANIMDATA_FILTER_CASES(psys->part,
-                                       { /* AnimData blocks - do nothing... */ },
-                                       items += animdata_filter_nla(ac, anim_data, ads, psys->part->adt, filter_mode, psys->part, ANIMTYPE_DSPART, (ID *)psys->part);, 
-                                       items += animdata_filter_fcurves(anim_data, ads, psys->part->adt->drivers.first, NULL, psys->part, ANIMTYPE_DSPART, filter_mode, (ID *)psys->part);, 
-                                       items += animdata_filter_action(ac, anim_data, ads, psys->part->adt->action, filter_mode, psys->part, ANIMTYPE_DSPART, (ID *)psys->part);)
-                       }
+               }
+               
+               if (!(filter_mode & ANIMFILTER_VISIBLE) || FILTER_PART_OBJD(psys->part) || (filter_mode & ANIMFILTER_CURVESONLY)) {
+                       ANIMDATA_FILTER_CASES(psys->part,
+                               { /* AnimData blocks - do nothing... */ },
+                               items += animdata_filter_nla(ac, anim_data, ads, psys->part->adt, filter_mode, (ID *)psys->part);, 
+                               items += animdata_filter_fcurves(anim_data, ads, psys->part->adt->drivers.first, NULL, filter_mode, (ID *)psys->part);, 
+                               items += animdata_filter_action(ac, anim_data, ads, psys->part->adt->action, filter_mode, (ID *)psys->part);)
                }
        }
        
@@ -1649,7 +1512,7 @@ static int animdata_filter_dopesheet_obdata (bAnimContext *ac, ListBase *anim_da
        if ((filter_mode & ANIMFILTER_CURVESONLY) == 0) {       
                /* check if filtering by active status */
                if ANIMCHANNEL_ACTIVEOK(iat) {
-                       ale= make_new_animlistelem(iat, type, base, ANIMTYPE_OBJECT, (ID *)iat);
+                       ale= make_new_animlistelem(iat, type, (ID *)iat);
                        if (ale) BLI_addtail(anim_data, ale);
                }
        }
@@ -1659,9 +1522,9 @@ static int animdata_filter_dopesheet_obdata (bAnimContext *ac, ListBase *anim_da
                /* filtering for channels - nla, drivers, keyframes */
                ANIMDATA_FILTER_CASES(iat, 
                        { /* AnimData blocks - do nothing... */ },
-                       items+= animdata_filter_nla(ac, anim_data, ads, iat->adt, filter_mode, iat, type, (ID *)iat);,
-                       items+= animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, iat, type, filter_mode, (ID *)iat);, 
-                       items+= animdata_filter_action(ac, anim_data, ads, iat->adt->action, filter_mode, iat, type, (ID *)iat);)
+                       items+= animdata_filter_nla(ac, anim_data, ads, iat->adt, filter_mode, (ID *)iat);,
+                       items+= animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, filter_mode, (ID *)iat);, 
+                       items+= animdata_filter_action(ac, anim_data, ads, iat->adt->action, filter_mode, (ID *)iat);)
                        
                /* sub-data filtering... */
                switch (ob->type) {
@@ -1694,7 +1557,7 @@ static int animdata_filter_dopesheet_ob (bAnimContext *ac, ListBase *anim_data,
                if ANIMCHANNEL_SELOK((base->flag & SELECT)) {
                        /* check if filtering by active status */
                        if ANIMCHANNEL_ACTIVEOK(ob) {
-                               ale= make_new_animlistelem(base, ANIMTYPE_OBJECT, NULL, ANIMTYPE_NONE, (ID *)ob);
+                               ale= make_new_animlistelem(base, ANIMTYPE_OBJECT, (ID *)ob);
                                if (ale) {
                                        BLI_addtail(anim_data, ale);
                                        items++;
@@ -1715,12 +1578,12 @@ static int animdata_filter_dopesheet_ob (bAnimContext *ac, ListBase *anim_data,
                        { /* AnimData blocks - do nothing... */ },
                        { /* nla */
                                /* add NLA tracks */
-                               items += animdata_filter_nla(ac, anim_data, ads, adt, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
+                               items += animdata_filter_nla(ac, anim_data, ads, adt, filter_mode, (ID *)ob);
                        },
                        { /* drivers */
                                /* include drivers-expand widget? */
                                if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
-                                       ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLDRIVERS, base, ANIMTYPE_OBJECT, (ID *)ob);
+                                       ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLDRIVERS, (ID *)ob);
                                        if (ale) {
                                                BLI_addtail(anim_data, ale);
                                                items++;
@@ -1729,14 +1592,13 @@ static int animdata_filter_dopesheet_ob (bAnimContext *ac, ListBase *anim_data,
                                
                                /* add F-Curve channels (drivers are F-Curves) */
                                if (!(filter_mode & ANIMFILTER_VISIBLE) || EXPANDED_DRVD(adt) || !(filter_mode & ANIMFILTER_CHANNELS)) {
-                                       // need to make the ownertype normal object here... (maybe type should be a separate one for clarity?)
-                                       items += animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, ob, ANIMTYPE_OBJECT, filter_mode, (ID *)ob);
+                                       items += animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, filter_mode, (ID *)ob);
                                }
                        },
                        { /* action (keyframes) */
                                /* include action-expand widget? */
                                if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
-                                       ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLACTD, base, ANIMTYPE_OBJECT, (ID *)ob);
+                                       ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLACTD, (ID *)ob);
                                        if (ale) {
                                                BLI_addtail(anim_data, ale);
                                                items++;
@@ -1745,8 +1607,7 @@ static int animdata_filter_dopesheet_ob (bAnimContext *ac, ListBase *anim_data,
                                
                                /* add F-Curve channels? */
                                if (!(filter_mode & ANIMFILTER_VISIBLE) || EXPANDED_ACTC(adt->action) || !(filter_mode & ANIMFILTER_CHANNELS)) {
-                                       // need to make the ownertype normal object here... (maybe type should be a separate one for clarity?)
-                                       items += animdata_filter_action(ac, anim_data, ads, adt->action, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob); 
+                                       items += animdata_filter_action(ac, anim_data, ads, adt->action, filter_mode, (ID *)ob); 
                                }
                        }
                );
@@ -1763,7 +1624,7 @@ static int animdata_filter_dopesheet_ob (bAnimContext *ac, ListBase *anim_data,
                                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);
+                                               ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, (ID *)ob);
                                                if (ale) {
                                                        BLI_addtail(anim_data, ale);
                                                        items++;
@@ -1773,12 +1634,12 @@ static int animdata_filter_dopesheet_ob (bAnimContext *ac, ListBase *anim_data,
                                
                                /* add NLA tracks - only if expanded or so */
                                if (!(filter_mode & ANIMFILTER_VISIBLE) || FILTER_SKE_OBJD(key) || (filter_mode & ANIMFILTER_CURVESONLY))
-                                       items += animdata_filter_nla(ac, anim_data, ads, adt, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)key);
+                                       items += animdata_filter_nla(ac, anim_data, ads, adt, filter_mode, (ID *)key);
                        },
                        { /* drivers */
                                /* include shapekey-expand widget? */
                                if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
-                                       ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, base, ANIMTYPE_OBJECT, (ID *)ob);
+                                       ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, (ID *)ob);
                                        if (ale) {
                                                BLI_addtail(anim_data, ale);
                                                items++;
@@ -1787,7 +1648,7 @@ static int animdata_filter_dopesheet_ob (bAnimContext *ac, ListBase *anim_data,
                                
                                /* add channels */
                                if (!(filter_mode & ANIMFILTER_VISIBLE) || FILTER_SKE_OBJD(key) || (filter_mode & ANIMFILTER_CURVESONLY)) {
-                                       items += animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, key, ANIMTYPE_DSSKEY, filter_mode, (ID *)key);
+                                       items += animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, filter_mode, (ID *)key);
                                }
                        },
                        { /* action (keyframes) */
@@ -1795,7 +1656,7 @@ static int animdata_filter_dopesheet_ob (bAnimContext *ac, ListBase *anim_data,
                                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);
+                                               ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, (ID *)ob);
                                                if (ale) {
                                                        BLI_addtail(anim_data, ale);
                                                        items++;
@@ -1805,7 +1666,7 @@ static int animdata_filter_dopesheet_ob (bAnimContext *ac, ListBase *anim_data,
                                
                                /* add channels */
                                if (!(filter_mode & ANIMFILTER_VISIBLE) || FILTER_SKE_OBJD(key) || (filter_mode & ANIMFILTER_CURVESONLY)) {
-                                       items += animdata_filter_action(ac, anim_data, ads, adt->action, filter_mode, key, ANIMTYPE_DSSKEY, (ID *)key); 
+                                       items += animdata_filter_action(ac, anim_data, ads, adt->action, filter_mode, (ID *)key); 
                                }
                        }
                );
@@ -1934,7 +1795,7 @@ static int animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_dat
        if ((filter_mode & (ANIMFILTER_CURVESONLY|ANIMFILTER_NLATRACKS)) == 0) {
                /* check if filtering by selection */
                if (ANIMCHANNEL_SELOK( (sce->flag & SCE_DS_SELECTED) )) {
-                       ale= make_new_animlistelem(sce, ANIMTYPE_SCENE, NULL, ANIMTYPE_NONE, NULL);
+                       ale= make_new_animlistelem(sce, ANIMTYPE_SCENE, NULL);
                        if (ale) {
                                BLI_addtail(anim_data, ale);
                                items++;
@@ -1953,12 +1814,12 @@ static int animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_dat
                        { /* AnimData blocks - do nothing... */ },
                        { /* nla */
                                /* add NLA tracks */
-                               items += animdata_filter_nla(ac, anim_data, ads, adt, filter_mode, sce, ANIMTYPE_SCENE, (ID *)sce);
+                               items += animdata_filter_nla(ac, anim_data, ads, adt, filter_mode, (ID *)sce);
                        },
                        { /* drivers */
                                /* include drivers-expand widget? */
                                if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
-                                       ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLDRIVERS, sce, ANIMTYPE_SCENE, (ID *)sce);
+                                       ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLDRIVERS, (ID *)sce);
                                        if (ale) {
                                                BLI_addtail(anim_data, ale);
                                                items++;
@@ -1967,13 +1828,13 @@ static int animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_dat
                                
                                /* add F-Curve channels (drivers are F-Curves) */
                                if (EXPANDED_DRVD(adt) || !(filter_mode & ANIMFILTER_CHANNELS)) {
-                                       items += animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, sce, ANIMTYPE_SCENE, filter_mode, (ID *)sce);
+                                       items += animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, filter_mode, (ID *)sce);
                                }
                        },
                        { /* action */
                                /* include action-expand widget? */
                                if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
-                                       ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLACTD, sce, ANIMTYPE_SCENE, (ID *)sce);
+                                       ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLACTD, (ID *)sce);
                                        if (ale) {
                                                BLI_addtail(anim_data, ale);
                                                items++;
@@ -1982,7 +1843,7 @@ static int animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_dat
                                
                                /* add F-Curve channels? */
                                if (EXPANDED_ACTC(adt->action) || !(filter_mode & ANIMFILTER_CHANNELS)) {
-                                       items += animdata_filter_action(ac, anim_data, ads, adt->action, filter_mode, sce, ANIMTYPE_SCENE, (ID *)sce); 
+                                       items += animdata_filter_action(ac, anim_data, ads, adt->action, filter_mode, (ID *)sce); 
                                }
                        }
                )
@@ -1996,12 +1857,12 @@ static int animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_dat
                        { /* AnimData blocks - do nothing... */ },
                        { /* nla */
                                /* add NLA tracks */
-                               items += animdata_filter_nla(ac, anim_data, ads, adt, filter_mode, wo, ANIMTYPE_DSWOR, (ID *)wo);
+                               items += animdata_filter_nla(ac, anim_data, ads, adt, filter_mode, (ID *)wo);
                        },
                        { /* drivers */
                                /* include world-expand widget? */
                                if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
-                                       ale= make_new_animlistelem(wo, ANIMTYPE_DSWOR, sce, ANIMTYPE_SCENE, (ID *)wo);
+                                       ale= make_new_animlistelem(wo, ANIMTYPE_DSWOR, (ID *)wo);
                                        if (ale) {
                                                BLI_addtail(anim_data, ale);
                                                items++;
@@ -2011,13 +1872,13 @@ static int animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_dat
                                /* add F-Curve channels (drivers are F-Curves) */
                                if (FILTER_WOR_SCED(wo)/*EXPANDED_DRVD(adt)*/ || !(filter_mode & ANIMFILTER_CHANNELS)) {
                                        // XXX owner info is messed up now...
-                                       items += animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, wo, ANIMTYPE_DSWOR, filter_mode, (ID *)wo);
+                                       items += animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, filter_mode, (ID *)wo);
                                }
                        },
                        { /* action */
                                /* include world-expand widget? */
                                if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
-                                       ale= make_new_animlistelem(wo, ANIMTYPE_DSWOR, sce, ANIMTYPE_SCENE, (ID *)sce);
+                                       ale= make_new_animlistelem(wo, ANIMTYPE_DSWOR, (ID *)sce);
                                        if (ale) {
                                                BLI_addtail(anim_data, ale);
                                                items++;
@@ -2026,7 +1887,7 @@ static int animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_dat
                                
                                /* add channels */
                                if (FILTER_WOR_SCED(wo) || (filter_mode & ANIMFILTER_CURVESONLY)) {
-                                       items += animdata_filter_action(ac, anim_data, ads, adt->action, filter_mode, wo, ANIMTYPE_DSWOR, (ID *)wo); 
+                                       items += animdata_filter_action(ac, anim_data, ads, adt->action, filter_mode, (ID *)wo); 
                                }
                        }
                )
@@ -2046,12 +1907,12 @@ static int animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_dat
                        { /* AnimData blocks - do nothing... */ },
                        { /* nla */
                                /* add NLA tracks */
-                               items += animdata_filter_nla(ac, anim_data, ads, adt, filter_mode, ntree, ANIMTYPE_DSNTREE, (ID *)ntree);
+                               items += animdata_filter_nla(ac, anim_data, ads, adt, filter_mode, (ID *)ntree);
                        },
                        { /* drivers */
                                /* include nodetree-expand widget? */
                                if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
-                                       ale= make_new_animlistelem(ntree, ANIMTYPE_DSNTREE, sce, ANIMTYPE_SCENE, (ID *)ntree);
+                                       ale= make_new_animlistelem(ntree, ANIMTYPE_DSNTREE, (ID *)ntree);
                                        if (ale) {
                                                BLI_addtail(anim_data, ale);
                                                items++;
@@ -2061,13 +1922,13 @@ static int animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_dat
                                /* add F-Curve channels (drivers are F-Curves) */
                                if (FILTER_NTREE_SCED(ntree)/*EXPANDED_DRVD(adt)*/ || !(filter_mode & ANIMFILTER_CHANNELS)) {
                                        // XXX owner info is messed up now...
-                                       items += animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, ntree, ANIMTYPE_DSNTREE, filter_mode, (ID *)ntree);
+                                       items += animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, filter_mode, (ID *)ntree);
                                }
                        },
                        { /* action */
                                /* include nodetree-expand widget? */
                                if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
-                                       ale= make_new_animlistelem(ntree, ANIMTYPE_DSNTREE, sce, ANIMTYPE_SCENE, (ID *)sce);
+                                       ale= make_new_animlistelem(ntree, ANIMTYPE_DSNTREE, (ID *)sce);
                                        if (ale) {
                                                BLI_addtail(anim_data, ale);
                                                items++;
@@ -2076,7 +1937,7 @@ static int animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_dat
                                
                                /* add channels */
                                if (FILTER_NTREE_SCED(ntree) || (filter_mode & ANIMFILTER_CURVESONLY)) {
-                                       items += animdata_filter_action(ac, anim_data, ads, adt->action, filter_mode, ntree, ANIMTYPE_DSNTREE, (ID *)ntree); 
+                                       items += animdata_filter_action(ac, anim_data, ads, adt->action, filter_mode, (ID *)ntree); 
                                }
                        }
                )
@@ -2496,8 +2357,8 @@ static short animdata_filter_dopesheet_summary (bAnimContext *ac, ListBase *anim
         *        since all the other Animation Editors won't have this concept
         *        being applicable.
         */
-       if ((ac && ac->sa) && (ac->sa->spacetype == SPACE_ACTION)) {
-               SpaceAction *saction= (SpaceAction *)ac->sa->spacedata.first;
+       if ((ac && ac->sl) && (ac->spacetype == SPACE_ACTION)) {
+               SpaceAction *saction= (SpaceAction *)ac->sl;
                ads= &saction->ads;
        }
        else {
@@ -2511,7 +2372,7 @@ static short animdata_filter_dopesheet_summary (bAnimContext *ac, ListBase *anim
         */
        // TODO: we should really check if some other prohibited filters are also active, but that can be for later
        if ((filter_mode & ANIMFILTER_CHANNELS) && (ads->filterflag & ADS_FILTER_SUMMARY)) {
-               bAnimListElem *ale= make_new_animlistelem(ac, ANIMTYPE_SUMMARY, NULL, ANIMTYPE_NONE, NULL);
+               bAnimListElem *ale= make_new_animlistelem(ac, ANIMTYPE_SUMMARY, NULL);
                if (ale) {
                        BLI_addtail(anim_data, ale);
                        (*items)++;
@@ -2608,12 +2469,12 @@ int ANIM_animdata_filter (bAnimContext *ac, ListBase *anim_data, int filter_mode
                switch (datatype) {
                        case ANIMCONT_ACTION:   /* 'Action Editor' */
                        {
-                               SpaceAction *saction = (SpaceAction *)ac->sa->spacedata.first;
+                               SpaceAction *saction = (SpaceAction *)ac->sl;
                                bDopeSheet *ads = (saction)? &saction->ads : NULL;
                                
                                /* the check for the DopeSheet summary is included here since the summary works here too */
                                if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items))
-                                       items += animdata_filter_action(ac, anim_data, ads, data, filter_mode, NULL, ANIMTYPE_NONE, (ID *)obact);
+                                       items += animdata_filter_action(ac, anim_data, ads, data, filter_mode, (ID *)obact);
                        }
                                break;
                                
index 5ecbaeb1c87c6058c328a20ca9629b3fa9b64333..a8836458fad9f82a1d39aeffb35d01900f499f74 100644 (file)
@@ -41,6 +41,7 @@ struct bContext;
 struct wmKeyConfig;
 struct ReportList;
 struct ScrArea;
+struct SpaceLink;
 struct ARegion;
 struct View2D;
 
@@ -72,7 +73,8 @@ typedef struct bAnimContext {
        short mode;                             /* editor->mode */
        short spacetype;                /* sa->spacetype */
        short regiontype;               /* active region -> type (channels or main) */
-       struct ScrArea *sa;             /* editor */ 
+       struct ScrArea *sa;             /* editor host */
+       struct SpaceLink *sl;   /* editor data */
        struct ARegion *ar;             /* region within editor */
        
        struct Scene *scene;    /* active scene */
@@ -108,8 +110,6 @@ typedef struct bAnimListElem {
        int             flag;                   /* copy of elem's flags for quick access */
        int     index;                  /* for un-named data, the index of the data in it's collection */
        
-       short   elemFlag;               /* flags for the list elem instance (not the data it represents) */
-       
        short   datatype;               /* type of motion data to expect */
        void    *key_data;              /* motion data - mostly F-Curves, but can be other types too */
        
@@ -126,7 +126,6 @@ typedef struct bAnimListElem {
  * NOTE: need to keep the order of these synchronised with the channels define code
  *             which is used for drawing and handling channel lists for 
  */
-// XXX was ACTTYPE_*
 typedef enum eAnim_ChannelType {
        ANIMTYPE_NONE= 0,
        ANIMTYPE_ANIMDATA,
@@ -141,9 +140,6 @@ typedef enum eAnim_ChannelType {
        
        ANIMTYPE_FILLACTD,
        ANIMTYPE_FILLDRIVERS,
-       ANIMTYPE_FILLMATD,
-       ANIMTYPE_FILLPARTD,
-       ANIMTYPE_FILLTEXD,
        
        ANIMTYPE_DSMAT,
        ANIMTYPE_DSLAM,
@@ -188,7 +184,6 @@ typedef enum eAnim_KeyType {
 /* ----------------- Filtering -------------------- */
 
 /* filtering flags  - under what circumstances should a channel be added */
-// XXX was ACTFILTER_*
 typedef enum eAnimFilter_Flags {
        ANIMFILTER_VISIBLE              = (1<<0),       /* should channels be visible (in terms of hierarchy only) */
        ANIMFILTER_SEL                  = (1<<1),       /* should channels be selected */
@@ -222,9 +217,6 @@ typedef enum eAnimFilter_Flags {
        /* 'Object' channels */
 #define SEL_OBJC(base) ((base->flag & SELECT))
 #define EXPANDED_OBJC(ob) ((ob->nlaflag & OB_ADS_COLLAPSED)==0)
-       /* 'Sub-object' channels (flags stored in Object block) */
-#define FILTER_MAT_OBJC(ob) ((ob->nlaflag & OB_ADS_SHOWMATS))
-#define FILTER_PART_OBJC(ob) ((ob->nlaflag & OB_ADS_SHOWPARTS))
        /* 'Sub-object' channels (flags stored in Data block) */
 #define FILTER_SKE_OBJD(key) ((key->flag & KEY_DS_EXPAND))
 #define FILTER_MAT_OBJD(ma) ((ma->flag & MA_DS_EXPAND))
@@ -243,9 +235,6 @@ typedef enum eAnimFilter_Flags {
        /* 'Sub-AnimData' channels */
 #define EXPANDED_DRVD(adt) ((adt->flag & ADT_DRIVERS_COLLAPSED)==0)
        /* Texture expanders */
-#define FILTER_TEX_MATC(ma) ((ma->flag & MA_DS_SHOW_TEXS))
-#define FILTER_TEX_LAMC(la) ((la->flag & LA_DS_SHOW_TEXS))
-#define FILTER_TEX_WORC(wa) ((wo->flag & WO_DS_SHOW_TEXS))
 #define FILTER_TEX_DATA(tex) ((tex->flag & TEX_DS_EXPAND))
 
 /* Actions (also used for Dopesheet) */
index f0f34645ebfee6f00873c01ee9827bd2e6163926..1b8a1778707e6760e0c32ade9155fb0665ec711e 100644 (file)
@@ -248,8 +248,6 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                                        break;
                                                
                                                case ANIMTYPE_FILLACTD:
-                                               case ANIMTYPE_FILLMATD:
-                                               case ANIMTYPE_FILLPARTD:
                                                case ANIMTYPE_DSSKEY:
                                                case ANIMTYPE_DSWOR:
                                                {
index 4d0043913abe72ba606170282dcebe8609171e60..95f618ad36027110157228719405debff65494de 100644 (file)
@@ -780,7 +780,7 @@ static void actkeys_select_leftright (bAnimContext *ac, short leftright, short s
        
        /* Sync marker support */
        if (select_mode==SELECT_ADD) {
-               SpaceAction *saction= ac->sa->spacedata.first;
+               SpaceAction *saction= (SpaceAction *)ac->sl;
                
                if ((saction) && (saction->flag & SACTION_MARKERS_MOVE)) {
                        ListBase *markers = ED_animcontext_get_markers(ac);
index 0da03832d15a6a969e8dd583597dd7ef04bfd949..71c937b87cb9da1baca2bb9fda12bd1aabe61ffa 100644 (file)
@@ -279,7 +279,7 @@ void GRAPH_OT_view_selected (wmOperatorType *ot)
 /* Bake each F-Curve into a set of samples, and store as a ghost curve */
 static void create_ghost_curves (bAnimContext *ac, int start, int end)
 {      
-       SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first;
+       SpaceIpo *sipo= (SpaceIpo *)ac->sl;
        ListBase anim_data = {NULL, NULL};
        bAnimListElem *ale;
        int filter;
@@ -399,7 +399,7 @@ static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op))
        /* get editor data */
        if (ANIM_animdata_get_context(C, &ac) == 0)
                return OPERATOR_CANCELLED;
-       sipo= (SpaceIpo *)ac.sa->spacedata.first;
+       sipo= (SpaceIpo *)ac.sl;
                
        /* if no ghost curves, don't do anything */
        if (sipo->ghostCurves.first == NULL)
@@ -1725,7 +1725,7 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
        
        /* set the new current frame and cursor values, based on the average time and value */
        if (ked.i1) {
-               SpaceIpo *sipo= ac.sa->spacedata.first;
+               SpaceIpo *sipo= (SpaceIpo *)ac.sl;
                Scene *scene= ac.scene;
                
                /* take the average values, rounding to the nearest int for the current frame */
@@ -1792,7 +1792,7 @@ static void snap_graph_keys(bAnimContext *ac, short mode)
                ked.list.last= (ac->markers) ? ac->markers->last : NULL;
        }
        else if (mode == GRAPHKEYS_SNAP_VALUE) {
-               SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first;
+               SpaceIpo *sipo= (SpaceIpo *)ac->sl;
                ked.f1= (sipo) ? sipo->cursorVal : 0.0f;
        }
        
@@ -1906,7 +1906,7 @@ static void mirror_graph_keys(bAnimContext *ac, short mode)
                        return;
        }
        else if (mode == GRAPHKEYS_MIRROR_VALUE) {
-               SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first;
+               SpaceIpo *sipo= (SpaceIpo *)ac->sl;
                ked.f1= (sipo) ? sipo->cursorVal : 0.0f;
        }
        
index cb799b85d3a68c24e4eb80ce17dd1d809e566cc4..507ee43c6aaec79d7a9ab49d9fb470ee6c57c5d2 100644 (file)
@@ -90,7 +90,7 @@ static void deselect_graph_keys (bAnimContext *ac, short test, short sel)
        bAnimListElem *ale;
        int filter;
        
-       SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first;
+       SpaceIpo *sipo= (SpaceIpo *)ac->sl;
        KeyframeEditData ked= {{NULL}};
        KeyframeEditFunc test_cb, sel_cb;
        
@@ -201,7 +201,7 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho
        bAnimListElem *ale;
        int filter;
        
-       SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first;
+       SpaceIpo *sipo= (SpaceIpo *)ac->sl;
        KeyframeEditData ked;
        KeyframeEditFunc ok_cb, select_cb;
        View2D *v2d= &ac->ar->v2d;
@@ -958,7 +958,7 @@ static void get_nearest_fcurve_verts_list (bAnimContext *ac, const int mval[2],
        bAnimListElem *ale;
        int filter;
        
-       SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first;
+       SpaceIpo *sipo= (SpaceIpo *)ac->sl;
        View2D *v2d= &ac->ar->v2d;
        
        /* get curves to search through 
@@ -1091,7 +1091,7 @@ static tNearestVertInfo *find_nearest_fcurve_vert (bAnimContext *ac, const int m
 /* option 1) select keyframe directly under mouse */
 static void mouse_graph_keys (bAnimContext *ac, const int mval[2], short select_mode, short curves_only)
 {
-       SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first;
+       SpaceIpo *sipo= (SpaceIpo *)ac->sl;
        tNearestVertInfo *nvi;
        BezTriple *bezt= NULL;
        
@@ -1218,7 +1218,7 @@ static void graphkeys_mselect_column (bAnimContext *ac, const int mval[2], short
        bAnimListElem *ale;
        int filter;
        
-       SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first;
+       SpaceIpo *sipo= (SpaceIpo *)ac->sl;
        KeyframeEditFunc select_cb, ok_cb;
        KeyframeEditData ked;
        tNearestVertInfo *nvi;
index e830a421a591fbd2ca9b8a0a43838b0c881268ee..c4a3a2324b422ae972462be48591aedd58bd068a 100644 (file)
@@ -605,8 +605,8 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie
                                        indent= 0;
                                        
                                        if (ale->id) {
-                                               /* special exception for materials and particles */
-                                               if (ELEM(GS(ale->id->name),ID_MA,ID_PA)) {
+                                               /* special exception for textures */
+                                               if (GS(ale->id->name) == ID_TE) {
                                                        offset= 21;
                                                        indent= 1;
                                                }
@@ -653,8 +653,8 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie
                                        group = 5;
                                        
                                        if (ale->id) {
-                                               /* special exception for materials and particles */
-                                               if (ELEM(GS(ale->id->name),ID_MA,ID_PA)) {
+                                               /* special exception for textures */
+                                               if (GS(ale->id->name) == ID_TE) {
                                                        offset= 21;
                                                        indent= 1;
                                                }
index 20a26d8c58d43973333bfe9495cd04ab1f718575..82f3ad87785c8d82c469ce406f7d262f40b60686 100644 (file)
@@ -349,6 +349,7 @@ void recalcData(TransInfo *t)
                ac.obact= OBACT;
                ac.sa= t->sa;
                ac.ar= t->ar;
+               ac.sl= (t->sa)? t->sa->spacedata.first : NULL;
                ac.spacetype= (t->sa)? t->sa->spacetype : 0;
                ac.regiontype= (t->ar)? t->ar->regiontype : 0;
                
@@ -383,7 +384,7 @@ void recalcData(TransInfo *t)
                SpaceIpo *sipo= (SpaceIpo *)t->sa->spacedata.first;
                
                ListBase anim_data = {NULL, NULL};
-               bAnimContext ac;
+               bAnimContext ac= {NULL};
                int filter;
                
                bAnimListElem *ale;
@@ -392,12 +393,11 @@ void recalcData(TransInfo *t)
                
                /* initialise relevant anim-context 'context' data from TransInfo data */
                        /* NOTE: sync this with the code in ANIM_animdata_get_context() */
-               memset(&ac, 0, sizeof(bAnimContext));
-               
                scene= ac.scene= t->scene;
                ac.obact= OBACT;
                ac.sa= t->sa;
                ac.ar= t->ar;
+               ac.sl= (t->sa)? t->sa->spacedata.first : NULL;
                ac.spacetype= (t->sa)? t->sa->spacetype : 0;
                ac.regiontype= (t->ar)? t->ar->regiontype : 0;