Blender
V3.3
|
#include <float.h>
#include "MEM_guardedalloc.h"
#include "BLI_dlrbTree.h"
#include "BLI_listbase.h"
#include "BLI_rect.h"
#include "DNA_anim_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_mask_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "GPU_immediate.h"
#include "GPU_state.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "ED_anim_api.h"
#include "ED_keyframes_draw.h"
#include "ED_keyframes_keylist.h"
Go to the source code of this file.
Classes | |
struct | DrawKeylistUIData |
struct | AnimKeylistDrawListElem |
struct | AnimKeylistDrawList |
Typedefs | |
typedef struct DrawKeylistUIData | DrawKeylistUIData |
typedef enum eAnimKeylistDrawListElemType | eAnimKeylistDrawListElemType |
typedef struct AnimKeylistDrawListElem | AnimKeylistDrawListElem |
typedef struct AnimKeylistDrawList | AnimKeylistDrawList |
typedef struct AnimKeylistDrawList AnimKeylistDrawList |
typedef struct AnimKeylistDrawListElem AnimKeylistDrawListElem |
typedef struct DrawKeylistUIData DrawKeylistUIData |
typedef enum eAnimKeylistDrawListElemType eAnimKeylistDrawListElemType |
Enumerator | |
---|---|
ANIM_KEYLIST_SUMMARY | |
ANIM_KEYLIST_SCENE | |
ANIM_KEYLIST_OBJECT | |
ANIM_KEYLIST_FCURVE | |
ANIM_KEYLIST_ACTION | |
ANIM_KEYLIST_AGROUP | |
ANIM_KEYLIST_GP_LAYER | |
ANIM_KEYLIST_MASK_LAYER |
Definition at line 383 of file keyframes_draw.c.
void draw_action_channel | ( | AnimKeylistDrawList * | draw_list, |
AnimData * | adt, | ||
bAction * | act, | ||
float | ypos, | ||
float | yscale_fac, | ||
int | saction_flag | ||
) |
Definition at line 690 of file keyframes_draw.c.
References AnimKeylistDrawListElem::act, AnimKeylistDrawListElem::adt, ANIM_KEYLIST_ACTION, AnimKeylistDrawListElem::channel_locked, ed_keylist_draw_list_add_elem(), ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, and SACTION_SHOW_EXTREMES.
Referenced by draw_channel_strips().
void draw_agroup_channel | ( | AnimKeylistDrawList * | draw_list, |
AnimData * | adt, | ||
bActionGroup * | agrp, | ||
float | ypos, | ||
float | yscale_fac, | ||
int | saction_flag | ||
) |
Definition at line 672 of file keyframes_draw.c.
References AnimData::action, AnimKeylistDrawListElem::adt, AnimKeylistDrawListElem::agrp, AGRP_PROTECTED, ANIM_KEYLIST_AGROUP, AnimKeylistDrawListElem::channel_locked, ed_keylist_draw_list_add_elem(), bActionGroup::flag, ID_IS_LINKED, and ID_IS_OVERRIDE_LIBRARY.
Referenced by draw_channel_strips().
void draw_fcurve_channel | ( | AnimKeylistDrawList * | draw_list, |
AnimData * | adt, | ||
FCurve * | fcu, | ||
float | ypos, | ||
float | yscale_fac, | ||
int | saction_flag | ||
) |
Definition at line 653 of file keyframes_draw.c.
References AnimData::action, AnimKeylistDrawListElem::adt, AGRP_PROTECTED, ANIM_KEYLIST_FCURVE, AnimKeylistDrawListElem::channel_locked, ed_keylist_draw_list_add_elem(), AnimKeylistDrawListElem::fcu, FCURVE_PROTECTED, bActionGroup::flag, FCurve::flag, FCurve::grp, ID_IS_LINKED, and ID_IS_OVERRIDE_LIBRARY.
Referenced by draw_channel_strips().
void draw_gpl_channel | ( | AnimKeylistDrawList * | draw_list, |
bDopeSheet * | ads, | ||
bGPDlayer * | gpl, | ||
float | ypos, | ||
float | yscale_fac, | ||
int | saction_flag | ||
) |
Definition at line 707 of file keyframes_draw.c.
References AnimKeylistDrawListElem::ads, ANIM_KEYLIST_GP_LAYER, AnimKeylistDrawListElem::channel_locked, ed_keylist_draw_list_add_elem(), bGPDlayer::flag, GP_LAYER_LOCKED, and AnimKeylistDrawListElem::gpl.
Referenced by draw_channel_strips().
void draw_keyframe_shape | ( | float | x, |
float | y, | ||
float | size, | ||
bool | sel, | ||
short | key_type, | ||
short | mode, | ||
float | alpha, | ||
const KeyframeShaderBindings * | sh_bindings, | ||
short | handle_type, | ||
short | extreme_type | ||
) |
Definition at line 37 of file keyframes_draw.c.
References BEZT_KEYTYPE_BREAKDOWN, BEZT_KEYTYPE_EXTREME, BEZT_KEYTYPE_JITTER, BEZT_KEYTYPE_KEYFRAME, BEZT_KEYTYPE_MOVEHOLD, BLI_assert, KeyframeShaderBindings::color_id, ELEM, KeyframeShaderBindings::flags_id, GPU_KEYFRAME_SHAPE_ARROW_END_MAX, GPU_KEYFRAME_SHAPE_ARROW_END_MIN, GPU_KEYFRAME_SHAPE_ARROW_END_MIXED, GPU_KEYFRAME_SHAPE_CIRCLE, GPU_KEYFRAME_SHAPE_CLIPPED_VERTICAL, GPU_KEYFRAME_SHAPE_DIAMOND, GPU_KEYFRAME_SHAPE_INNER_DOT, GPU_KEYFRAME_SHAPE_SQUARE, immAttr1f(), immAttr1u(), immAttr4ubv(), immVertex2f(), KEYFRAME_EXTREME_MAX, KEYFRAME_EXTREME_MIN, KEYFRAME_HANDLE_ALIGNED, KEYFRAME_HANDLE_AUTO, KEYFRAME_HANDLE_AUTO_CLAMP, KEYFRAME_HANDLE_FREE, KEYFRAME_HANDLE_VECTOR, KEYFRAME_SHAPE_BOTH, KEYFRAME_SHAPE_FRAME, KEYFRAME_SHAPE_INSIDE, KeyframeShaderBindings::outline_color_id, KeyframeShaderBindings::pos_id, size(), KeyframeShaderBindings::size_id, TH_KEYBORDER, TH_KEYBORDER_SELECT, TH_KEYTYPE_BREAKDOWN, TH_KEYTYPE_BREAKDOWN_SELECT, TH_KEYTYPE_EXTREME, TH_KEYTYPE_EXTREME_SELECT, TH_KEYTYPE_JITTER, TH_KEYTYPE_JITTER_SELECT, TH_KEYTYPE_KEYFRAME, TH_KEYTYPE_KEYFRAME_SELECT, TH_KEYTYPE_MOVEHOLD, TH_KEYTYPE_MOVEHOLD_SELECT, UI_GetThemeColor4ubv(), x, and y.
Referenced by draw_keylist_keys(), nla_action_draw_keyframes(), and vicon_keytype_draw_wrapper().
|
static |
Definition at line 302 of file keyframes_draw.c.
References ACTKEYBLOCK_FLAG_GPENCIL, ACTKEYBLOCK_FLAG_NON_BEZIER, ACTKEYBLOCK_FLAG_STATIC_HOLD, actkeyblock_get_valid_hold(), actkeyblock_is_valid(), ActKeyColumn::block, draw_keylist_block_gpencil(), draw_keylist_block_interpolation_line(), draw_keylist_block_moving_hold(), draw_keylist_block_standard(), ActKeyBlockInfo::flag, ActKeyColumn::next, NULL, DrawKeylistUIData::show_ipo, UI_CNR_NONE, and UI_draw_roundbox_corner_set().
Referenced by draw_keylist_blocks().
|
static |
Definition at line 223 of file keyframes_draw.c.
References BEZT_KEYTYPE_BREAKDOWN, BEZT_KEYTYPE_JITTER, BEZT_KEYTYPE_KEYFRAME, BEZT_KEYTYPE_MOVEHOLD, ActKeyColumn::block, ActKeyColumn::cfra, float(), DrawKeylistUIData::gpencil_size, ActKeyColumn::key_type, min_ff(), ActKeyColumn::next, DrawKeylistUIData::screenspace_margin, ActKeyBlockInfo::sel, DrawKeylistUIData::sel_mhcol, size(), UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_RIGHT, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), UI_UNIT_X, and DrawKeylistUIData::unsel_mhcol.
Referenced by draw_keylist_block().
|
static |
Definition at line 286 of file keyframes_draw.c.
References ACTKEYBLOCK_FLAG_NON_BEZIER, ActKeyColumn::block, ActKeyColumn::cfra, ActKeyBlockInfo::conflict, DrawKeylistUIData::ipo_color, DrawKeylistUIData::ipo_color_mix, DrawKeylistUIData::ipo_size, ActKeyColumn::next, and UI_draw_roundbox_4fv().
Referenced by draw_keylist_block().
|
static |
Definition at line 253 of file keyframes_draw.c.
References ActKeyColumn::block, ActKeyColumn::cfra, ActKeyColumn::next, ActKeyBlockInfo::sel, DrawKeylistUIData::sel_mhcol, DrawKeylistUIData::smaller_size, UI_draw_roundbox_4fv(), and DrawKeylistUIData::unsel_mhcol.
Referenced by draw_keylist_block().
|
static |
Definition at line 270 of file keyframes_draw.c.
References ActKeyColumn::block, ActKeyColumn::cfra, DrawKeylistUIData::half_icon_size, ActKeyColumn::next, ActKeyBlockInfo::sel, DrawKeylistUIData::sel_color, UI_draw_roundbox_4fv(), and DrawKeylistUIData::unsel_color.
Referenced by draw_keylist_block().
|
static |
Definition at line 332 of file keyframes_draw.c.
References draw_keylist_block().
Referenced by ED_keylist_draw_list_elem_draw_blocks().
|
static |
Definition at line 343 of file keyframes_draw.c.
References ActKeyColumn::cfra, View2D::cur, IN_RANGE_INCL, rctf::xmax, and rctf::xmin.
Referenced by draw_keylist_keys(), and ED_keylist_draw_keylist_visible_key_len().
|
static |
Definition at line 348 of file keyframes_draw.c.
References DrawKeylistUIData::alpha, ActKeyColumn::cfra, draw_keyframe_shape(), draw_keylist_is_visible_key(), ActKeyColumn::extreme_type, ActKeyColumn::handle_type, DrawKeylistUIData::icon_size, ActKeyColumn::key_type, KEYFRAME_EXTREME_NONE, KEYFRAME_HANDLE_NONE, KEYFRAME_SHAPE_BOTH, SACTION_SHOW_EXTREMES, ActKeyColumn::sel, SELECT, and DrawKeylistUIData::show_ipo.
Referenced by ED_keylist_draw_list_elem_draw_keys().
|
static |
Definition at line 188 of file keyframes_draw.c.
References DrawKeylistUIData::alpha, copy_v4_v4(), float(), DrawKeylistUIData::gpencil_size, DrawKeylistUIData::half_icon_size, DrawKeylistUIData::icon_size, DrawKeylistUIData::ipo_color, DrawKeylistUIData::ipo_color_mix, DrawKeylistUIData::ipo_size, SACTION_SHOW_INTERPOLATION, DrawKeylistUIData::screenspace_margin, DrawKeylistUIData::sel_color, DrawKeylistUIData::sel_mhcol, DrawKeylistUIData::show_ipo, DrawKeylistUIData::smaller_size, TH_DOPESHEET_IPOLINE, TH_STRIP, TH_STRIP_SELECT, UI_GetThemeColor4fv(), UI_UNIT_X, UI_view2d_scale_get_x(), DrawKeylistUIData::unsel_color, and DrawKeylistUIData::unsel_mhcol.
Referenced by ED_keylist_draw_list_elem_draw_blocks(), and ED_keylist_draw_list_elem_draw_keys().
void draw_masklay_channel | ( | AnimKeylistDrawList * | draw_list, |
bDopeSheet * | ads, | ||
MaskLayer * | masklay, | ||
float | ypos, | ||
float | yscale_fac, | ||
int | saction_flag | ||
) |
Definition at line 722 of file keyframes_draw.c.
References AnimKeylistDrawListElem::ads, ANIM_KEYLIST_MASK_LAYER, AnimKeylistDrawListElem::channel_locked, ed_keylist_draw_list_add_elem(), MaskLayer::flag, MASK_LAYERFLAG_LOCKED, and AnimKeylistDrawListElem::masklay.
Referenced by draw_channel_strips().
void draw_object_channel | ( | AnimKeylistDrawList * | draw_list, |
bDopeSheet * | ads, | ||
Object * | ob, | ||
float | ypos, | ||
float | yscale_fac, | ||
int | saction_flag | ||
) |
Definition at line 639 of file keyframes_draw.c.
References AnimKeylistDrawListElem::ads, ANIM_KEYLIST_OBJECT, ed_keylist_draw_list_add_elem(), AnimKeylistDrawListElem::ob, and SACTION_SHOW_EXTREMES.
Referenced by draw_channel_strips().
void draw_scene_channel | ( | AnimKeylistDrawList * | draw_list, |
bDopeSheet * | ads, | ||
Scene * | sce, | ||
float | ypos, | ||
float | yscale_fac, | ||
int | saction_flag | ||
) |
Definition at line 625 of file keyframes_draw.c.
References AnimKeylistDrawListElem::ads, ANIM_KEYLIST_SCENE, ed_keylist_draw_list_add_elem(), SACTION_SHOW_EXTREMES, and AnimKeylistDrawListElem::sce.
Referenced by draw_channel_strips().
void draw_summary_channel | ( | struct AnimKeylistDrawList * | draw_list, |
bAnimContext * | ac, | ||
float | ypos, | ||
float | yscale_fac, | ||
int | saction_flag | ||
) |
Definition at line 613 of file keyframes_draw.c.
References AnimKeylistDrawListElem::ac, ANIM_KEYLIST_SUMMARY, ed_keylist_draw_list_add_elem(), and SACTION_SHOW_EXTREMES.
Referenced by draw_channel_strips().
|
static |
Definition at line 506 of file keyframes_draw.c.
References draw_keylist_is_visible_key(), len, and LISTBASE_FOREACH.
Referenced by ED_keylist_draw_list_visible_key_len().
|
static |
Definition at line 594 of file keyframes_draw.c.
References BLI_addtail(), AnimKeylistDrawList::channels, ED_keylist_create(), AnimKeylistDrawListElem::keylist, MEM_callocN, AnimKeylistDrawListElem::saction_flag, AnimKeylistDrawListElem::type, AnimKeylistDrawListElem::ypos, and AnimKeylistDrawListElem::yscale_fac.
Referenced by draw_action_channel(), draw_agroup_channel(), draw_fcurve_channel(), draw_gpl_channel(), draw_masklay_channel(), draw_object_channel(), draw_scene_channel(), and draw_summary_channel().
|
static |
Definition at line 491 of file keyframes_draw.c.
References AnimKeylistDrawList::channels, ED_keylist_draw_list_elem_build_keylist(), ED_keylist_draw_list_elem_prepare_for_drawing(), and LISTBASE_FOREACH.
Referenced by ED_keylist_draw_list_flush().
AnimKeylistDrawList* ED_keylist_draw_list_create | ( | void | ) |
Definition at line 486 of file keyframes_draw.c.
References MEM_callocN.
Referenced by draw_channel_strips().
|
static |
Definition at line 573 of file keyframes_draw.c.
References ED_keylist_draw_list_draw_blocks(), and ED_keylist_draw_list_draw_keys().
Referenced by ED_keylist_draw_list_flush().
|
static |
Definition at line 499 of file keyframes_draw.c.
References AnimKeylistDrawList::channels, ED_keylist_draw_list_elem_draw_blocks(), and LISTBASE_FOREACH.
Referenced by ED_keylist_draw_list_draw().
|
static |
Definition at line 536 of file keyframes_draw.c.
References BLI_rcti_size_x(), BLI_rcti_size_y(), AnimKeylistDrawList::channels, KeyframeShaderBindings::color_id, ED_keylist_draw_list_elem_draw_keys(), ED_keylist_draw_list_visible_key_len(), KeyframeShaderBindings::flags_id, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_COMP_U32, GPU_COMP_U8, GPU_FETCH_FLOAT, GPU_FETCH_INT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_PRIM_POINTS, GPU_program_point_size(), GPU_SHADER_KEYFRAME_SHAPE, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform2f(), immVertexFormat(), LISTBASE_FOREACH, View2D::mask, KeyframeShaderBindings::outline_color_id, KeyframeShaderBindings::pos_id, and KeyframeShaderBindings::size_id.
Referenced by ED_keylist_draw_list_draw().
|
static |
Definition at line 417 of file keyframes_draw.c.
References AnimKeylistDrawListElem::ac, AnimKeylistDrawListElem::act, action_to_keylist(), AnimKeylistDrawListElem::ads, AnimKeylistDrawListElem::adt, agroup_to_keylist(), AnimKeylistDrawListElem::agrp, ANIM_KEYLIST_ACTION, ANIM_KEYLIST_AGROUP, ANIM_KEYLIST_FCURVE, ANIM_KEYLIST_GP_LAYER, ANIM_KEYLIST_MASK_LAYER, ANIM_KEYLIST_OBJECT, ANIM_KEYLIST_SCENE, ANIM_KEYLIST_SUMMARY, AnimKeylistDrawListElem::fcu, fcurve_to_keylist(), AnimKeylistDrawListElem::gpl, gpl_to_keylist(), AnimKeylistDrawListElem::keylist, mask_to_keylist(), AnimKeylistDrawListElem::masklay, AnimKeylistDrawListElem::ob, ob_to_keylist(), AnimKeylistDrawListElem::saction_flag, AnimKeylistDrawListElem::sce, scene_to_keylist(), summary_to_keylist(), and AnimKeylistDrawListElem::type.
Referenced by ED_keylist_draw_list_build_keylists().
|
static |
Definition at line 455 of file keyframes_draw.c.
References AnimKeylistDrawListElem::channel_locked, draw_keylist_blocks(), draw_keylist_ui_data_init(), ED_keylist_array(), ED_keylist_array_len(), AnimKeylistDrawListElem::keylist, AnimKeylistDrawListElem::saction_flag, AnimKeylistDrawListElem::ypos, and AnimKeylistDrawListElem::yscale_fac.
Referenced by ED_keylist_draw_list_draw_blocks().
|
static |
Definition at line 465 of file keyframes_draw.c.
References AnimKeylistDrawListElem::channel_locked, draw_keylist_keys(), draw_keylist_ui_data_init(), ED_keylist_array(), ED_keylist_array_len(), AnimKeylistDrawListElem::keylist, AnimKeylistDrawListElem::saction_flag, AnimKeylistDrawListElem::ypos, and AnimKeylistDrawListElem::yscale_fac.
Referenced by ED_keylist_draw_list_draw_keys().
|
static |
Definition at line 477 of file keyframes_draw.c.
References ED_keylist_prepare_for_direct_access(), and AnimKeylistDrawListElem::keylist.
Referenced by ED_keylist_draw_list_build_keylists().
void ED_keylist_draw_list_flush | ( | AnimKeylistDrawList * | draw_list, |
View2D * | v2d | ||
) |
Definition at line 579 of file keyframes_draw.c.
References ED_keylist_draw_list_build_keylists(), and ED_keylist_draw_list_draw().
Referenced by draw_channel_strips().
void ED_keylist_draw_list_free | ( | AnimKeylistDrawList * | draw_list | ) |
Definition at line 585 of file keyframes_draw.c.
References BLI_freelistN(), AnimKeylistDrawList::channels, ED_keylist_free(), LISTBASE_FOREACH, and MEM_freeN.
Referenced by draw_channel_strips().
|
static |
Definition at line 525 of file keyframes_draw.c.
References AnimKeylistDrawList::channels, ED_keylist_draw_keylist_visible_key_len(), ED_keylist_listbase(), len, and LISTBASE_FOREACH.
Referenced by ED_keylist_draw_list_draw_keys().