|
Blender V4.3
|
#include <cfloat>#include <cmath>#include <cstdio>#include <cstring>#include "DNA_anim_types.h"#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "MEM_guardedalloc.h"#include "BKE_context.hh"#include "BKE_fcurve.hh"#include "BKE_screen.hh"#include "ED_anim_api.hh"#include "ED_screen.hh"#include "UI_interface.hh"#include "RNA_prototypes.hh"#include "graph_intern.hh"Go to the source code of this file.
Functions | |
Set Up Drivers Editor | |
| void | ED_drivers_editor_init (bContext *C, ScrArea *area) |
Active F-Curve | |
| bAnimListElem * | get_active_fcurve_channel (bAnimContext *ac) |
Operator Polling Callbacks | |
| bool | graphop_visible_keyframes_poll (bContext *C) |
| bool | graphop_editable_keyframes_poll (bContext *C) |
| bool | graphop_active_fcurve_poll (bContext *C) |
| bool | graphop_active_editable_fcurve_ctx_poll (bContext *C) |
| bool | graphop_selected_fcurve_poll (bContext *C) |
Set up UI configuration for Drivers Editor (drivers editor window) and RNA (mode switching).
Definition at line 36 of file graph_utils.cc.
References BKE_area_find_region_type(), View2D::cur, ED_region_visibility_change_update(), ARegion::flag, SpaceGraph::mode, printf, RGN_TYPE_UI, RGN_TYPE_WINDOW, SIPO_MODE_DRIVERS, View2D::tot, UI_panel_category_active_set(), ARegion::v2d, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by drivers_editor_show_exec().
| bAnimListElem * get_active_fcurve_channel | ( | bAnimContext * | ac | ) |
Find 'active' F-Curve. It must be editable, since that's the purpose of these buttons (subject to change). We return the 'wrapper' since it contains valuable context info (about hierarchy), which will need to be freed when the caller is done with it.
Definition at line 79 of file graph_utils.cc.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIMFILTER_ACTIVE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_FOREDIT, BLI_remlink(), bAnimContext::data, bAnimContext::datatype, and ListBase::first.
Referenced by graph_fmodifier_copy_exec(), graph_panel_context(), graphkeys_click_insert_exec(), graphkeys_deselectall_exec(), and graphop_active_fcurve_poll().
| bool graphop_active_editable_fcurve_ctx_poll | ( | bContext * | C | ) |
Has active F-Curve in the context that's editable.
Definition at line 261 of file graph_utils.cc.
References CTX_data_pointer_get_type(), PointerRNA::data, and ptr.
Referenced by GRAPH_OT_driver_variables_copy(), and GRAPH_OT_driver_variables_paste().
| bool graphop_active_fcurve_poll | ( | bContext * | C | ) |
Has active F-Curve that's editable.
Definition at line 218 of file graph_utils.cc.
References ANIM_animdata_get_context(), ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, CTX_wm_area(), bAnimListElem::data, ELEM, FCURVE_VISIBLE, FCurve::flag, get_active_fcurve_channel(), MEM_freeN(), SPACE_GRAPH, and bAnimListElem::type.
Referenced by GRAPH_OT_click_insert(), GRAPH_OT_fmodifier_copy(), and GRAPH_OT_fmodifier_paste().
| bool graphop_editable_keyframes_poll | ( | bContext * | C | ) |
Check if there are any visible + editable keyframes (for editing tools).
Definition at line 162 of file graph_utils.cc.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_animdata_get_context(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_FOREDIT, FCurve::bezt, BKE_fcurve_is_keyframable(), CTX_wm_area(), CTX_wm_operator_poll_msg_set(), bAnimContext::data, bAnimContext::datatype, ELEM, filter(), FCurve::fpt, LISTBASE_FOREACH, SPACE_ACTION, and SPACE_GRAPH.
Referenced by GRAPH_OT_bake_keys(), GRAPH_OT_blend_offset(), GRAPH_OT_blend_to_default(), GRAPH_OT_blend_to_ease(), GRAPH_OT_blend_to_neighbor(), GRAPH_OT_breakdown(), GRAPH_OT_butterworth_smooth(), GRAPH_OT_clean(), GRAPH_OT_copy(), GRAPH_OT_decimate(), GRAPH_OT_delete(), GRAPH_OT_duplicate(), GRAPH_OT_ease(), GRAPH_OT_easing_type(), GRAPH_OT_equalize_handles(), GRAPH_OT_euler_filter(), GRAPH_OT_extrapolation_type(), GRAPH_OT_gaussian_smooth(), GRAPH_OT_handle_type(), GRAPH_OT_interpolation_type(), GRAPH_OT_keyframe_insert(), GRAPH_OT_match_slope(), GRAPH_OT_mirror(), GRAPH_OT_paste(), GRAPH_OT_push_pull(), GRAPH_OT_scale_average(), GRAPH_OT_scale_from_neighbor(), GRAPH_OT_shear(), GRAPH_OT_smooth(), GRAPH_OT_snap(), and GRAPH_OT_time_offset().
| bool graphop_selected_fcurve_poll | ( | bContext * | C | ) |
Has selected F-Curve that's editable.
Definition at line 268 of file graph_utils.cc.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_animdata_get_context(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_FOREDIT, ANIMFILTER_SEL, CTX_wm_area(), bAnimContext::data, bAnimContext::datatype, filter(), and SPACE_GRAPH.
Referenced by GRAPH_OT_fmodifier_add(), GRAPH_OT_keys_to_samples(), GRAPH_OT_samples_to_keys(), and GRAPH_OT_sound_to_samples().
| bool graphop_visible_keyframes_poll | ( | bContext * | C | ) |
Check if there are any visible keyframes (for selection tools).
Definition at line 110 of file graph_utils.cc.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_animdata_get_context(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, FCurve::bezt, BKE_fcurve_are_keyframes_usable(), CTX_wm_area(), bAnimContext::data, bAnimContext::datatype, filter(), LISTBASE_FOREACH, and SPACE_GRAPH.
Referenced by GRAPH_OT_clickselect(), GRAPH_OT_ghost_curves_create(), GRAPH_OT_select_all(), GRAPH_OT_select_box(), GRAPH_OT_select_circle(), GRAPH_OT_select_column(), GRAPH_OT_select_key_handles(), GRAPH_OT_select_lasso(), GRAPH_OT_select_leftright(), GRAPH_OT_select_less(), GRAPH_OT_select_linked(), GRAPH_OT_select_more(), and graphkeys_framejump_poll().