|
Blender
V2.59
|
#include <math.h>#include <stdlib.h>#include <string.h>#include <float.h>#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_math.h"#include "BLI_dlrbTree.h"#include "BLI_utildefines.h"#include "DNA_anim_types.h"#include "DNA_armature_types.h"#include "DNA_camera_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "DNA_key_types.h"#include "DNA_lamp_types.h"#include "DNA_lattice_types.h"#include "DNA_mesh_types.h"#include "DNA_material_types.h"#include "DNA_meta_types.h"#include "DNA_node_types.h"#include "DNA_particle_types.h"#include "DNA_world_types.h"#include "DNA_gpencil_types.h"#include "BKE_key.h"#include "BKE_material.h"#include "BKE_global.h"#include "BIF_gl.h"#include "UI_resources.h"#include "UI_view2d.h"#include "ED_anim_api.h"#include "ED_keyframes_draw.h"Go to the source code of this file.
Classes | |
| struct | ActBeztColumn |
Defines | |
| #define | MAX_ABK_BUFSIZE 4 |
Typedefs | |
| typedef struct ActBeztColumn | ActBeztColumn |
Functions | |
| short | compare_ak_cfraPtr (void *node, void *data) |
| static short | compare_ak_bezt (void *node, void *data) |
| static DLRBT_Node * | nalloc_ak_bezt (void *data) |
| static void | nupdate_ak_bezt (void *node, void *data) |
| static short | compare_ak_gpframe (void *node, void *data) |
| static DLRBT_Node * | nalloc_ak_gpframe (void *data) |
| static void | nupdate_ak_gpframe (void *node, void *data) |
| static void | add_bezt_to_keycolumns_list (DLRBT_Tree *keys, BezTriple *bezt) |
| static void | add_gpframe_to_keycolumns_list (DLRBT_Tree *keys, bGPDframe *gpf) |
| static short | compare_abk_bezt (void *node, void *data) |
| static DLRBT_Node * | nalloc_abk_bezt (void *data) |
| static void | nupdate_abk_bezt (void *node, void *data) |
| static BezTriple * | abk_get_bezt_with_value (ActBeztColumn *abk, float value) |
| short | compare_ab_cfraPtr (void *node, void *data) |
| static ActKeyBlock * | bezts_to_new_actkeyblock (BezTriple *prev, BezTriple *beztn) |
| static void | add_bezt_to_keyblocks_list (DLRBT_Tree *blocks, DLRBT_Tree *beztTree, BezTriple *beztn) |
| static void | set_touched_actkeycolumn (ActKeyColumn *ak) |
| static void | set_touched_actkeyblock (ActKeyBlock *ab) |
| short | actkeyblock_is_valid (ActKeyBlock *ab, DLRBT_Tree *keys) |
| void | draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel, short key_type, short mode, float alpha) |
| static void | draw_keylist (View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, float ypos, short channelLocked) |
| void | draw_summary_channel (View2D *v2d, bAnimContext *ac, float ypos) |
| void | draw_scene_channel (View2D *v2d, bDopeSheet *ads, Scene *sce, float ypos) |
| void | draw_object_channel (View2D *v2d, bDopeSheet *ads, Object *ob, float ypos) |
| void | draw_fcurve_channel (View2D *v2d, AnimData *adt, FCurve *fcu, float ypos) |
| void | draw_agroup_channel (View2D *v2d, AnimData *adt, bActionGroup *agrp, float ypos) |
| void | draw_action_channel (View2D *v2d, AnimData *adt, bAction *act, float ypos) |
| void | draw_gpl_channel (View2D *v2d, bDopeSheet *ads, bGPDlayer *gpl, float ypos) |
| void | summary_to_keylist (bAnimContext *ac, DLRBT_Tree *keys, DLRBT_Tree *blocks) |
| void | scene_to_keylist (bDopeSheet *ads, Scene *sce, DLRBT_Tree *keys, DLRBT_Tree *blocks) |
| void | ob_to_keylist (bDopeSheet *ads, Object *ob, DLRBT_Tree *keys, DLRBT_Tree *blocks) |
| void | fcurve_to_keylist (AnimData *adt, FCurve *fcu, DLRBT_Tree *keys, DLRBT_Tree *blocks) |
| void | agroup_to_keylist (AnimData *adt, bActionGroup *agrp, DLRBT_Tree *keys, DLRBT_Tree *blocks) |
| void | action_to_keylist (AnimData *adt, bAction *act, DLRBT_Tree *keys, DLRBT_Tree *blocks) |
| void | gpl_to_keylist (bDopeSheet *UNUSED(ads), bGPDlayer *gpl, DLRBT_Tree *keys) |
Variables | |
| static const float | _unit_diamond_shape [4][2] |
Definition in file keyframes_draw.c.
| #define MAX_ABK_BUFSIZE 4 |
Definition at line 211 of file keyframes_draw.c.
Referenced by nupdate_abk_bezt().
| typedef struct ActBeztColumn ActBeztColumn |
| static BezTriple* abk_get_bezt_with_value | ( | ActBeztColumn * | abk, |
| float | value | ||
| ) | [static] |
Definition at line 285 of file keyframes_draw.c.
References ActBeztColumn::bezts, i, NULL, ActBeztColumn::numBezts, and BezTriple::vec.
Referenced by add_bezt_to_keyblocks_list().
| void action_to_keylist | ( | AnimData * | adt, |
| bAction * | act, | ||
| DLRBT_Tree * | keys, | ||
| DLRBT_Tree * | blocks | ||
| ) |
Definition at line 997 of file keyframes_draw.c.
References bAction::curves, fcurve_to_keylist(), ListBase::first, and FCurve::next.
Referenced by draw_action_channel(), draw_ghost_poses_keys(), draw_motion_path_instance(), mouse_action_keys(), nla_action_draw_keyframes(), ob_to_keylist(), poselib_sanitise_exec(), and scene_to_keylist().
| short actkeyblock_is_valid | ( | ActKeyBlock * | ab, |
| DLRBT_Tree * | keys | ||
| ) |
Definition at line 463 of file keyframes_draw.c.
References BLI_dlrbTree_search_exact(), compare_ak_cfraPtr(), ActKeyBlock::end, if(), NULL, ActKeyBlock::start, ActKeyColumn::totcurve, and ActKeyBlock::totcurve.
Referenced by draw_keylist(), and pose_propagate_get_boneHoldEndFrame().
| static void add_bezt_to_keyblocks_list | ( | DLRBT_Tree * | blocks, |
| DLRBT_Tree * | beztTree, | ||
| BezTriple * | beztn | ||
| ) | [static] |
Definition at line 346 of file keyframes_draw.c.
References abk_get_bezt_with_value(), BEZSELECTED, bezts_to_new_actkeyblock(), BLI_dlrbTree_insert(), BLI_dlrbTree_search_prev(), compare_abk_bezt(), IS_EQF, ActKeyBlock::left, ActKeyBlock::modified, NULL, ActKeyBlock::parent, ActBeztColumn::prev, ActKeyBlock::right, DLRBT_Tree::root, ActKeyBlock::sel, SELECT, ActKeyBlock::start, and BezTriple::vec.
Referenced by fcurve_to_keylist().
| static void add_bezt_to_keycolumns_list | ( | DLRBT_Tree * | keys, |
| BezTriple * | bezt | ||
| ) | [static] |
Definition at line 191 of file keyframes_draw.c.
References BLI_dlrbTree_add(), compare_ak_bezt(), ELEM, nalloc_ak_bezt(), NULL, and nupdate_ak_bezt().
Referenced by fcurve_to_keylist().
| static void add_gpframe_to_keycolumns_list | ( | DLRBT_Tree * | keys, |
| bGPDframe * | gpf | ||
| ) | [static] |
Definition at line 200 of file keyframes_draw.c.
References BLI_dlrbTree_add(), compare_ak_gpframe(), ELEM, nalloc_ak_gpframe(), NULL, and nupdate_ak_gpframe().
Referenced by gpl_to_keylist().
| void agroup_to_keylist | ( | AnimData * | adt, |
| bActionGroup * | agrp, | ||
| DLRBT_Tree * | keys, | ||
| DLRBT_Tree * | blocks | ||
| ) |
Definition at line 985 of file keyframes_draw.c.
References bActionGroup::channels, fcurve_to_keylist(), ListBase::first, FCurve::grp, and FCurve::next.
Referenced by draw_agroup_channel(), draw_motion_path_instance(), and mouse_action_keys().
| static ActKeyBlock* bezts_to_new_actkeyblock | ( | BezTriple * | prev, |
| BezTriple * | beztn | ||
| ) | [static] |
Definition at line 332 of file keyframes_draw.c.
References BEZSELECTED, ActKeyBlock::end, MEM_callocN(), ActKeyBlock::modified, ActKeyBlock::sel, SELECT, ActKeyBlock::start, ActKeyBlock::val, and BezTriple::vec.
Referenced by add_bezt_to_keyblocks_list().
| short compare_ab_cfraPtr | ( | void * | node, |
| void * | data | ||
| ) |
Definition at line 316 of file keyframes_draw.c.
References ActKeyBlock::start.
Referenced by pose_propagate_get_boneHoldEndFrame().
| static short compare_abk_bezt | ( | void * | node, |
| void * | data | ||
| ) | [static] |
Definition at line 237 of file keyframes_draw.c.
References ActBeztColumn::cfra, and BezTriple::vec.
Referenced by add_bezt_to_keyblocks_list(), and fcurve_to_keylist().
| static short compare_ak_bezt | ( | void * | node, |
| void * | data | ||
| ) | [static] |
Definition at line 100 of file keyframes_draw.c.
References ActKeyColumn::cfra, and BezTriple::vec.
Referenced by add_bezt_to_keycolumns_list().
| short compare_ak_cfraPtr | ( | void * | node, |
| void * | data | ||
| ) |
Definition at line 84 of file keyframes_draw.c.
References ActKeyColumn::cfra.
Referenced by actkeyblock_is_valid(), draw_motion_path_instance(), keyframe_jump_exec(), pose_propagate_get_boneHoldEndFrame(), and pose_slide_invoke_common().
| static short compare_ak_gpframe | ( | void * | node, |
| void * | data | ||
| ) | [static] |
Definition at line 148 of file keyframes_draw.c.
References ActKeyColumn::cfra, and bGPDframe::framenum.
Referenced by add_gpframe_to_keycolumns_list().
Definition at line 733 of file keyframes_draw.c.
References action_to_keylist(), BLI_dlrbTree_free(), BLI_dlrbTree_init(), BLI_dlrbTree_linkedlist_sync(), and draw_keylist().
Referenced by draw_channel_strips().
| void draw_agroup_channel | ( | View2D * | v2d, |
| AnimData * | adt, | ||
| bActionGroup * | agrp, | ||
| float | ypos | ||
| ) |
Definition at line 715 of file keyframes_draw.c.
References agroup_to_keylist(), AGRP_PROTECTED, BLI_dlrbTree_free(), BLI_dlrbTree_init(), BLI_dlrbTree_linkedlist_sync(), draw_keylist(), and bActionGroup::flag.
Referenced by draw_channel_strips().
Definition at line 697 of file keyframes_draw.c.
References BLI_dlrbTree_free(), BLI_dlrbTree_init(), BLI_dlrbTree_linkedlist_sync(), draw_keylist(), FCURVE_PROTECTED, fcurve_to_keylist(), and FCurve::flag.
Referenced by draw_channel_strips().
| void draw_gpl_channel | ( | View2D * | v2d, |
| bDopeSheet * | ads, | ||
| bGPDlayer * | gpl, | ||
| float | ypos | ||
| ) |
Definition at line 751 of file keyframes_draw.c.
References BLI_dlrbTree_free(), BLI_dlrbTree_init(), BLI_dlrbTree_linkedlist_sync(), draw_keylist(), bGPDlayer::flag, GP_LAYER_LOCKED, gpl_to_keylist(), and NULL.
Referenced by draw_channel_strips().
| void draw_keyframe_shape | ( | float | x, |
| float | y, | ||
| float | xscale, | ||
| float | hsize, | ||
| short | sel, | ||
| short | key_type, | ||
| short | mode, | ||
| float | alpha | ||
| ) |
Definition at line 498 of file keyframes_draw.c.
References _unit_diamond_shape, BEZT_KEYTYPE_BREAKDOWN, BEZT_KEYTYPE_EXTREME, BEZT_KEYTYPE_JITTER, BEZT_KEYTYPE_KEYFRAME, ELEM, KEYFRAME_SHAPE_BOTH, KEYFRAME_SHAPE_FRAME, KEYFRAME_SHAPE_INSIDE, TH_STRIP_SELECT, and UI_ThemeColorShadeAlpha().
Referenced by draw_keylist(), and nla_action_draw_keyframes().
| static void draw_keylist | ( | View2D * | v2d, |
| DLRBT_Tree * | keys, | ||
| DLRBT_Tree * | blocks, | ||
| float | ypos, | ||
| short | channelLocked | ||
| ) | [static] |
Definition at line 592 of file keyframes_draw.c.
References actkeyblock_is_valid(), ActKeyColumn::cfra, View2D::cur, draw_keyframe_shape(), ActKeyBlock::end, DLRBT_Tree::first, IN_RANGE_INCL, ActKeyColumn::key_type, KEYFRAME_SHAPE_BOTH, ActKeyColumn::next, ActKeyBlock::next, NULL, ActKeyColumn::sel, ActKeyBlock::sel, SELECT, ActKeyBlock::start, TH_STRIP, TH_STRIP_SELECT, UI_ThemeColor4(), UI_view2d_getscale(), rctf::xmax, and rctf::xmin.
Referenced by draw_action_channel(), draw_agroup_channel(), draw_fcurve_channel(), draw_gpl_channel(), draw_object_channel(), draw_scene_channel(), and draw_summary_channel().
| void draw_object_channel | ( | View2D * | v2d, |
| bDopeSheet * | ads, | ||
| Object * | ob, | ||
| float | ypos | ||
| ) |
Definition at line 679 of file keyframes_draw.c.
References BLI_dlrbTree_free(), BLI_dlrbTree_init(), BLI_dlrbTree_linkedlist_sync(), draw_keylist(), and ob_to_keylist().
Referenced by draw_channel_strips().
| void draw_scene_channel | ( | View2D * | v2d, |
| bDopeSheet * | ads, | ||
| Scene * | sce, | ||
| float | ypos | ||
| ) |
Definition at line 661 of file keyframes_draw.c.
References BLI_dlrbTree_free(), BLI_dlrbTree_init(), BLI_dlrbTree_linkedlist_sync(), draw_keylist(), and scene_to_keylist().
Referenced by draw_channel_strips().
| void draw_summary_channel | ( | View2D * | v2d, |
| bAnimContext * | ac, | ||
| float | ypos | ||
| ) |
Definition at line 643 of file keyframes_draw.c.
References BLI_dlrbTree_free(), BLI_dlrbTree_init(), BLI_dlrbTree_linkedlist_sync(), draw_keylist(), and summary_to_keylist().
Referenced by draw_channel_strips().
| void fcurve_to_keylist | ( | AnimData * | adt, |
| FCurve * | fcu, | ||
| DLRBT_Tree * | keys, | ||
| DLRBT_Tree * | blocks | ||
| ) |
Definition at line 935 of file keyframes_draw.c.
References add_bezt_to_keyblocks_list(), add_bezt_to_keycolumns_list(), ANIM_nla_mapping_apply_fcurve(), FCurve::bezt, BLI_dlrbTree_add(), BLI_dlrbTree_free(), BLI_dlrbTree_linkedlist_sync(), BLI_dlrbTree_new(), compare_abk_bezt(), MEM_freeN(), nalloc_abk_bezt(), NULL, nupdate_abk_bezt(), DLRBT_Tree::root, set_touched_actkeyblock(), set_touched_actkeycolumn(), and FCurve::totvert.
Referenced by action_to_keylist(), agroup_to_keylist(), draw_fcurve_channel(), mouse_action_keys(), pose_propagate_get_boneHoldEndFrame(), pose_slide_invoke_common(), and summary_to_keylist().
| void gpl_to_keylist | ( | bDopeSheet * | UNUSEDads, |
| bGPDlayer * | gpl, | ||
| DLRBT_Tree * | keys | ||
| ) |
Definition at line 1010 of file keyframes_draw.c.
References add_gpframe_to_keycolumns_list(), ListBase::first, bGPDlayer::frames, and bGPDframe::next.
Referenced by draw_gpl_channel(), and mouse_action_keys().
| static DLRBT_Node* nalloc_abk_bezt | ( | void * | data | ) | [static] |
Definition at line 251 of file keyframes_draw.c.
References ActBeztColumn::bezts, ActBeztColumn::cfra, MEM_callocN(), ActBeztColumn::numBezts, and BezTriple::vec.
Referenced by fcurve_to_keylist().
| static DLRBT_Node* nalloc_ak_bezt | ( | void * | data | ) | [static] |
Definition at line 114 of file keyframes_draw.c.
References BEZKEYTYPE, BEZSELECTED, ActKeyColumn::cfra, ActKeyColumn::key_type, MEM_callocN(), ActKeyColumn::modified, ActKeyColumn::sel, SELECT, and BezTriple::vec.
Referenced by add_bezt_to_keycolumns_list().
| static DLRBT_Node* nalloc_ak_gpframe | ( | void * | data | ) | [static] |
Definition at line 162 of file keyframes_draw.c.
References ActKeyColumn::cfra, bGPDframe::flag, bGPDframe::framenum, GP_FRAME_SELECT, MEM_callocN(), ActKeyColumn::modified, ActKeyColumn::sel, and SELECT.
Referenced by add_gpframe_to_keycolumns_list().
| static void nupdate_abk_bezt | ( | void * | node, |
| void * | data | ||
| ) | [static] |
Definition at line 264 of file keyframes_draw.c.
References ActBeztColumn::bezts, Global::f, G, G_DEBUG, MAX_ABK_BUFSIZE, and ActBeztColumn::numBezts.
Referenced by fcurve_to_keylist().
| static void nupdate_ak_bezt | ( | void * | node, |
| void * | data | ||
| ) | [static] |
Definition at line 131 of file keyframes_draw.c.
References BEZKEYTYPE, BEZSELECTED, BEZT_KEYTYPE_KEYFRAME, if(), ActKeyColumn::key_type, ActKeyColumn::modified, ActKeyColumn::sel, and SELECT.
Referenced by add_bezt_to_keycolumns_list().
| static void nupdate_ak_gpframe | ( | void * | node, |
| void * | data | ||
| ) | [static] |
Definition at line 178 of file keyframes_draw.c.
References bGPDframe::flag, GP_FRAME_SELECT, ActKeyColumn::modified, ActKeyColumn::sel, and SELECT.
Referenced by add_gpframe_to_keycolumns_list().
| void ob_to_keylist | ( | bDopeSheet * | ads, |
| Object * | ob, | ||
| DLRBT_Tree * | keys, | ||
| DLRBT_Tree * | blocks | ||
| ) |
Definition at line 825 of file keyframes_draw.c.
References AnimData::action, action_to_keylist(), ADS_FILTER_NOARM, ADS_FILTER_NOCAM, ADS_FILTER_NOCUR, ADS_FILTER_NOLAM, ADS_FILTER_NOLAT, ADS_FILTER_NOMAT, ADS_FILTER_NOMBA, ADS_FILTER_NOMESH, ADS_FILTER_NOPART, ADS_FILTER_NOSHAPEKEYS, Camera::adt, Lamp::adt, Lattice::adt, Mesh::adt, Key::adt, MetaBall::adt, Material::adt, bArmature::adt, Object::adt, ParticleSettings::adt, Curve::adt, Object::data, ELEM, bDopeSheet::filterflag, ListBase::first, give_current_material(), if(), ParticleSystem::next, NULL, OB_ARMATURE, OB_CAMERA, OB_CURVE, OB_FONT, ob_get_key(), OB_LAMP, OB_LATTICE, OB_MBALL, OB_MESH, OB_SURF, ParticleSystem::part, Object::particlesystem, Object::totcol, and Object::type.
Referenced by draw_object_channel(), keyframe_jump_exec(), mouse_action_keys(), and time_draw_idblock_keyframes().
| void scene_to_keylist | ( | bDopeSheet * | ads, |
| Scene * | sce, | ||
| DLRBT_Tree * | keys, | ||
| DLRBT_Tree * | blocks | ||
| ) |
Definition at line 787 of file keyframes_draw.c.
References AnimData::action, action_to_keylist(), ADS_FILTER_NONTREE, ADS_FILTER_NOSCE, ADS_FILTER_NOWOR, World::adt, bNodeTree::adt, Scene::adt, bDopeSheet::filterflag, Scene::nodetree, and Scene::world.
Referenced by draw_scene_channel(), keyframe_jump_exec(), mouse_action_keys(), and time_draw_idblock_keyframes().
| static void set_touched_actkeyblock | ( | ActKeyBlock * | ab | ) | [static] |
Definition at line 443 of file keyframes_draw.c.
References ActKeyBlock::left, ActKeyBlock::modified, NULL, ActKeyBlock::right, and ActKeyBlock::totcurve.
Referenced by fcurve_to_keylist().
| static void set_touched_actkeycolumn | ( | ActKeyColumn * | ak | ) | [static] |
Definition at line 425 of file keyframes_draw.c.
References ActKeyColumn::left, ActKeyColumn::modified, NULL, ActKeyColumn::right, and ActKeyColumn::totcurve.
Referenced by fcurve_to_keylist().
| void summary_to_keylist | ( | bAnimContext * | ac, |
| DLRBT_Tree * | keys, | ||
| DLRBT_Tree * | blocks | ||
| ) |
Definition at line 768 of file keyframes_draw.c.
References bAnimListElem::adt, ANIM_animdata_filter(), ANIMFILTER_CURVESONLY, ANIMFILTER_VISIBLE, BLI_freelistN(), bAnimContext::data, bAnimListElem::data, bAnimContext::datatype, fcurve_to_keylist(), filter(), ListBase::first, bAnimListElem::next, and NULL.
Referenced by draw_summary_channel(), and mouse_action_keys().
const float _unit_diamond_shape[4][2] [static] |
{
{0.0f, 1.0f},
{1.0f, 0.0f},
{0.0f, -1.0f},
{-1.0f, 0.0f}
}
Definition at line 490 of file keyframes_draw.c.
Referenced by draw_keyframe_shape().