|
Blender V4.3
|
#include "BLI_sys_types.h"#include "DNA_anim_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_math_rotation.h"#include "BLI_rect.h"#include "BLI_utildefines.h"#include "BKE_context.hh"#include "BKE_curve.hh"#include "BKE_fcurve.hh"#include "BKE_global.hh"#include "BKE_mask.h"#include "BKE_nla.hh"#include "ED_anim_api.hh"#include "ED_keyframes_edit.hh"#include "ED_keyframes_keylist.hh"#include "RNA_access.hh"#include "RNA_path.hh"#include "UI_resources.hh"#include "UI_view2d.hh"#include "GPU_immediate.hh"#include "GPU_state.hh"Go to the source code of this file.
Definition at line 663 of file anim_draw.cc.
References ATTR_FALLTHROUGH, BLI_rctf_size_x(), CTX_data_scene(), CTX_wm_region(), find_prev_next_keyframes(), FPS, UI_view2d_smooth_view(), 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().
| void ANIM_draw_action_framerange | ( | AnimData * | adt, |
| bAction * | action, | ||
| View2D * | v2d, | ||
| float | ymin, | ||
| float | ymax ) |
Draw manually set intended playback frame range guides for the action in the background. Allows specifying a subset of the Y range of the view.
Definition at line 143 of file anim_draw.cc.
References ACT_FRAME_RANGE, BKE_nla_tweakedit_remap(), CLAMP_MAX, CLAMP_MIN, View2D::cur, bAction::flag, bAction::frame_end, bAction::frame_start, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_width(), GPU_PRIM_LINES, GPU_SHADER_2D_DIAG_STRIPES, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniform1i(), immUniform4f(), immUniformThemeColorShade(), immVertex2f(), immVertexFormat(), NLATIME_CONVERT_MAP, pos, TH_BACK, UI_GetThemeColorShadeAlpha4fv(), UI_SCALE_FAC, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by action_main_region_draw(), draw_channel_action_ranges(), and draw_nla_main_data().
General call for drawing current frame indicator in animation editor.
Definition at line 45 of file anim_draw.cc.
References CTX_data_scene(), View2D::cur, DRAWCFRA_WIDE, flag, float, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_width(), GPU_PRIM_LINES, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformThemeColor(), immVertex2f(), immVertexFormat(), pos, TH_CFRAME, 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 107 of file anim_draw.cc.
References View2D::cur, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniformThemeColorShade(), immUniformThemeColorShadeAlpha(), immVertex2f(), immVertexFormat(), pos, 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().
Draw preview range 'curtains' for highlighting where the animation data is.
Definition at line 73 of file anim_draw.cc.
References CTX_data_scene(), View2D::cur, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformThemeColorShadeAlpha(), immVertexFormat(), PEFRA, pos, PRVRANGEON, PSFRA, 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().
Add horizontal margin to the rectangle.
This function assumes that the X-min/X-max are set to a frame range to show.
Definition at line 706 of file anim_draw.cc.
References BLI_rctf_size_x(), BLI_rcti_size_x(), View2D::mask, UI_SCALE_FAC, rctf::xmax, and rctf::xmin.
Referenced by actkeys_viewall(), graphkeys_viewall(), and scene_range_frame_exec().
| short ANIM_get_normalization_flags | ( | SpaceLink * | space_link | ) |
Get flags used for normalization in ANIM_unit_mapping_get_factor.
Definition at line 320 of file anim_draw.cc.
References ANIM_UNITCONV_NORMALIZE, ANIM_UNITCONV_NORMALIZE_FREEZE, SpaceGraph::flag, SIPO_NORMALIZE, SIPO_NORMALIZE_FREEZE, SPACE_GRAPH, and SpaceLink::spacetype.
Referenced by create_ghost_curves(), createTransGraphEditData(), draw_fcurve(), draw_fcurve_curve(), draw_fcurve_curve_keys(), draw_fcurve_curve_samples(), get_graph_keyframe_extents(), get_nearest_fcurve_verts_list(), get_normalized_fcurve_bounds(), 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().
Apply/Unapply NLA mapping to all keyframes in the nominated F-Curve
| restore | Whether to map points back to non-mapped time. |
| only_keys | Whether to only adjust the location of the center point of beztriples. |
Definition at line 290 of file anim_draw.cc.
References ANIM_fcurve_keyframes_loop(), bezt_nlamapping_apply(), bezt_nlamapping_restore(), BLI_listbase_is_empty(), KeyframeEditData::data, KeyframeEditData::i1, int, and AnimData::nla_tracks.
Referenced by actkeys_framejump_exec(), actkeys_select_leftright(), box_select_graphkeys(), draw_fcurve(), fcurve_to_keylist(), get_nearest_fcurve_verts_list(), graphkeys_select_leftright(), keyframe_jump_exec(), markers_selectkeys_between(), 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 210 of file anim_draw.cc.
References bAnimListElem::adt, ANIMCONT_ACTION, ANIMCONT_CHANNEL, ANIMCONT_DOPESHEET, ANIMCONT_FCURVES, ANIMCONT_NLA, ANIMCONT_SHAPEKEY, ANIMCONT_TIMELINE, ANIMTYPE_NLACURVE, bAnimContext::datatype, ELEM, G, 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_graphcurves(), box_select_graphkeys(), channels_bake_exec(), columnselect_action_keys(), columnselect_graph_keys(), create_ghost_curves(), createTransActionData(), createTransGraphEditData(), draw_fcurve(), draw_keyframes(), get_channel_bounds(), get_graph_keyframe_extents(), get_keyframe_extents(), get_nearest_fcurve_verts_list(), graphkeys_click_insert_exec(), graphkeys_mselect_column(), graphkeys_select_leftright(), insert_graph_keys(), keyframe_jump_exec(), markers_selectkeys_between(), 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 ) |
Get unit conversion factor for given ID + F-Curve.
Definition at line 529 of file anim_draw.cc.
References ANIM_UNITCONV_NORMALIZE, ANIM_UNITCONV_RESTORE, DEG2RADF, flag, 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, and USER_UNIT_ROT_RADIANS.
Referenced by box_select_graphcurves(), box_select_graphkeys(), create_ghost_curves(), createTransGraphEditData(), draw_fcurve(), draw_fcurve_curve(), draw_fcurve_curve_keys(), draw_fcurve_curve_samples(), get_graph_keyframe_extents(), get_nearest_fcurve_verts_list(), get_normalized_fcurve_bounds(), 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 273 of file anim_draw.cc.
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 254 of file anim_draw.cc.
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 334 of file anim_draw.cc.
References FCurve::bezt, BEZT_IPO_BACK, BEZT_IPO_BEZ, BEZT_IPO_ELASTIC, BKE_curve_forward_diff_bezier(), BKE_fcurve_bezt_binarysearch_index(), BKE_fcurve_correct_bezpart(), FCurve::driver, ELEM, evaluate_fcurve_only_curve(), FLT_MAX, FCurve::fpt, int, BezTriple::ipo, len_v2v2(), max_ff(), max_ii(), min_ff(), min_ii(), PRVRANGEON, FCurve::totvert, v2, BezTriple::vec, and FPoint::vec.
Referenced by normalization_factor_get().
Definition at line 566 of file anim_draw.cc.
References ADS_FILTER_ONLYSEL, BKE_mask_layer_active(), ActKeyColumn::cfra, CTX_data_active_object(), CTX_data_edit_mask(), CTX_data_scene(), Object::data, ED_keylist_create(), ED_keylist_find_next(), ED_keylist_find_prev(), ED_keylist_free(), ED_keylist_prepare_for_direct_access(), bDopeSheet::filterflag, float, FLT_MAX, gpencil_to_keylist(), mask_to_keylist(), ob_to_keylist(), SCE_KEYS_NO_SELONLY, and scene_to_keylist().
Referenced by ANIM_center_frame().
|
static |
Definition at line 461 of file anim_draw.cc.
References ANIM_UNITCONV_NORMALIZE_FREEZE, ANIM_UNITCONV_RESTORE, BLI_assert, fcurve_scene_coord_range_get(), flag, FLT_MAX, G, G_TRANSFORM_FCURVES, FCurve::prev_norm_factor, FCurve::prev_offset, range, and ulp_diff_ff().
Referenced by ANIM_unit_mapping_get_factor().