Blender V2.61 - r43446
|
#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_speaker_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.
Definition in file keyframes_draw.c.
#define MAX_ABK_BUFSIZE 4 |
Definition at line 210 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 284 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 917 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(), and poselib_sanitise_exec().
short actkeyblock_is_valid | ( | ActKeyBlock * | ab, |
DLRBT_Tree * | keys | ||
) |
Definition at line 462 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 345 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 190 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 199 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 905 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 331 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 315 of file keyframes_draw.c.
References data, and ActKeyBlock::start.
Referenced by pose_propagate_get_boneHoldEndFrame().
static short compare_abk_bezt | ( | void * | node, |
void * | data | ||
) | [static] |
Definition at line 236 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 99 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 83 of file keyframes_draw.c.
References ActKeyColumn::cfra, and data.
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 147 of file keyframes_draw.c.
References ActKeyColumn::cfra, and bGPDframe::framenum.
Referenced by add_gpframe_to_keycolumns_list().
Definition at line 732 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 714 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 696 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 750 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 497 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 591 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, ActKeyBlock::next, ActKeyColumn::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 678 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 660 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 642 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 855 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(), ob_to_keylist(), pose_propagate_get_boneHoldEndFrame(), pose_slide_invoke_common(), scene_to_keylist(), and summary_to_keylist().
void gpl_to_keylist | ( | bDopeSheet * | UNUSEDads, |
bGPDlayer * | gpl, | ||
DLRBT_Tree * | keys | ||
) |
Definition at line 930 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 250 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 113 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 161 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 263 of file keyframes_draw.c.
References ActBeztColumn::bezts, 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 130 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 177 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 819 of file keyframes_draw.c.
References bAnimContext::ads, Object::adt, bAnimListElem::adt, ANIM_animdata_filter(), ANIMCONT_CHANNEL, ANIMFILTER_DATA_VISIBLE, ANIMTYPE_OBJECT, BLI_freelistN(), bAnimContext::data, bAnimListElem::data, bAnimContext::datatype, fcurve_to_keylist(), filter(), ListBase::first, Object::id, bAnimListElem::id, bAnimListElem::next, NULL, Base::object, and bAnimListElem::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 786 of file keyframes_draw.c.
References bAnimContext::ads, Scene::adt, bAnimListElem::adt, ANIM_animdata_filter(), ANIMCONT_CHANNEL, ANIMFILTER_DATA_VISIBLE, ANIMTYPE_SCENE, BLI_freelistN(), bAnimContext::data, bAnimListElem::data, bAnimContext::datatype, fcurve_to_keylist(), filter(), ListBase::first, Scene::id, bAnimListElem::id, bAnimListElem::next, NULL, and bAnimListElem::type.
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 442 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 424 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 767 of file keyframes_draw.c.
References bAnimListElem::adt, ANIM_animdata_filter(), ANIMFILTER_DATA_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 489 of file keyframes_draw.c.
Referenced by draw_keyframe_shape().