Blender  V2.59
Defines | Functions
anim_filter.c File Reference
#include <string.h>
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_camera_types.h"
#include "DNA_lamp_types.h"
#include "DNA_lattice_types.h"
#include "DNA_key_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meta_types.h"
#include "DNA_node_types.h"
#include "DNA_particle_types.h"
#include "DNA_space_types.h"
#include "DNA_sequence_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_world_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_object_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_fcurve.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_group.h"
#include "BKE_key.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_sequencer.h"
#include "BKE_utildefines.h"
#include "ED_anim_api.h"
#include "ED_markers.h"

Go to the source code of this file.

Defines

#define ANIMDATA_HAS_KEYS(id)   ((id)->adt && (id)->adt->action)
#define ANIMDATA_HAS_DRIVERS(id)   ((id)->adt && (id)->adt->drivers.first)
#define ANIMDATA_HAS_NLA(id)   ((id)->adt && (id)->adt->nla_tracks.first)
#define ANIMDATA_FILTER_CASES(id, adtOk, nlaOk, driversOk, keysOk)
#define ANIMDATA_ADD_ANIMDATA(id)
#define ANIMCHANNEL_ACTIVEOK(ale)   ( !(filter_mode & ANIMFILTER_ACTIVE) || !(ale->adt) || (ale->adt->flag & ADT_UI_ACTIVE) )
#define ANIMCHANNEL_SELOK(test_func)
#define ANIMCHANNEL_SELEDITOK(test_func)

Functions

static Keyactedit_get_shapekeys (bAnimContext *ac)
static short actedit_get_context (bAnimContext *ac, SpaceAction *saction)
static short graphedit_get_context (bAnimContext *ac, SpaceIpo *sipo)
static short nlaedit_get_context (bAnimContext *ac, SpaceNla *snla)
short ANIM_animdata_context_getdata (bAnimContext *ac)
short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
static bAnimListElemmake_new_animlistelem (void *data, short datatype, void *owner, short ownertype, ID *owner_id)
static int skip_fcurve_selected_data (bDopeSheet *ads, FCurve *fcu, ID *owner_id, int filter_mode)
static short skip_fcurve_with_name (bDopeSheet *ads, FCurve *fcu, ID *owner_id)
static FCurveanimdata_filter_fcurve_next (bDopeSheet *ads, FCurve *first, bActionGroup *grp, int filter_mode, ID *owner_id)
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_action (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAction *act, 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, void *owner, short ownertype, ID *owner_id)
static int animdata_filter_shapekey (bAnimContext *ac, ListBase *anim_data, Key *key, int filter_mode)
static int animdata_filter_gpencil (ListBase *anim_data, void *UNUSED(data), int filter_mode)
static int animdata_filter_dopesheet_texs (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, int filter_mode)
static int animdata_filter_dopesheet_mats (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Base *base, int filter_mode)
static int animdata_filter_dopesheet_particles (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Base *base, int filter_mode)
static int animdata_filter_dopesheet_obdata (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Base *base, int filter_mode)
static int animdata_filter_dopesheet_ob (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Base *base, int filter_mode)
static int animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode)
static int animdata_filter_dopesheet (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, int filter_mode)
static short animdata_filter_dopesheet_summary (bAnimContext *ac, ListBase *anim_data, int filter_mode, int *items)
static int animdata_filter_remove_invalid (ListBase *anim_data)
static int animdata_filter_remove_duplis (ListBase *anim_data)
int ANIM_animdata_filter (bAnimContext *ac, ListBase *anim_data, int filter_mode, void *data, short datatype)

Detailed Description

Definition in file anim_filter.c.


Define Documentation

#define ANIMCHANNEL_ACTIVEOK (   ale)    ( !(filter_mode & ANIMFILTER_ACTIVE) || !(ale->adt) || (ale->adt->flag & ADT_UI_ACTIVE) )
#define ANIMCHANNEL_SELEDITOK (   test_func)
Value:
( !(filter_mode & ANIMFILTER_SELEDIT) || \
                  !(filter_mode & ANIMFILTER_FOREDIT) || \
                  (test_func) )

Definition at line 425 of file anim_filter.c.

Referenced by animdata_filter_fcurve_next().

#define ANIMCHANNEL_SELOK (   test_func)
#define ANIMDATA_ADD_ANIMDATA (   id)
Value:
{\
                ale= make_new_animlistelem((id)->adt, ANIMTYPE_ANIMDATA, NULL, ANIMTYPE_NONE, (ID *)id);\
                if (ale) {\
                        BLI_addtail(anim_data, ale);\
                        items++;\
                }\
        }

Definition at line 398 of file anim_filter.c.

Referenced by animdata_filter_dopesheet(), and animdata_filter_shapekey().

#define ANIMDATA_FILTER_CASES (   id,
  adtOk,
  nlaOk,
  driversOk,
  keysOk 
)
Value:
{\
                if ((id)->adt) {\
                        if (!(filter_mode & ANIMFILTER_CURVEVISIBLE) || !((id)->adt->flag & ADT_CURVES_NOT_VISIBLE)) {\
                                if (filter_mode & ANIMFILTER_ANIMDATA) {\
                                        adtOk\
                                }\
                                else if (ads->filterflag & ADS_FILTER_ONLYNLA) {\
                                        if (ANIMDATA_HAS_NLA(id)) {\
                                                nlaOk\
                                        }\
                                        else if (!(ads->filterflag & ADS_FILTER_NLA_NOACT) && ANIMDATA_HAS_KEYS(id)) {\
                                                nlaOk\
                                        }\
                                }\
                                else if (ads->filterflag & ADS_FILTER_ONLYDRIVERS) {\
                                        if (ANIMDATA_HAS_DRIVERS(id)) {\
                                                driversOk\
                                        }\
                                }\
                                else {\
                                        if (ANIMDATA_HAS_KEYS(id)) {\
                                                keysOk\
                                        }\
                                }\
                        }\
                }\
        }

Definition at line 367 of file anim_filter.c.

Referenced by animdata_filter_dopesheet(), animdata_filter_dopesheet_mats(), animdata_filter_dopesheet_ob(), animdata_filter_dopesheet_obdata(), animdata_filter_dopesheet_particles(), animdata_filter_dopesheet_scene(), and animdata_filter_dopesheet_texs().

#define ANIMDATA_HAS_DRIVERS (   id)    ((id)->adt && (id)->adt->drivers.first)

Definition at line 334 of file anim_filter.c.

#define ANIMDATA_HAS_KEYS (   id)    ((id)->adt && (id)->adt->action)

Definition at line 331 of file anim_filter.c.

#define ANIMDATA_HAS_NLA (   id)    ((id)->adt && (id)->adt->nla_tracks.first)

Definition at line 337 of file anim_filter.c.


Function Documentation

static short actedit_get_context ( bAnimContext ac,
SpaceAction saction 
) [static]
static Key* actedit_get_shapekeys ( bAnimContext ac) [static]

Definition at line 103 of file anim_filter.c.

References KEY_RELATIVE, NULL, ob_get_key(), OBACT, bAnimContext::scene, and Key::type.

Referenced by actedit_get_context().

short ANIM_animdata_context_getdata ( bAnimContext ac)
int ANIM_animdata_filter ( bAnimContext ac,
ListBase anim_data,
int  filter_mode,
void *  data,
short  datatype 
)

Definition at line 2599 of file anim_filter.c.

References SpaceAction::ads, ANIMCONT_ACTION, ANIMCONT_DOPESHEET, ANIMCONT_DRIVERS, ANIMCONT_FCURVES, ANIMCONT_GPENCIL, ANIMCONT_NLA, ANIMCONT_SHAPEKEY, animdata_filter_action(), animdata_filter_dopesheet(), animdata_filter_dopesheet_summary(), animdata_filter_gpencil(), animdata_filter_remove_duplis(), animdata_filter_remove_invalid(), animdata_filter_shapekey(), ANIMFILTER_NODUPLIS, ANIMTYPE_NONE, ListBase::first, NULL, bAnimContext::obact, bAnimContext::sa, and ScrArea::spacedata.

Referenced by achannel_setting_flush_widget_cb(), actkeys_framejump_exec(), actkeys_mselect_column(), actkeys_select_leftright(), actkeys_select_linked_exec(), ANIM_deselect_anim_channels(), ANIM_editkeyframes_refresh(), ANIM_set_active_channel(), ANIM_sync_animchannels_to_data(), animchannels_delete_exec(), animchannels_enable_exec(), animchannels_rearrange_exec(), animchannels_visibility_set_exec(), animchannels_visibility_toggle_exec(), bake_graph_curves(), borderselect_action(), borderselect_anim_channels(), borderselect_graphkeys(), borderselect_nla_strips(), clean_action_keys(), clean_graph_keys(), columnselect_action_keys(), columnselect_graph_keys(), copy_action_keys(), copy_graph_keys(), createTransActionData(), createTransNlaData(), delete_action_keys(), delete_graph_keys(), deselect_action_keys(), deselect_nla_strips(), draw_channel_names(), draw_channel_strips(), draw_nla_channel_list(), draw_nla_main_data(), duplicate_action_keys(), duplicate_graph_keys(), ED_nla_postop_refresh(), get_active_fcurve_channel(), get_graph_keyframe_extents(), get_keyframe_extents(), get_nearest_fcurve_verts_list(), graph_draw_channel_names(), graph_draw_curves(), graph_fmodifier_add_exec(), graph_fmodifier_paste_exec(), graph_refresh(), graphkeys_euler_filter_exec(), graphkeys_framejump_exec(), graphkeys_mselect_column(), graphkeys_select_leftright(), graphkeys_select_linked_exec(), graphkeys_smooth_exec(), graphop_editable_keyframes_poll(), graphop_selected_fcurve_poll(), graphop_visible_keyframes_poll(), insert_action_keys(), insert_graph_keys(), markers_selectkeys_between(), mirror_action_keys(), mirror_graph_keys(), mouse_action_keys(), mouse_anim_channels(), mouse_nla_channels(), mouse_nla_strips(), nla_fmodifier_add_exec(), nla_fmodifier_copy_exec(), nla_fmodifier_paste_exec(), nla_panel_context(), nlaedit_add_actionclip_exec(), nlaedit_add_meta_exec(), nlaedit_add_tracks_exec(), nlaedit_add_transition_exec(), nlaedit_apply_scale_exec(), nlaedit_bake_exec(), nlaedit_clear_scale_exec(), nlaedit_delete_exec(), nlaedit_delete_tracks_exec(), nlaedit_disable_tweakmode_exec(), nlaedit_duplicate_exec(), nlaedit_enable_tweakmode_exec(), nlaedit_move_down_exec(), nlaedit_move_up_exec(), nlaedit_remove_meta_exec(), nlaedit_select_leftright(), nlaedit_snap_exec(), nlaedit_split_exec(), nlaedit_swap_exec(), nlaedit_sync_actlen_exec(), nlaedit_toggle_mute_exec(), paste_action_keys(), paste_graph_keys(), posttrans_action_clean(), recalcData(), sample_action_keys(), sample_graph_keys(), select_moreless_action_keys(), select_moreless_graph_keys(), setexpo_action_keys(), setexpo_graph_keys(), setflag_anim_channels(), sethandles_action_keys(), sethandles_graph_keys(), setipo_action_keys(), setipo_graph_keys(), setkeytype_action_keys(), snap_action_keys(), snap_graph_keys(), special_aftertrans_update(), summary_keyframes_loop(), and summary_to_keylist().

short ANIM_animdata_get_context ( const bContext C,
bAnimContext ac 
)

Definition at line 302 of file anim_filter.c.

References ANIM_animdata_context_getdata(), bAnimContext::ar, Scene::basact, CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), ED_context_get_markers(), bAnimContext::markers, NULL, bAnimContext::obact, Base::object, bAnimContext::regiontype, ARegion::regiontype, bAnimContext::sa, bAnimContext::scene, bAnimContext::spacetype, and ScrArea::spacetype.

Referenced by achannel_setting_flush_widget_cb(), action_channel_area_draw(), action_main_area_draw(), actkeys_borderselect_exec(), actkeys_clean_exec(), actkeys_clickselect_invoke(), actkeys_columnselect_exec(), actkeys_copy_exec(), actkeys_delete_exec(), actkeys_deselectall_exec(), actkeys_duplicate_exec(), actkeys_expo_exec(), actkeys_framejump_exec(), actkeys_handletype_exec(), actkeys_insertkey_exec(), actkeys_ipo_exec(), actkeys_keytype_exec(), actkeys_mirror_exec(), actkeys_paste_exec(), actkeys_previewrange_exec(), actkeys_sample_exec(), actkeys_select_leftright_exec(), actkeys_select_leftright_invoke(), actkeys_select_less_exec(), actkeys_select_linked_exec(), actkeys_select_more_exec(), actkeys_snap_exec(), actkeys_viewall(), ANIM_sync_animchannels_to_data(), animchannels_borderselect_exec(), animchannels_collapse_exec(), animchannels_delete_exec(), animchannels_deselectall_exec(), animchannels_enable_exec(), animchannels_expand_exec(), animchannels_mouseclick_invoke(), animchannels_rearrange_exec(), animchannels_setflag_exec(), animchannels_visibility_set_exec(), animchannels_visibility_toggle_exec(), createTransActionData(), createTransNlaData(), graph_channel_area_draw(), graph_fmodifier_add_exec(), graph_fmodifier_copy_exec(), graph_fmodifier_paste_exec(), graph_main_area_draw(), graph_panel_context(), graph_refresh(), graphkeys_bake_exec(), graphkeys_borderselect_exec(), graphkeys_clean_exec(), graphkeys_clear_ghostcurves_exec(), graphkeys_click_insert_exec(), graphkeys_click_insert_invoke(), graphkeys_clickselect_invoke(), graphkeys_columnselect_exec(), graphkeys_copy_exec(), graphkeys_create_ghostcurves_exec(), graphkeys_delete_exec(), graphkeys_deselectall_exec(), graphkeys_duplicate_exec(), graphkeys_euler_filter_exec(), graphkeys_expo_exec(), graphkeys_framejump_exec(), graphkeys_handletype_exec(), graphkeys_insertkey_exec(), graphkeys_ipo_exec(), graphkeys_mirror_exec(), graphkeys_paste_exec(), graphkeys_previewrange_exec(), graphkeys_sample_exec(), graphkeys_select_leftright_exec(), graphkeys_select_leftright_invoke(), graphkeys_select_less_exec(), graphkeys_select_linked_exec(), graphkeys_select_more_exec(), graphkeys_smooth_exec(), graphkeys_snap_exec(), graphkeys_sound_bake_invoke(), graphkeys_viewall(), graphop_active_fcurve_poll(), graphop_editable_keyframes_poll(), graphop_selected_fcurve_poll(), graphop_visible_keyframes_poll(), nla_channel_area_draw(), nla_fmodifier_add_exec(), nla_fmodifier_copy_exec(), nla_fmodifier_paste_exec(), nla_main_area_draw(), nla_panel_context(), nlachannels_mouseclick_invoke(), nlaedit_add_actionclip_exec(), nlaedit_add_meta_exec(), nlaedit_add_tracks_exec(), nlaedit_add_transition_exec(), nlaedit_apply_scale_exec(), nlaedit_bake_exec(), nlaedit_borderselect_exec(), nlaedit_clear_scale_exec(), nlaedit_clickselect_invoke(), nlaedit_delete_exec(), nlaedit_delete_tracks_exec(), nlaedit_deselectall_exec(), nlaedit_disable_tweakmode_exec(), nlaedit_duplicate_exec(), nlaedit_enable_tweakmode_exec(), nlaedit_move_down_exec(), nlaedit_move_up_exec(), nlaedit_remove_meta_exec(), nlaedit_select_leftright_exec(), nlaedit_select_leftright_invoke(), nlaedit_snap_exec(), nlaedit_split_exec(), nlaedit_swap_exec(), nlaedit_sync_actlen_exec(), nlaedit_toggle_mute_exec(), and special_aftertrans_update().

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]
static int animdata_filter_dopesheet ( bAnimContext ac,
ListBase anim_data,
bDopeSheet ads,
int  filter_mode 
) [static]
static int animdata_filter_dopesheet_mats ( bAnimContext ac,
ListBase anim_data,
bDopeSheet ads,
Base base,
int  filter_mode 
) [static]
static int animdata_filter_dopesheet_ob ( bAnimContext ac,
ListBase anim_data,
bDopeSheet ads,
Base base,
int  filter_mode 
) [static]
static int animdata_filter_dopesheet_obdata ( bAnimContext ac,
ListBase anim_data,
bDopeSheet ads,
Base base,
int  filter_mode 
) [static]
static int animdata_filter_dopesheet_particles ( bAnimContext ac,
ListBase anim_data,
bDopeSheet ads,
Base base,
int  filter_mode 
) [static]
static int animdata_filter_dopesheet_scene ( bAnimContext ac,
ListBase anim_data,
bDopeSheet ads,
Scene sce,
int  filter_mode 
) [static]
static short animdata_filter_dopesheet_summary ( bAnimContext ac,
ListBase anim_data,
int  filter_mode,
int *  items 
) [static]
static int animdata_filter_dopesheet_texs ( bAnimContext ac,
ListBase anim_data,
bDopeSheet ads,
ID owner_id,
int  filter_mode 
) [static]
static FCurve* animdata_filter_fcurve_next ( bDopeSheet ads,
FCurve first,
bActionGroup grp,
int  filter_mode,
ID owner_id 
) [static]
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]
static int animdata_filter_gpencil ( ListBase anim_data,
void *  UNUSEDdata,
int  filter_mode 
) [static]
static int animdata_filter_nla ( bAnimContext UNUSEDac,
ListBase anim_data,
bDopeSheet UNUSEDads,
AnimData adt,
int  filter_mode,
void *  owner,
short  ownertype,
ID owner_id 
) [static]
static int animdata_filter_remove_duplis ( ListBase anim_data) [static]
static int animdata_filter_remove_invalid ( ListBase anim_data) [static]
static int animdata_filter_shapekey ( bAnimContext ac,
ListBase anim_data,
Key key,
int  filter_mode 
) [static]
static short graphedit_get_context ( bAnimContext ac,
SpaceIpo sipo 
) [static]
static bAnimListElem* make_new_animlistelem ( void *  data,
short  datatype,
void *  owner,
short  ownertype,
ID owner_id 
) [static]

Definition at line 435 of file anim_filter.c.

References AnimData::action, Camera::adt, Lamp::adt, World::adt, Lattice::adt, Mesh::adt, Key::adt, Material::adt, bArmature::adt, bAnimListElem::adt, ParticleSettings::adt, Curve::adt, bNodeTree::adt, Tex::adt, ALE_ACT, ALE_ALL, ALE_FCURVE, ALE_GPFRAME, ALE_GROUP, ALE_NLASTRIP, ALE_NONE, ALE_OB, ALE_SCE, ANIMTYPE_DSARM, ANIMTYPE_DSCAM, ANIMTYPE_DSCUR, ANIMTYPE_DSLAM, ANIMTYPE_DSLAT, ANIMTYPE_DSMAT, ANIMTYPE_DSMESH, ANIMTYPE_DSNTREE, ANIMTYPE_DSPART, ANIMTYPE_DSSKEY, ANIMTYPE_DSTEX, ANIMTYPE_DSWOR, ANIMTYPE_FCURVE, ANIMTYPE_FILLACTD, ANIMTYPE_FILLDRIVERS, ANIMTYPE_FILLMATD, ANIMTYPE_FILLPARTD, ANIMTYPE_FILLTEXD, ANIMTYPE_GPLAYER, ANIMTYPE_GROUP, ANIMTYPE_NLAACTION, ANIMTYPE_NLATRACK, ANIMTYPE_OBJECT, ANIMTYPE_SCENE, ANIMTYPE_SHAPEKEY, ANIMTYPE_SUMMARY, BKE_animdata_from_id(), BLI_findindex(), Key::block, bAction::curves, bAnimListElem::data, bAnimListElem::datatype, FILTER_ARM_OBJD, FILTER_CAM_OBJD, FILTER_CUR_OBJD, FILTER_LAM_OBJD, FILTER_LATTICE_OBJD, FILTER_MAT_OBJC, FILTER_MAT_OBJD, FILTER_MESH_OBJD, FILTER_NTREE_SCED, FILTER_PART_OBJC, FILTER_PART_OBJD, FILTER_SKE_OBJD, FILTER_TEX_DATA, FILTER_TEX_LAMC, FILTER_TEX_MATC, FILTER_TEX_WORC, FILTER_WOR_SCED, KeyBlock::flag, bGPDlayer::flag, bAnimListElem::flag, Object::flag, FCurve::flag, bActionGroup::flag, bAction::flag, NlaTrack::flag, Scene::flag, AnimData::flag, GS, Object::id, bAnimListElem::id, ID_LA, ID_MA, ID_WO, if(), bAnimListElem::index, bAnimListElem::key_data, key_get_curValue_rnaPath(), list_find_fcurve(), MEM_callocN(), MEM_freeN(), ID::name, NULL, Base::object, bAnimListElem::owner, bAnimListElem::ownertype, NlaTrack::strips, and bAnimListElem::type.

Referenced by animdata_filter_action(), animdata_filter_dopesheet_mats(), animdata_filter_dopesheet_ob(), animdata_filter_dopesheet_obdata(), animdata_filter_dopesheet_particles(), animdata_filter_dopesheet_scene(), animdata_filter_dopesheet_summary(), animdata_filter_dopesheet_texs(), animdata_filter_fcurves(), animdata_filter_gpencil(), animdata_filter_nla(), and animdata_filter_shapekey().

static short nlaedit_get_context ( bAnimContext ac,
SpaceNla snla 
) [static]
static int skip_fcurve_selected_data ( bDopeSheet ads,
FCurve fcu,
ID owner_id,
int  filter_mode 
) [static]
static short skip_fcurve_with_name ( bDopeSheet ads,
FCurve fcu,
ID owner_id 
) [static]