|
Blender V5.0
|
#include <cfloat>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "BLI_lasso_2d.hh"#include "BLI_listbase.h"#include "BLI_math_vector.h"#include "DNA_anim_types.h"#include "DNA_scene_types.h"#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "RNA_access.hh"#include "RNA_define.hh"#include "BKE_fcurve.hh"#include "BKE_nla.hh"#include "UI_interface_c.hh"#include "UI_view2d.hh"#include "ED_anim_api.hh"#include "ED_keyframes_edit.hh"#include "ED_markers.hh"#include "ED_select_utils.hh"#include "WM_api.hh"#include "WM_types.hh"#include "graph_intern.hh"Go to the source code of this file.
Classes | |
| struct | tNearestVertInfo |
Functions | |
Deselect All Operator | |
This operator works in one of three ways: 1) (de)select all (AKEY) - test if select all or deselect all 2) invert all (CTRL-IKEY) - invert selection of all keyframes 3) (de)select all - no testing is done; only for use internal tools as normal function... | |
| void | deselect_graph_keys (bAnimContext *ac, bool test, eEditKeyframes_Select sel, bool do_channels) |
| static wmOperatorStatus | graphkeys_deselectall_exec (bContext *C, wmOperator *op) |
| void | GRAPH_OT_select_all (wmOperatorType *ot) |
Select Linked Operator | |
| static wmOperatorStatus | graphkeys_select_linked_exec (bContext *C, wmOperator *) |
| void | GRAPH_OT_select_linked (wmOperatorType *ot) |
Select More/Less Operators | |
| static void | select_moreless_graph_keys (bAnimContext *ac, short mode) |
| static wmOperatorStatus | graphkeys_select_more_exec (bContext *C, wmOperator *) |
| void | GRAPH_OT_select_more (wmOperatorType *ot) |
| static wmOperatorStatus | graphkeys_select_less_exec (bContext *C, wmOperator *) |
| void | GRAPH_OT_select_less (wmOperatorType *ot) |
Mouse-Click Select Operator | |
This operator works in one of three ways:
In addition to these basic options, the SHIFT modifier can be used to toggle the selection mode between replacing the selection (without) and inverting the selection (with). | |
| static wmOperatorStatus | mouse_graph_keys (bAnimContext *ac, const int mval[2], eEditKeyframes_Select select_mode, const bool deselect_all, const bool curves_only, bool wait_to_deselect_others) |
| static wmOperatorStatus | graphkeys_mselect_column (bAnimContext *ac, const int mval[2], eEditKeyframes_Select select_mode, bool wait_to_deselect_others) |
Click Select Operator | |
| static wmOperatorStatus | graphkeys_clickselect_exec (bContext *C, wmOperator *op) |
| void | GRAPH_OT_clickselect (wmOperatorType *ot) |
Internal Keyframe Utilities | |
| #define | GVERTSEL_TOL (10 * U.pixelsize) |
| enum | eGraphVertIndex { NEAREST_HANDLE_LEFT = -1 , NEAREST_HANDLE_KEY , NEAREST_HANDLE_RIGHT } |
| static bool | fcurve_handle_sel_check (SpaceGraph *sipo, BezTriple *bezt) |
| static void | nearest_fcurve_vert_store (ListBase *matches, View2D *v2d, FCurve *fcu, eAnim_ChannelType ctype, BezTriple *bezt, FPoint *fpt, short hpoint, const int mval[2], float unit_scale, float offset) |
| static void | get_nearest_fcurve_verts_list (bAnimContext *ac, const int mval[2], ListBase *matches) |
| static tNearestVertInfo * | get_best_nearest_fcurve_vert (ListBase *matches) |
| static tNearestVertInfo * | find_nearest_fcurve_vert (bAnimContext *ac, const int mval[2]) |
Box Select Operator | |
This operator currently works in one of three ways: -> BKEY - 1) all keyframes within region are selected (validation with BEZT_OK_REGION) -> ALT-BKEY - depending on which axis of the region was larger... -> 2) x-axis, so select all frames within frame range (validation with BEZT_OK_FRAMERANGE) -> 3) y-axis, so select all frames within channels that region included (validation with BEZT_OK_VALUERANGE). The selection backend is also reused for the Lasso and Circle select operators. | |
| #define | ABOVE 1 |
| #define | INSIDE 0 |
| #define | BELOW -1 |
| static rctf | initialize_box_select_coords (const bAnimContext *ac, const rctf *rectf_view) |
| static int | initialize_animdata_selection_filter () |
| static ListBase | initialize_box_select_anim_data (const int filter, bAnimContext *ac) |
| static void | initialize_box_select_key_editing_data (const bool incl_handles, const short mode, bAnimContext *ac, void *data, rctf *scaled_rectf, KeyframeEditData *r_ked, int *r_mapping_flag) |
| static bool | box_select_graphkeys (bAnimContext *ac, const rctf *rectf_view, short mode, eEditKeyframes_Select selectmode, bool incl_handles, void *data) |
| static short | ok_bezier_always_ok (KeyframeEditData *, BezTriple *) |
| static int | rectf_curve_zone_y (const FCurve *fcu, const rctf *rectf, const float offset, const float unit_scale, const float eval_x) |
| static bool | rectf_curve_intersection (const float offset, const float unit_scale, const rctf *rectf, bAnimListElem *ale, const FCurve *fcu) |
| static void | box_select_graphcurves (bAnimContext *ac, const rctf *rectf_view, const short mode, const eEditKeyframes_Select selectmode, const bool incl_handles, void *data) |
| static wmOperatorStatus | graphkeys_box_select_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static wmOperatorStatus | graphkeys_box_select_exec (bContext *C, wmOperator *op) |
| void | GRAPH_OT_select_box (wmOperatorType *ot) |
| static wmOperatorStatus | graphkeys_lassoselect_exec (bContext *C, wmOperator *op) |
| void | GRAPH_OT_select_lasso (wmOperatorType *ot) |
| static wmOperatorStatus | graph_circle_select_exec (bContext *C, wmOperator *op) |
| void | GRAPH_OT_select_circle (wmOperatorType *ot) |
Column Select Operator | |
This operator works in one of four ways:
| |
| static const EnumPropertyItem | prop_column_select_types [] |
| static void | markers_selectkeys_between (bAnimContext *ac) |
| static void | columnselect_graph_keys (bAnimContext *ac, short mode) |
| static wmOperatorStatus | graphkeys_columnselect_exec (bContext *C, wmOperator *op) |
| void | GRAPH_OT_select_column (wmOperatorType *ot) |
Select Left/Right Operator | |
Select keyframes left/right of the current frame indicator. | |
| static const EnumPropertyItem | prop_graphkeys_leftright_select_types [] |
| static void | graphkeys_select_leftright (bAnimContext *ac, short leftright, eEditKeyframes_Select select_mode) |
| static wmOperatorStatus | graphkeys_select_leftright_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | graphkeys_select_leftright_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| void | GRAPH_OT_select_leftright (wmOperatorType *ot) |
Key/handles Selection Operator | |
| static const EnumPropertyItem | prop_graphkeys_select_key_handles_actions [] |
| static void | graphkeys_select_key_handles (bAnimContext *ac, const enum eGraphKey_SelectKeyHandles_Action left_handle_action, const enum eGraphKey_SelectKeyHandles_Action key_action, const enum eGraphKey_SelectKeyHandles_Action right_handle_action) |
| static wmOperatorStatus | graphkeys_select_key_handles_exec (bContext *C, wmOperator *op) |
| void | GRAPH_OT_select_key_handles (wmOperatorType *ot) |
| #define ABOVE 1 |
Definition at line 684 of file graph_select.cc.
Referenced by rectf_curve_zone_y().
| #define BELOW -1 |
Definition at line 686 of file graph_select.cc.
Referenced by rectf_curve_zone_y().
| #define GVERTSEL_TOL (10 * U.pixelsize) |
Definition at line 74 of file graph_select.cc.
Referenced by nearest_fcurve_vert_store().
| #define INSIDE 0 |
Definition at line 685 of file graph_select.cc.
Referenced by rectf_curve_intersection(), and rectf_curve_zone_y().
| enum eGraphVertIndex |
| Enumerator | |
|---|---|
| NEAREST_HANDLE_LEFT | |
| NEAREST_HANDLE_KEY | |
| NEAREST_HANDLE_RIGHT | |
Definition at line 66 of file graph_select.cc.
|
static |
Perform a box selection of the curves themselves. This means this function tries to select a curve by sampling it at various points instead of trying to select the keyframes directly. The selection actions done to a curve are actually done on all the keyframes of the curve.
Definition at line 754 of file graph_select.cc.
References ANIM_animdata_freelist(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIM_set_active_channel(), ANIM_unit_mapping_get_factor(), ANIMTYPE_FCURVE, bAnimContext::data, data, bAnimContext::datatype, FCURVE_SELECTED, filter, FCurve::flag, Scene::id, initialize_animdata_selection_filter(), initialize_box_select_anim_data(), initialize_box_select_coords(), initialize_box_select_key_editing_data(), LISTBASE_FOREACH, ok_bezier_always_ok(), rectf_curve_intersection(), bAnimContext::scene, SELECT_ADD, SELECT_REPLACE, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by graph_circle_select_exec(), graphkeys_box_select_exec(), and graphkeys_lassoselect_exec().
|
static |
Box Select only selects keyframes, as overshooting handles often get caught too, which means that they may be inadvertently moved as well. However, incl_handles overrides this, and allow handles to be considered independently too (default since b037ba2665f4). Also, for convenience, handles should get same status as keyframe (if it was within bounds).
This function returns true if there was any change in the selection of a key (selecting or deselecting any key returns true, otherwise it returns false).
Definition at line 595 of file graph_select.cc.
References ANIM_animdata_freelist(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIM_nla_mapping_apply_if_needed_fcurve(), ANIM_unit_mapping_get_factor(), ANIM_UNITCONV_ONLYKEYS, BEZT_OK_VALUERANGE, data, KeyframeEditData::f1, KeyframeEditData::f2, FCURVE_SELECTED, filter, FCurve::flag, Scene::id, initialize_animdata_selection_filter(), initialize_box_select_anim_data(), initialize_box_select_coords(), initialize_box_select_key_editing_data(), LISTBASE_FOREACH, bAnimContext::scene, SELECT_ADD, U, USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by graph_circle_select_exec(), graphkeys_box_select_exec(), and graphkeys_lassoselect_exec().
|
static |
Definition at line 1213 of file graph_select.cc.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIM_nla_tweakedit_remap(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_NODUPLIS, BEZT_OK_FRAME, bezt_to_cfraelem(), BLI_addtail(), BLI_freelistN(), CfraElem::cfra, RenderData::cfra, bAnimContext::data, KeyframeEditData::data, bAnimContext::datatype, ED_markers_make_cfra_list(), KeyframeEditData::f1, filter, float, GRAPHKEYS_COLUMNSEL_CFRA, GRAPHKEYS_COLUMNSEL_KEYS, GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN, KeyframeEditData::list, LISTBASE_FOREACH, bAnimContext::markers, MEM_callocN(), NLATIME_CONVERT_UNMAP, Scene::r, bAnimContext::scene, and SELECT_ADD.
Referenced by graphkeys_columnselect_exec().
| void deselect_graph_keys | ( | bAnimContext * | ac, |
| bool | test, | ||
| eEditKeyframes_Select | sel, | ||
| bool | do_channels ) |
Deselects keyframes in the Graph Editor
Definition at line 351 of file graph_select.cc.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_NODUPLIS, BEZT_OK_SELECTED, bAnimContext::data, bAnimContext::datatype, FCURVE_ACTIVE, FCURVE_SELECTED, filter, FCurve::flag, LISTBASE_FOREACH, SELECT_SUBTRACT, U, and USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS.
Referenced by graph_circle_select_exec(), graphkeys_box_select_exec(), graphkeys_click_insert_exec(), graphkeys_deselectall_exec(), graphkeys_lassoselect_exec(), graphkeys_mselect_column(), graphkeys_select_leftright(), and mouse_graph_keys().
|
static |
Definition at line 80 of file graph_select.cc.
References BEZT_ISSEL_ANY, SpaceGraph::flag, SIPO_NOHANDLES, and SIPO_SELVHANDLESONLY.
Referenced by get_nearest_fcurve_verts_list().
|
static |
Find the nearest vertices (either a handle or the keyframe) that are nearest to the mouse cursor (in area coordinates)
Definition at line 323 of file graph_select.cc.
References BLI_freelistN(), get_best_nearest_fcurve_vert(), and get_nearest_fcurve_verts_list().
Referenced by graphkeys_box_select_invoke(), graphkeys_mselect_column(), and mouse_graph_keys().
|
static |
Definition at line 258 of file graph_select.cc.
References BLI_listbase_is_empty(), BLI_listbase_is_single(), BLI_listbase_rotate_last(), BLI_pophead(), BLI_remlink(), FCURVE_ACTIVE, FCURVE_SELECTED, and LISTBASE_FOREACH.
Referenced by find_nearest_fcurve_vert().
|
static |
Definition at line 160 of file graph_select.cc.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_get_normalization_flags(), ANIM_nla_mapping_apply_if_needed_fcurve(), ANIM_unit_mapping_get_factor(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_NODUPLIS, ANIMFILTER_SEL, FCurve::bezt, BEZT_IPO_BEZ, bAnimContext::data, bAnimContext::datatype, fcurve_handle_sel_check(), filter, FCurve::fpt, i, Scene::id, BezTriple::ipo, LISTBASE_FOREACH, nearest_fcurve_vert_store(), NEAREST_HANDLE_KEY, NEAREST_HANDLE_LEFT, NEAREST_HANDLE_RIGHT, bAnimContext::region, bAnimContext::scene, bAnimContext::sl, FCurve::totvert, U, USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS, and ARegion::v2d.
Referenced by find_nearest_fcurve_vert().
|
static |
Definition at line 1046 of file graph_select.cc.
References ANIM_animdata_get_context(), BEZT_OK_REGION_CIRCLE, box_select_graphcurves(), box_select_graphkeys(), C, wmOperator::customdata, data, deselect_graph_keys(), ED_select_op_modal(), NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_boolean_set(), RNA_enum_get(), RNA_int_get(), SEL_OP_SUB, SEL_OP_USE_PRE_DESELECT, SELECT_ADD, SELECT_SUBTRACT, WM_event_add_notifier(), WM_gesture_is_modal_first(), x, rctf::xmax, rctf::xmin, y, rctf::ymax, and rctf::ymin.
Referenced by GRAPH_OT_select_circle().
| void GRAPH_OT_clickselect | ( | wmOperatorType * | ot | ) |
Definition at line 2004 of file graph_select.cc.
References graphkeys_clickselect_exec(), graphop_visible_keyframes_poll(), OPTYPE_UNDO, ot, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), WM_generic_select_invoke(), WM_generic_select_modal(), and WM_operator_properties_generic_select().
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 475 of file graph_select.cc.
References graphkeys_deselectall_exec(), graphop_visible_keyframes_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and WM_operator_properties_select_all().
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_box | ( | wmOperatorType * | ot | ) |
Definition at line 907 of file graph_select.cc.
References graphkeys_box_select_exec(), graphkeys_box_select_invoke(), graphop_visible_keyframes_poll(), OPTYPE_UNDO, ot, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), WM_gesture_box_cancel(), WM_gesture_box_modal(), WM_operator_properties_gesture_box(), and WM_operator_properties_select_operation_simple().
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_circle | ( | wmOperatorType * | ot | ) |
Definition at line 1103 of file graph_select.cc.
References ED_select_circle_get_name(), graph_circle_select_exec(), graphop_visible_keyframes_poll(), OPTYPE_UNDO, ot, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), WM_gesture_circle_cancel(), WM_gesture_circle_invoke(), WM_gesture_circle_modal(), WM_operator_properties_gesture_circle(), and WM_operator_properties_select_operation_simple().
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_column | ( | wmOperatorType * | ot | ) |
Definition at line 1318 of file graph_select.cc.
References graphkeys_columnselect_exec(), graphop_visible_keyframes_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, prop_column_select_types, PROP_HIDDEN, RNA_def_enum(), and RNA_def_property_flag().
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_key_handles | ( | wmOperatorType * | ot | ) |
Definition at line 2172 of file graph_select.cc.
References GRAPHKEYS_KEYHANDLESSEL_KEEP, GRAPHKEYS_KEYHANDLESSEL_SELECT, graphkeys_select_key_handles_exec(), graphop_visible_keyframes_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, prop_graphkeys_select_key_handles_actions, and RNA_def_enum().
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_lasso | ( | wmOperatorType * | ot | ) |
Definition at line 1004 of file graph_select.cc.
References graphkeys_lassoselect_exec(), graphop_visible_keyframes_poll(), OPTYPE_DEPENDS_ON_CURSOR, OPTYPE_UNDO, ot, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), WM_gesture_lasso_cancel(), WM_gesture_lasso_invoke(), WM_gesture_lasso_modal(), WM_operator_properties_gesture_lasso(), and WM_operator_properties_select_operation_simple().
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_leftright | ( | wmOperatorType * | ot | ) |
Definition at line 1656 of file graph_select.cc.
References GRAPHKEYS_LRSEL_TEST, graphkeys_select_leftright_exec(), graphkeys_select_leftright_invoke(), graphop_visible_keyframes_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, prop_graphkeys_leftright_select_types, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_enum(), and RNA_def_property_flag().
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_less | ( | wmOperatorType * | ot | ) |
Definition at line 1502 of file graph_select.cc.
References graphkeys_select_less_exec(), graphop_visible_keyframes_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_linked | ( | wmOperatorType * | ot | ) |
Definition at line 1383 of file graph_select.cc.
References graphkeys_select_linked_exec(), graphop_visible_keyframes_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_more | ( | wmOperatorType * | ot | ) |
Definition at line 1467 of file graph_select.cc.
References graphkeys_select_more_exec(), graphop_visible_keyframes_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by graphedit_operatortypes().
|
static |
Definition at line 848 of file graph_select.cc.
References ANIM_animdata_get_context(), BEZT_OK_FRAMERANGE, BEZT_OK_REGION, BEZT_OK_VALUERANGE, BLI_rctf_rcti_copy(), BLI_rcti_size_x(), BLI_rcti_size_y(), box_select_graphcurves(), box_select_graphkeys(), C, deselect_graph_keys(), NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), SEL_OP_SUB, SEL_OP_USE_PRE_DESELECT, SELECT_ADD, SELECT_SUBTRACT, WM_event_add_notifier(), and WM_operator_properties_border_to_rcti().
Referenced by GRAPH_OT_select_box().
|
static |
Definition at line 822 of file graph_select.cc.
References ANIM_animdata_get_context(), C, find_nearest_fcurve_vert(), MEM_freeN(), OPERATOR_CANCELLED, OPERATOR_PASS_THROUGH, wmOperator::ptr, bAnimContext::region, RNA_boolean_get(), WM_event_drag_start_mval(), and WM_gesture_box_invoke().
Referenced by GRAPH_OT_select_box().
|
static |
Definition at line 1953 of file graph_select.cc.
References ANIM_animdata_get_context(), C, graphkeys_mselect_column(), mouse_graph_keys(), NA_SELECTED, NC_ANIMATION, ND_ANIMCHAN, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_boolean_get(), RNA_int_get(), SELECT_INVERT, SELECT_REPLACE, and WM_event_add_notifier().
Referenced by GRAPH_OT_clickselect().
|
static |
Definition at line 1292 of file graph_select.cc.
References ANIM_animdata_get_context(), C, columnselect_graph_keys(), GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN, markers_selectkeys_between(), NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), and WM_event_add_notifier().
Referenced by GRAPH_OT_select_column().
|
static |
Definition at line 420 of file graph_select.cc.
References ANIM_animdata_get_context(), BLI_assert, C, bAnimListElem::data, deselect_graph_keys(), FCURVE_ACTIVE, FCURVE_SELECTED, FCurve::flag, get_active_fcurve_channel(), MEM_freeN(), NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), SEL_DESELECT, SEL_INVERT, SEL_SELECT, SEL_TOGGLE, SELECT_ADD, SELECT_INVERT, SELECT_SUBTRACT, and WM_event_add_notifier().
Referenced by GRAPH_OT_select_all().
|
static |
Definition at line 957 of file graph_select.cc.
References ANIM_animdata_get_context(), BEZT_OK_REGION_LASSO, BLI_lasso_boundbox(), BLI_rctf_rcti_copy(), box_select_graphcurves(), box_select_graphkeys(), C, deselect_graph_keys(), KeyframeEdit_LassoData::mcoords, NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, KeyframeEdit_LassoData::rectf_view, RNA_boolean_get(), RNA_enum_get(), SEL_OP_SUB, SEL_OP_USE_PRE_DESELECT, SELECT_ADD, SELECT_SUBTRACT, WM_event_add_notifier(), and WM_gesture_lasso_path_to_array().
Referenced by GRAPH_OT_select_lasso().
|
static |
Definition at line 1872 of file graph_select.cc.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIM_nla_tweakedit_remap(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_NODUPLIS, tNearestVertInfo::bezt, BEZT_OK_FRAME, BLI_freelistN(), bAnimContext::data, bAnimContext::datatype, deselect_graph_keys(), KeyframeEditData::f1, BezTriple::f2, filter, find_nearest_fcurve_vert(), tNearestVertInfo::frame, KeyframeEditData::list, LISTBASE_FOREACH, MEM_freeN(), NLATIME_CONVERT_UNMAP, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, SELECT, SELECT_ADD, SELECT_REPLACE, and SELECT_SUBTRACT.
Referenced by graphkeys_clickselect_exec().
|
static |
Select/deselect different parts (e.g. left/right handles) of already-selected keys.
The *_action parameters determine what action to take on each part of a key: select, deselect, or keep (do nothing).
| left_handle_action | selection action to perform on left handles. |
| key_action | selection action to perform on the keys themselves. |
| right_handle_action | selection action to perform on right handles. |
Definition at line 2080 of file graph_select.cc.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_NODUPLIS, ANIMTYPE_FCURVE, FCurve::bezt, BEZT_DESEL_IDX, BEZT_ISSEL_ANY, BEZT_SEL_IDX, BLI_assert, bAnimContext::data, bAnimContext::datatype, filter, GRAPHKEYS_KEYHANDLESSEL_DESELECT, GRAPHKEYS_KEYHANDLESSEL_KEEP, GRAPHKEYS_KEYHANDLESSEL_SELECT, i, LISTBASE_FOREACH, and FCurve::totvert.
Referenced by graphkeys_select_key_handles_exec().
|
static |
Definition at line 2149 of file graph_select.cc.
References ANIM_animdata_get_context(), C, graphkeys_select_key_handles(), NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), and WM_event_add_notifier().
Referenced by GRAPH_OT_select_key_handles().
|
static |
Definition at line 1535 of file graph_select.cc.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIM_nla_mapping_apply_if_needed_fcurve(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_NODUPLIS, BEZT_OK_FRAMERANGE, RenderData::cfra, bAnimContext::data, bAnimContext::datatype, deselect_graph_keys(), KeyframeEditData::f1, KeyframeEditData::f2, filter, float, GRAPHKEYS_LRSEL_LEFT, LISTBASE_FOREACH, MAXFRAMEF, MINAFRAMEF, Scene::r, bAnimContext::scene, SELECT_ADD, SELECT_REPLACE, and SELECT_SUBTRACT.
Referenced by graphkeys_select_leftright_exec().
|
static |
Definition at line 1589 of file graph_select.cc.
References ANIM_animdata_get_context(), C, GRAPHKEYS_LRSEL_TEST, graphkeys_select_leftright(), NA_SELECTED, NC_ANIMATION, ND_ANIMCHAN, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), SELECT_INVERT, SELECT_REPLACE, and WM_event_add_notifier().
Referenced by GRAPH_OT_select_leftright(), and graphkeys_select_leftright_invoke().
|
static |
Definition at line 1623 of file graph_select.cc.
References ANIM_animdata_get_context(), C, GRAPHKEYS_LRSEL_LEFT, GRAPHKEYS_LRSEL_RIGHT, GRAPHKEYS_LRSEL_TEST, graphkeys_select_leftright_exec(), wmEvent::mval, OPERATOR_CANCELLED, wmOperator::ptr, bAnimContext::region, RNA_enum_get(), RNA_enum_set(), bAnimContext::scene, UI_view2d_region_to_view_x(), ARegion::v2d, and x.
Referenced by GRAPH_OT_select_leftright().
|
static |
Definition at line 1484 of file graph_select.cc.
References ANIM_animdata_get_context(), C, NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_FINISHED, select_moreless_graph_keys(), SELMAP_LESS, and WM_event_add_notifier().
Referenced by GRAPH_OT_select_less().
|
static |
Definition at line 1343 of file graph_select.cc.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_animdata_get_context(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_NODUPLIS, BEZT_OK_SELECTED, C, bAnimContext::data, bAnimContext::datatype, filter, LISTBASE_FOREACH, NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_FINISHED, SELECT_ADD, and WM_event_add_notifier().
Referenced by GRAPH_OT_select_linked().
|
static |
Definition at line 1449 of file graph_select.cc.
References ANIM_animdata_get_context(), C, NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_FINISHED, select_moreless_graph_keys(), SELMAP_MORE, and WM_event_add_notifier().
Referenced by GRAPH_OT_select_more().
|
static |
Definition at line 519 of file graph_select.cc.
References ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_FOREDIT, ANIMFILTER_NODUPLIS, ANIMFILTER_SELEDIT, filter, U, and USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS.
Referenced by box_select_graphcurves(), and box_select_graphkeys().
|
static |
Definition at line 529 of file graph_select.cc.
References ANIM_animdata_filter(), bAnimContext::data, bAnimContext::datatype, and filter.
Referenced by box_select_graphcurves(), and box_select_graphkeys().
|
static |
Definition at line 508 of file graph_select.cc.
References bAnimContext::region, UI_view2d_region_to_view_rctf(), and ARegion::v2d.
Referenced by box_select_graphcurves(), and box_select_graphkeys().
|
static |
Definition at line 537 of file graph_select.cc.
References ANIM_get_normalization_flags(), ANIM_UNITCONV_ONLYKEYS, BEZT_OK_REGION_CIRCLE, BEZT_OK_REGION_LASSO, data, KeyframeEditData::data, SpaceGraph::flag, KeyframeEditData::iterflags, KEYFRAME_ITER_HANDLES_DEFAULT_INVISIBLE, KEYFRAME_ITER_HANDLES_INVISIBLE, KEYFRAME_ITER_INCL_HANDLES, KeyframeEdit_CircleData::rectf_scaled, KeyframeEdit_LassoData::rectf_scaled, SIPO_NOHANDLES, SIPO_SELVHANDLESONLY, and bAnimContext::sl.
Referenced by box_select_graphcurves(), and box_select_graphkeys().
|
static |
Definition at line 1172 of file graph_select.cc.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIM_nla_mapping_apply_if_needed_fcurve(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_NODUPLIS, BEZT_OK_FRAMERANGE, bAnimContext::data, bAnimContext::datatype, ED_markers_get_minmax(), KeyframeEditData::f1, KeyframeEditData::f2, filter, LISTBASE_FOREACH, bAnimContext::markers, max, min, and SELECT_ADD.
Referenced by graphkeys_columnselect_exec().
|
static |
Definition at line 1697 of file graph_select.cc.
References ACHANNEL_SETFLAG_CLEAR, ANIM_anim_channels_select_set(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIM_set_active_channel(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_NODUPLIS, tNearestVertInfo::bezt, BEZT_ISSEL_ANY, BKE_fcurve_active_keyframe_index(), BKE_fcurve_active_keyframe_set(), tNearestVertInfo::ctype, bAnimContext::data, bAnimContext::datatype, deselect_graph_keys(), BezTriple::f1, BezTriple::f2, BezTriple::f3, tNearestVertInfo::fcu, FCURVE_ACTIVE_KEYFRAME_NONE, FCURVE_PROTECTED, FCURVE_SELECTED, filter, find_nearest_fcurve_vert(), FCurve::flag, SpaceGraph_Runtime::flag, tNearestVertInfo::fpt, tNearestVertInfo::hpoint, MEM_freeN(), NEAREST_HANDLE_KEY, NEAREST_HANDLE_LEFT, NEAREST_HANDLE_RIGHT, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, SpaceGraph::runtime, SELECT, SELECT_ADD, SELECT_INVERT, SELECT_REPLACE, SELECT_SUBTRACT, SIPO_RUNTIME_FLAG_TWEAK_HANDLES_LEFT, SIPO_RUNTIME_FLAG_TWEAK_HANDLES_RIGHT, bAnimContext::sl, U, and USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS.
Referenced by graphkeys_clickselect_exec().
|
static |
Definition at line 93 of file graph_select.cc.
References tNearestVertInfo::bezt, BEZT_ISSEL_ANY, BEZT_ISSEL_IDX, BLI_addtail(), tNearestVertInfo::ctype, tNearestVertInfo::dist, tNearestVertInfo::fcu, tNearestVertInfo::frame, GVERTSEL_TOL, tNearestVertInfo::hpoint, ListBase::last, len_v2v2_int(), MEM_callocN(), tNearestVertInfo::sel, UI_view2d_view_to_region_clip(), and BezTriple::vec.
Referenced by get_nearest_fcurve_verts_list().
|
static |
This function is used to set all the keyframes of a given curve as selectable by the "select_cb" function inside of "box_select_graphcurves".
Definition at line 679 of file graph_select.cc.
References KEYFRAME_OK_H1, KEYFRAME_OK_H2, and KEYFRAME_OK_KEY.
Referenced by box_select_graphcurves().
|
static |
Definition at line 701 of file graph_select.cc.
References ANIM_nla_tweakedit_remap(), INSIDE, NLATIME_CONVERT_UNMAP, rectf_curve_zone_y(), rctf::xmax, and rctf::xmin.
Referenced by box_select_graphcurves().
|
static |
Definition at line 687 of file graph_select.cc.
References ABOVE, BELOW, evaluate_fcurve_only_curve(), INSIDE, rctf::ymax, and rctf::ymin.
Referenced by rectf_curve_intersection().
|
static |
Definition at line 1405 of file graph_select.cc.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_editkeyframes_buildselmap(), ANIM_fcurve_keyframes_loop(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_NODUPLIS, FCurve::bezt, bezt_selmap_flush(), bAnimContext::data, KeyframeEditData::data, bAnimContext::datatype, filter, LISTBASE_FOREACH, MEM_callocN(), MEM_freeN(), and FCurve::totvert.
Referenced by graphkeys_select_less_exec(), and graphkeys_select_more_exec().
|
static |
Definition at line 1155 of file graph_select.cc.
|
static |
Definition at line 1526 of file graph_select.cc.
Referenced by GRAPH_OT_select_leftright().
|
static |
Definition at line 2063 of file graph_select.cc.
Referenced by GRAPH_OT_select_key_handles().