|
Blender
V2.93
|
#include "BLI_sys_types.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 "DNA_screen_types.h"#include "DNA_space_types.h"#include "DNA_userdef_types.h"#include "BLI_dlrbTree.h"#include "BLI_math.h"#include "BLI_rect.h"#include "BLI_timecode.h"#include "BLI_utildefines.h"#include "BKE_context.h"#include "BKE_curve.h"#include "BKE_fcurve.h"#include "BKE_global.h"#include "BKE_mask.h"#include "BKE_nla.h"#include "ED_anim_api.h"#include "ED_keyframes_draw.h"#include "ED_keyframes_edit.h"#include "RNA_access.h"#include "UI_interface.h"#include "UI_resources.h"#include "UI_view2d.h"#include "GPU_immediate.h"#include "GPU_matrix.h"#include "GPU_state.h"Go to the source code of this file.
Functions | |
| void | ANIM_draw_cfra (const bContext *C, View2D *v2d, short flag) |
| void | ANIM_draw_previewrange (const bContext *C, View2D *v2d, int end_frame_width) |
| void | ANIM_draw_framerange (Scene *scene, View2D *v2d) |
| AnimData * | ANIM_nla_mapping_get (bAnimContext *ac, bAnimListElem *ale) |
| static short | bezt_nlamapping_restore (KeyframeEditData *ked, BezTriple *bezt) |
| static short | bezt_nlamapping_apply (KeyframeEditData *ked, BezTriple *bezt) |
| void | ANIM_nla_mapping_apply_fcurve (AnimData *adt, FCurve *fcu, bool restore, bool only_keys) |
| short | ANIM_get_normalization_flags (bAnimContext *ac) |
| static float | normalization_factor_get (Scene *scene, FCurve *fcu, short flag, float *r_offset) |
| float | ANIM_unit_mapping_get_factor (Scene *scene, ID *id, FCurve *fcu, short flag, float *r_offset) |
| static bool | find_prev_next_keyframes (struct bContext *C, int *r_nextfra, int *r_prevfra) |
| void | ANIM_center_frame (struct bContext *C, int smooth_viewtx) |
| void ANIM_center_frame | ( | struct bContext * | C, |
| int | smooth_viewtx | ||
| ) |
Definition at line 588 of file anim_draw.c.
References ATTR_FALLTHROUGH, BLI_rctf_size_x(), C, RenderData::cfra, CTX_data_scene(), CTX_wm_region(), View2D::cur, find_prev_next_keyframes(), FPS, Scene::r, scene, UI_view2d_smooth_view(), ARegion::v2d, w(), rctf::xmax, rctf::xmin, rctf::ymax, rctf::ymin, ZOOM_FRAME_MODE_KEEP_RANGE, ZOOM_FRAME_MODE_KEYFRAMES, and ZOOM_FRAME_MODE_SECONDS.
Referenced by actkeys_view_frame_exec(), graphkeys_view_frame_exec(), nlaedit_viewframe_exec(), and sequencer_view_frame_exec().
Definition at line 66 of file anim_draw.c.
References C, RenderData::cfra, CTX_data_scene(), View2D::cur, DRAWCFRA_WIDE, float(), RenderData::framelen, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_width(), GPU_PRIM_LINES, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformThemeColor(), immVertex2f(), immVertexFormat(), pos, Scene::r, scene, RenderData::subframe, TH_CFRAME, time, x, rctf::ymax, and rctf::ymin.
Referenced by dopesheet_region_draw(), and graph_region_draw().
Draw frame range guides (for scene frame range) in background.
TODO: Should we still show these when preview range is enabled?
Definition at line 134 of file anim_draw.c.
References View2D::cur, EFRA, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniformThemeColorShade(), immUniformThemeColorShadeAlpha(), immVertex2f(), immVertexFormat(), pos, SFRA, TH_BACK, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by action_main_region_draw(), graph_main_region_draw(), and nla_main_region_draw().
Definition at line 95 of file anim_draw.c.
References C, CTX_data_scene(), View2D::cur, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformThemeColorShadeAlpha(), immVertexFormat(), PEFRA, pos, PRVRANGEON, PSFRA, scene, TH_ANIM_PREVIEW_RANGE, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by action_main_region_draw(), draw_timeline_seq(), graph_main_region_draw(), and nla_main_region_draw().
| short ANIM_get_normalization_flags | ( | bAnimContext * | ac | ) |
Definition at line 285 of file anim_draw.c.
References ANIM_UNITCONV_NORMALIZE, ANIM_UNITCONV_NORMALIZE_FREEZE, SpaceGraph::flag, SIPO_NORMALIZE, SIPO_NORMALIZE_FREEZE, bAnimContext::sl, SPACE_GRAPH, and SpaceLink::spacetype.
Referenced by draw_fcurve(), draw_fcurve_curve(), draw_fcurve_curve_bezts(), draw_fcurve_curve_samples(), get_nearest_fcurve_verts_list(), graph_draw_driver_debug(), graphkeys_click_insert_exec(), initialize_box_select_key_editing_data(), insert_graph_keys(), mirror_graph_keys(), snap_graph_keys(), and sum_selected_keyframes().
Definition at line 257 of file anim_draw.c.
References ANIM_fcurve_keyframes_loop(), bezt_nlamapping_apply(), bezt_nlamapping_restore(), KeyframeEditData::data, KeyframeEditData::i1, and NULL.
Referenced by actkeys_framejump_exec(), actkeys_select_leftright(), box_select_graphkeys(), draw_fcurve(), fcurve_to_keylist(), get_nearest_fcurve_verts_list(), graphkeys_select_leftright(), markers_selectkeys_between(), mirror_action_keys(), mirror_graph_keys(), paste_animedit_keys(), posttrans_action_clean(), snap_action_keys(), snap_graph_keys(), special_aftertrans_update__actedit(), special_aftertrans_update__graph(), and sum_selected_keyframes().
| AnimData* ANIM_nla_mapping_get | ( | bAnimContext * | ac, |
| bAnimListElem * | ale | ||
| ) |
Obtain the AnimData block providing NLA-mapping for the given channel (if applicable).
TODO: do not supply return this if the animdata tells us that there is no mapping to perform.
Definition at line 178 of file anim_draw.c.
References bAnimListElem::adt, ANIMCONT_ACTION, ANIMCONT_CHANNEL, ANIMCONT_DOPESHEET, ANIMCONT_FCURVES, ANIMCONT_NLA, ANIMCONT_SHAPEKEY, ANIMTYPE_NLACURVE, bAnimContext::datatype, ELEM, G, NULL, and bAnimListElem::type.
Referenced by actkeys_find_key_in_list_element(), actkeys_framejump_exec(), actkeys_list_element_to_keylist(), actkeys_mselect_column(), actkeys_select_leftright(), box_select_action(), box_select_graphkeys(), columnselect_action_keys(), columnselect_graph_keys(), createTransActionData(), draw_channel_strips(), draw_fcurve(), get_keyframe_extents(), get_nearest_fcurve_verts_list(), graphkeys_click_insert_exec(), graphkeys_mselect_column(), graphkeys_select_leftright(), insert_action_keys(), insert_graph_keys(), markers_selectkeys_between(), mirror_action_keys(), mirror_graph_keys(), paste_animedit_keys(), posttrans_action_clean(), region_select_action_keys(), snap_action_keys(), snap_graph_keys(), special_aftertrans_update__actedit(), special_aftertrans_update__graph(), sum_selected_keyframes(), and summary_keyframes_loop().
| float ANIM_unit_mapping_get_factor | ( | Scene * | scene, |
| ID * | id, | ||
| FCurve * | fcu, | ||
| short | flag, | ||
| float * | r_offset | ||
| ) |
Definition at line 453 of file anim_draw.c.
References ANIM_UNITCONV_NORMALIZE, ANIM_UNITCONV_RESTORE, DEG2RADF, normalization_factor_get(), PROP_UNIT_ROTATION, ptr, RAD2DEGF, RNA_id_pointer_create(), FCurve::rna_path, RNA_path_resolve_property(), RNA_property_subtype(), RNA_SUBTYPE_UNIT, scene, UnitSettings::system_rotation, Scene::unit, and USER_UNIT_ROT_RADIANS.
Referenced by box_select_graphkeys(), draw_fcurve(), draw_fcurve_curve(), draw_fcurve_curve_bezts(), draw_fcurve_curve_samples(), get_nearest_fcurve_verts_list(), graph_draw_driver_debug(), graphkeys_click_insert_exec(), insert_graph_keys(), mirror_graph_keys(), snap_graph_keys(), and sum_selected_keyframes().
|
static |
Definition at line 236 of file anim_draw.c.
References BKE_nla_tweakedit_remap(), KeyframeEditData::data, KeyframeEditData::i1, NLATIME_CONVERT_MAP, and BezTriple::vec.
Referenced by ANIM_nla_mapping_apply_fcurve().
|
static |
Definition at line 217 of file anim_draw.c.
References BKE_nla_tweakedit_remap(), KeyframeEditData::data, KeyframeEditData::i1, NLATIME_CONVERT_UNMAP, and BezTriple::vec.
Referenced by ANIM_nla_mapping_apply_fcurve().
|
static |
Definition at line 490 of file anim_draw.c.
References ADS_FILTER_ONLYSEL, BKE_mask_layer_active(), BLI_dlrbTree_free(), BLI_dlrbTree_init(), BLI_dlrbTree_search_next(), BLI_dlrbTree_search_prev(), C, ActKeyColumn::cfra, CFRA, compare_ak_cfraPtr(), CTX_data_active_object(), CTX_data_edit_mask(), CTX_data_scene(), Object::data, bDopeSheet::filterflag, Scene::flag, float(), Scene::gpd, gpencil_to_keylist(), mask(), mask_to_keylist(), NULL, ob_to_keylist(), SCE_KEYS_NO_SELONLY, scene, and scene_to_keylist().
Referenced by ANIM_center_frame().
|
static |
Definition at line 299 of file anim_draw.c.
References ANIM_UNITCONV_NORMALIZE_FREEZE, ANIM_UNITCONV_RESTORE, FCurve::bezt, BEZT_IPO_BACK, BEZT_IPO_BEZ, BEZT_IPO_ELASTIC, BKE_curve_forward_diff_bezier(), BKE_fcurve_correct_bezpart(), BLI_assert, data, FCurve::driver, ELEM, evaluate_fcurve_only_curve(), G, G_TRANSFORM_FCURVES, IN_RANGE_INCL, BezTriple::ipo, len_v2v2(), max_ff(), min_ff(), min_ii(), RenderData::pefra, FCurve::prev_norm_factor, FCurve::prev_offset, PRVRANGEON, RenderData::psfra, Scene::r, scene, FCurve::totvert, v1, v2, and BezTriple::vec.
Referenced by ANIM_unit_mapping_get_factor().