|
Blender V4.3
|
#include <cfloat>#include "MEM_guardedalloc.h"#include "BKE_grease_pencil.hh"#include "BLI_listbase.h"#include "BLI_rect.h"#include "DNA_anim_types.h"#include "DNA_gpencil_legacy_types.h"#include "DNA_grease_pencil_types.h"#include "DNA_mask_types.h"#include "GPU_immediate.hh"#include "GPU_shader_shared.hh"#include "GPU_state.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "UI_view2d.hh"#include "ED_anim_api.hh"#include "ED_keyframes_draw.hh"#include "ED_keyframes_keylist.hh"#include "ANIM_action.hh"Go to the source code of this file.
Classes | |
| struct | DrawKeylistUIData |
| struct | ChannelListElement |
| struct | ChannelDrawList |
Enumerations | |
| enum class | ChannelType { SUMMARY , SCENE , OBJECT , FCURVE , ACTION_LAYERED , ACTION_SLOT , ACTION_LEGACY , ACTION_GROUP , GREASE_PENCIL_CELS , GREASE_PENCIL_GROUP , GREASE_PENCIL_DATA , GREASE_PENCIL_LAYER , MASK_LAYER } |
|
strong |
| Enumerator | |
|---|---|
| SUMMARY | |
| SCENE | |
| OBJECT | |
| FCURVE | |
| ACTION_LAYERED | |
| ACTION_SLOT | |
| ACTION_LEGACY | |
| ACTION_GROUP | |
| GREASE_PENCIL_CELS | |
| GREASE_PENCIL_GROUP | |
| GREASE_PENCIL_DATA | |
| GREASE_PENCIL_LAYER | |
| MASK_LAYER | |
Definition at line 387 of file keyframes_draw.cc.
|
static |
Definition at line 430 of file keyframes_draw.cc.
References ChannelListElement::ac, ChannelListElement::act, AnimData::action, ACTION_GROUP, action_group_to_keylist(), ACTION_LAYERED, ACTION_LEGACY, ACTION_SLOT, ChannelListElement::action_slot, action_slot_to_keylist(), action_to_keylist(), ChannelListElement::ads, ChannelListElement::adt, ChannelListElement::agrp, ANIMCONT_GPENCIL, BLI_assert, bAnimContext::datatype, ChannelListElement::fcu, FCURVE, fcurve_to_keylist(), ChannelListElement::gpl, gpl_to_keylist(), ChannelListElement::grease_pencil, GREASE_PENCIL_CELS, grease_pencil_cels_to_keylist(), GREASE_PENCIL_DATA, grease_pencil_data_block_to_keylist(), GREASE_PENCIL_GROUP, GREASE_PENCIL_LAYER, ChannelListElement::grease_pencil_layer, ChannelListElement::grease_pencil_layer_group, grease_pencil_layer_group_to_keylist(), ActionSlot::handle, ChannelListElement::keylist, MASK_LAYER, mask_to_keylist(), ChannelListElement::masklay, ChannelListElement::ob, ob_to_keylist(), OBJECT, ChannelListElement::saction_flag, ChannelListElement::sce, SCENE, scene_to_keylist(), SUMMARY, summary_to_keylist(), and ChannelListElement::type.
Referenced by channel_list_build_keylists().
|
static |
Definition at line 639 of file keyframes_draw.cc.
References BLI_addtail(), ChannelDrawList::channels, ED_keylist_create(), ChannelListElement::keylist, MEM_callocN, ChannelListElement::saction_flag, ChannelListElement::type, ChannelListElement::ypos, and ChannelListElement::yscale_fac.
Referenced by ED_add_action_channel(), ED_add_action_group_channel(), ED_add_action_layered_channel(), ED_add_action_slot_channel(), ED_add_fcurve_channel(), ED_add_grease_pencil_cels_channel(), ED_add_grease_pencil_datablock_channel(), ED_add_grease_pencil_layer_group_channel(), ED_add_grease_pencil_layer_legacy_channel(), ED_add_mask_layer_channel(), ED_add_object_channel(), ED_add_scene_channel(), and ED_add_summary_channel().
|
static |
Definition at line 538 of file keyframes_draw.cc.
References build_channel_keylist(), ChannelDrawList::channels, LISTBASE_FOREACH, and prepare_channel_for_drawing().
Referenced by ED_channel_list_flush().
|
static |
Definition at line 618 of file keyframes_draw.cc.
References channel_list_draw_blocks(), and channel_list_draw_keys().
Referenced by ED_channel_list_flush().
|
static |
Definition at line 546 of file keyframes_draw.cc.
References ChannelDrawList::channels, draw_channel_blocks(), and LISTBASE_FOREACH.
Referenced by channel_list_draw().
|
static |
Definition at line 581 of file keyframes_draw.cc.
References BLI_rcti_size_x(), BLI_rcti_size_y(), channel_list_visible_key_len(), ChannelDrawList::channels, KeyframeShaderBindings::color_id, draw_channel_keys(), 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 channel_list_draw().
|
static |
Definition at line 571 of file keyframes_draw.cc.
References channel_visible_key_len(), ChannelDrawList::channels, ED_keylist_listbase(), len, and LISTBASE_FOREACH.
Referenced by channel_list_draw_keys().
|
static |
Definition at line 198 of file keyframes_draw.cc.
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 draw_channel_blocks(), and draw_channel_keys().
Definition at line 553 of file keyframes_draw.cc.
References draw_keylist_is_visible_key(), len, and LISTBASE_FOREACH.
Referenced by channel_list_visible_key_len().
|
static |
Definition at line 501 of file keyframes_draw.cc.
References ChannelListElement::channel_locked, channel_ui_data_init(), draw_keylist_blocks(), ED_keylist_array(), ED_keylist_array_len(), ChannelListElement::keylist, ChannelListElement::saction_flag, ChannelListElement::ypos, and ChannelListElement::yscale_fac.
Referenced by channel_list_draw_blocks().
|
static |
Definition at line 511 of file keyframes_draw.cc.
References ChannelListElement::channel_locked, channel_ui_data_init(), draw_keylist_keys(), ED_keylist_array(), ED_keylist_array_len(), ChannelListElement::keylist, ChannelListElement::saction_flag, ChannelListElement::ypos, and ChannelListElement::yscale_fac.
Referenced by channel_list_draw_keys().
| void draw_keyframe_shape | ( | const float | x, |
| const float | y, | ||
| float | size, | ||
| const bool | sel, | ||
| const eBezTriple_KeyframeType | key_type, | ||
| const eKeyframeShapeDrawOpts | mode, | ||
| const float | alpha, | ||
| const KeyframeShaderBindings * | sh_bindings, | ||
| const short | handle_type, | ||
| const short | extreme_type ) |
Definition at line 43 of file keyframes_draw.cc.
References BEZT_KEYTYPE_BREAKDOWN, BEZT_KEYTYPE_EXTREME, BEZT_KEYTYPE_GENERATED, 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, KeyframeShaderBindings::size_id, TH_KEYBORDER, TH_KEYBORDER_SELECT, TH_KEYTYPE_BREAKDOWN, TH_KEYTYPE_BREAKDOWN_SELECT, TH_KEYTYPE_EXTREME, TH_KEYTYPE_EXTREME_SELECT, TH_KEYTYPE_GENERATED, TH_KEYTYPE_GENERATED_SELECT, TH_KEYTYPE_JITTER, TH_KEYTYPE_JITTER_SELECT, TH_KEYTYPE_KEYFRAME, TH_KEYTYPE_KEYFRAME_SELECT, TH_KEYTYPE_MOVEHOLD, TH_KEYTYPE_MOVEHOLD_SELECT, UI_GetThemeColor3ubv(), and UI_GetThemeColor4ubv().
Referenced by draw_keylist_keys(), nla_action_draw_keyframes(), retime_key_draw(), and vicon_keytype_draw_wrapper().
|
static |
Definition at line 306 of file keyframes_draw.cc.
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, DrawKeylistUIData::show_ipo, UI_CNR_NONE, and UI_draw_roundbox_corner_set().
Referenced by draw_keylist_blocks().
|
static |
Definition at line 233 of file keyframes_draw.cc.
References BEZT_KEYTYPE_BREAKDOWN, BEZT_KEYTYPE_EXTREME, BEZT_KEYTYPE_GENERATED, BEZT_KEYTYPE_JITTER, BEZT_KEYTYPE_KEYFRAME, BEZT_KEYTYPE_MOVEHOLD, ActKeyColumn::block, ActKeyColumn::cfra, DrawKeylistUIData::gpencil_size, ActKeyColumn::key_type, min_ff(), ActKeyColumn::next, DrawKeylistUIData::screenspace_margin, ActKeyBlockInfo::sel, DrawKeylistUIData::sel_mhcol, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_RIGHT, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), UI_UNIT_X, DrawKeylistUIData::unsel_mhcol, and rctf::xmin.
Referenced by draw_keylist_block().
|
static |
Definition at line 289 of file keyframes_draw.cc.
References ACTKEYBLOCK_FLAG_NON_BEZIER, ActKeyColumn::block, ActKeyColumn::cfra, ActKeyBlockInfo::conflict, DrawKeylistUIData::ipo_color, DrawKeylistUIData::ipo_color_mix, DrawKeylistUIData::ipo_size, ActKeyColumn::next, UI_draw_roundbox_4fv(), and rctf::xmin.
Referenced by draw_keylist_block().
|
static |
Definition at line 263 of file keyframes_draw.cc.
References ActKeyColumn::block, ActKeyColumn::cfra, ActKeyColumn::next, ActKeyBlockInfo::sel, DrawKeylistUIData::sel_mhcol, DrawKeylistUIData::smaller_size, UI_draw_roundbox_4fv(), DrawKeylistUIData::unsel_mhcol, and rctf::xmin.
Referenced by draw_keylist_block().
|
static |
Definition at line 276 of file keyframes_draw.cc.
References ActKeyColumn::block, ActKeyColumn::cfra, DrawKeylistUIData::half_icon_size, ActKeyColumn::next, ActKeyBlockInfo::sel, DrawKeylistUIData::sel_color, UI_draw_roundbox_4fv(), DrawKeylistUIData::unsel_color, and rctf::xmin.
Referenced by draw_keylist_block().
|
static |
Definition at line 336 of file keyframes_draw.cc.
References draw_keylist_block().
Referenced by draw_channel_blocks().
|
static |
Definition at line 347 of file keyframes_draw.cc.
References ActKeyColumn::cfra, View2D::cur, IN_RANGE_INCL, rctf::xmax, and rctf::xmin.
Referenced by channel_visible_key_len(), and draw_keylist_keys().
|
static |
Definition at line 352 of file keyframes_draw.cc.
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 draw_channel_keys().
| void ED_add_action_channel | ( | ChannelDrawList * | channel_list, |
| AnimData * | adt, | ||
| bAction * | act, | ||
| float | ypos, | ||
| float | yscale_fac, | ||
| int | saction_flag ) |
Definition at line 774 of file keyframes_draw.cc.
References ChannelListElement::act, ACTION_LEGACY, ChannelListElement::adt, BLI_assert, channel_list_add_element(), ChannelListElement::channel_locked, ID_IS_EDITABLE, and ID_IS_OVERRIDE_LIBRARY.
Referenced by draw_keyframes().
| void ED_add_action_group_channel | ( | ChannelDrawList * | channel_list, |
| AnimData * | adt, | ||
| bActionGroup * | agrp, | ||
| float | ypos, | ||
| float | yscale_fac, | ||
| int | saction_flag ) |
Definition at line 717 of file keyframes_draw.cc.
References AnimData::action, ACTION_GROUP, ChannelListElement::adt, ChannelListElement::agrp, AGRP_PROTECTED, channel_list_add_element(), ChannelListElement::channel_locked, bActionGroup::flag, ID_IS_EDITABLE, and ID_IS_OVERRIDE_LIBRARY.
Referenced by draw_keyframes().
| void ED_add_action_layered_channel | ( | ChannelDrawList * | channel_list, |
| AnimData * | adt, | ||
| bAction * | action, | ||
| const float | ypos, | ||
| const float | yscale_fac, | ||
| int | saction_flag ) |
Definition at line 735 of file keyframes_draw.cc.
References ChannelListElement::act, ACTION_LAYERED, ChannelListElement::adt, BLI_assert, channel_list_add_element(), ChannelListElement::channel_locked, ID_IS_EDITABLE, and ID_IS_OVERRIDE_LIBRARY.
Referenced by draw_keyframes().
| void ED_add_action_slot_channel | ( | ChannelDrawList * | channel_list, |
| AnimData * | adt, | ||
| animrig::Action & | action, | ||
| animrig::Slot & | slot, | ||
| const float | ypos, | ||
| const float | yscale_fac, | ||
| int | saction_flag ) |
Definition at line 755 of file keyframes_draw.cc.
References ChannelListElement::act, ACTION_SLOT, ChannelListElement::action_slot, ChannelListElement::adt, channel_list_add_element(), ChannelListElement::channel_locked, ID_IS_LINKED, and ID_IS_OVERRIDE_LIBRARY.
Referenced by draw_keyframes().
| void ED_add_fcurve_channel | ( | ChannelDrawList * | channel_list, |
| AnimData * | adt, | ||
| FCurve * | fcu, | ||
| float | ypos, | ||
| float | yscale_fac, | ||
| int | saction_flag ) |
Definition at line 698 of file keyframes_draw.cc.
References AnimData::action, ChannelListElement::adt, AGRP_PROTECTED, channel_list_add_element(), ChannelListElement::channel_locked, ChannelListElement::fcu, FCURVE, FCURVE_PROTECTED, bActionGroup::flag, FCurve::flag, FCurve::grp, ID_IS_EDITABLE, and ID_IS_OVERRIDE_LIBRARY.
Referenced by draw_keyframes().
| void ED_add_grease_pencil_cels_channel | ( | ChannelDrawList * | channel_list, |
| bDopeSheet * | ads, | ||
| const GreasePencilLayer * | layer, | ||
| const float | ypos, | ||
| const float | yscale_fac, | ||
| int | saction_flag ) |
Definition at line 816 of file keyframes_draw.cc.
References ChannelListElement::ads, channel_list_add_element(), ChannelListElement::channel_locked, GREASE_PENCIL_CELS, and ChannelListElement::grease_pencil_layer.
Referenced by draw_keyframes().
| void ED_add_grease_pencil_datablock_channel | ( | ChannelDrawList * | channel_list, |
| bAnimContext * | ac, | ||
| AnimData * | adt, | ||
| const GreasePencil * | grease_pencil, | ||
| const float | ypos, | ||
| const float | yscale_fac, | ||
| int | saction_flag ) |
Definition at line 795 of file keyframes_draw.cc.
References ChannelListElement::ac, ChannelListElement::act, AnimData::action, ChannelListElement::adt, channel_list_add_element(), ChannelListElement::grease_pencil, and GREASE_PENCIL_DATA.
Referenced by draw_keyframes().
| void ED_add_grease_pencil_layer_group_channel | ( | ChannelDrawList * | channel_list, |
| bDopeSheet * | ads, | ||
| const GreasePencilLayerTreeGroup * | layer_group, | ||
| const float | ypos, | ||
| const float | yscale_fac, | ||
| int | saction_flag ) |
Definition at line 833 of file keyframes_draw.cc.
References ChannelListElement::ads, channel_list_add_element(), ChannelListElement::channel_locked, GREASE_PENCIL_GROUP, and ChannelListElement::grease_pencil_layer_group.
Referenced by draw_keyframes().
| void ED_add_grease_pencil_layer_legacy_channel | ( | ChannelDrawList * | channel_list, |
| bDopeSheet * | ads, | ||
| bGPDlayer * | gpl, | ||
| float | ypos, | ||
| float | yscale_fac, | ||
| int | saction_flag ) |
Definition at line 850 of file keyframes_draw.cc.
References ChannelListElement::ads, channel_list_add_element(), ChannelListElement::channel_locked, bGPDlayer::flag, GP_LAYER_LOCKED, ChannelListElement::gpl, and GREASE_PENCIL_LAYER.
Referenced by draw_keyframes().
| void ED_add_mask_layer_channel | ( | ChannelDrawList * | channel_list, |
| bDopeSheet * | ads, | ||
| MaskLayer * | masklay, | ||
| float | ypos, | ||
| float | yscale_fac, | ||
| int | saction_flag ) |
Definition at line 868 of file keyframes_draw.cc.
References ChannelListElement::ads, channel_list_add_element(), ChannelListElement::channel_locked, MaskLayer::flag, MASK_LAYER, MASK_LAYERFLAG_LOCKED, and ChannelListElement::masklay.
Referenced by draw_keyframes().
| void ED_add_object_channel | ( | ChannelDrawList * | channel_list, |
| bDopeSheet * | ads, | ||
| Object * | ob, | ||
| float | ypos, | ||
| float | yscale_fac, | ||
| int | saction_flag ) |
Definition at line 684 of file keyframes_draw.cc.
References ChannelListElement::ads, channel_list_add_element(), ChannelListElement::ob, and OBJECT.
Referenced by draw_keyframes().
| void ED_add_scene_channel | ( | ChannelDrawList * | channel_list, |
| bDopeSheet * | ads, | ||
| Scene * | sce, | ||
| float | ypos, | ||
| float | yscale_fac, | ||
| int | saction_flag ) |
Definition at line 670 of file keyframes_draw.cc.
References ChannelListElement::ads, channel_list_add_element(), ChannelListElement::sce, and SCENE.
Referenced by draw_keyframes().
| void ED_add_summary_channel | ( | ChannelDrawList * | channel_list, |
| bAnimContext * | ac, | ||
| float | ypos, | ||
| float | yscale_fac, | ||
| int | saction_flag ) |
Definition at line 658 of file keyframes_draw.cc.
References ChannelListElement::ac, channel_list_add_element(), and SUMMARY.
Referenced by draw_keyframes().
| ChannelDrawList * ED_channel_draw_list_create | ( | ) |
Definition at line 533 of file keyframes_draw.cc.
References MEM_callocN.
Referenced by draw_keyframes().
| void ED_channel_list_flush | ( | ChannelDrawList * | channel_list, |
| View2D * | v2d ) |
Definition at line 624 of file keyframes_draw.cc.
References channel_list_build_keylists(), channel_list_draw(), View2D::cur, rctf::xmax, and rctf::xmin.
Referenced by draw_keyframes().
| void ED_channel_list_free | ( | ChannelDrawList * | channel_list | ) |
Definition at line 630 of file keyframes_draw.cc.
References BLI_freelistN(), ChannelDrawList::channels, ED_keylist_free(), LISTBASE_FOREACH, and MEM_freeN().
Referenced by draw_keyframes().
|
static |
Definition at line 523 of file keyframes_draw.cc.
References ED_keylist_prepare_for_direct_access(), and ChannelListElement::keylist.
Referenced by channel_list_build_keylists().