|
Blender V4.3
|
#include <cfloat>#include <cmath>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "BLI_lasso_2d.hh"#include "BLI_math_vector.h"#include "BLI_utildefines.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_resources.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 int | graphkeys_deselectall_exec (bContext *C, wmOperator *op) |
| void | GRAPH_OT_select_all (wmOperatorType *ot) |
Select Linked Operator | |
| static int | 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 int | graphkeys_select_more_exec (bContext *C, wmOperator *) |
| void | GRAPH_OT_select_more (wmOperatorType *ot) |
| static int | 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 int | 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 int | graphkeys_mselect_column (bAnimContext *ac, const int mval[2], eEditKeyframes_Select select_mode, bool wait_to_deselect_others) |
Click Select Operator | |
| static int | 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, AnimData *adt, 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 int | graphkeys_box_select_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static int | graphkeys_box_select_exec (bContext *C, wmOperator *op) |
| void | GRAPH_OT_select_box (wmOperatorType *ot) |
| static int | graphkeys_lassoselect_exec (bContext *C, wmOperator *op) |
| void | GRAPH_OT_select_lasso (wmOperatorType *ot) |
| static int | 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 int | 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 int | graphkeys_select_leftright_exec (bContext *C, wmOperator *op) |
| static int | 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 int | graphkeys_select_key_handles_exec (bContext *C, wmOperator *op) |
| void | GRAPH_OT_select_key_handles (wmOperatorType *ot) |
| #define ABOVE 1 |
Definition at line 689 of file graph_select.cc.
Referenced by rectf_curve_zone_y().
| #define BELOW -1 |
Definition at line 691 of file graph_select.cc.
Referenced by rectf_curve_zone_y().
| #define GVERTSEL_TOL (10 * U.pixelsize) |
Definition at line 76 of file graph_select.cc.
Referenced by nearest_fcurve_vert_store().
| #define INSIDE 0 |
Definition at line 690 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 68 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 759 of file graph_select.cc.
References ANIM_animdata_freelist(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIM_nla_mapping_get(), ANIM_set_active_channel(), ANIM_unit_mapping_get_factor(), ANIMTYPE_FCURVE, bAnimContext::data, bAnimContext::datatype, FCURVE_SELECTED, 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. 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_fcurve(), ANIM_nla_mapping_get(), ANIM_unit_mapping_get_factor(), BEZT_OK_VALUERANGE, KeyframeEditData::f1, KeyframeEditData::f2, FCURVE_SELECTED, 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, 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 1217 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_get(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_NODUPLIS, BEZT_OK_FRAME, bezt_to_cfraelem(), BKE_nla_tweakedit_remap(), BLI_addtail(), BLI_freelistN(), CfraElem::cfra, bAnimContext::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, 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 357 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_SELECTED, filter(), FCurve::flag, LISTBASE_FOREACH, SELECT_SUBTRACT, 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 82 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 329 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 264 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 163 of file graph_select.cc.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_get_normalization_flags(), ANIM_nla_mapping_apply_fcurve(), ANIM_nla_mapping_get(), 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, 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, 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(), wmOperator::customdata, deselect_graph_keys(), ED_select_op_modal(), SpaceGraph::flag, 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, SIPO_NOHANDLES, SIPO_SELVHANDLESONLY, bAnimContext::sl, 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 2021 of file graph_select.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, graphkeys_clickselect_exec(), graphop_visible_keyframes_poll(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), wmOperatorType::srna, 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 481 of file graph_select.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, graphkeys_deselectall_exec(), graphop_visible_keyframes_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and WM_operator_properties_select_all().
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_box | ( | wmOperatorType * | ot | ) |
Definition at line 911 of file graph_select.cc.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, graphkeys_box_select_exec(), graphkeys_box_select_invoke(), graphop_visible_keyframes_poll(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), wmOperatorType::srna, 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 1111 of file graph_select.cc.
References wmOperatorType::cancel, wmOperatorType::description, ED_select_circle_get_name(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::get_name, graph_circle_select_exec(), graphop_visible_keyframes_poll(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), wmOperatorType::srna, 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 1323 of file graph_select.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, graphkeys_columnselect_exec(), graphop_visible_keyframes_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, prop_column_select_types, PROP_HIDDEN, RNA_def_enum(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_key_handles | ( | wmOperatorType * | ot | ) |
Definition at line 2190 of file graph_select.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, GRAPHKEYS_KEYHANDLESSEL_KEEP, GRAPHKEYS_KEYHANDLESSEL_SELECT, graphkeys_select_key_handles_exec(), graphop_visible_keyframes_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, prop_graphkeys_select_key_handles_actions, RNA_def_enum(), and wmOperatorType::srna.
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_lasso | ( | wmOperatorType * | ot | ) |
Definition at line 1015 of file graph_select.cc.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, graphkeys_lassoselect_exec(), graphop_visible_keyframes_poll(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_DEPENDS_ON_CURSOR, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), wmOperatorType::srna, 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 1666 of file graph_select.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, GRAPHKEYS_LRSEL_TEST, graphkeys_select_leftright_exec(), graphkeys_select_leftright_invoke(), graphop_visible_keyframes_poll(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, prop_graphkeys_leftright_select_types, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_enum(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_less | ( | wmOperatorType * | ot | ) |
Definition at line 1507 of file graph_select.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, graphkeys_select_less_exec(), graphop_visible_keyframes_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_linked | ( | wmOperatorType * | ot | ) |
Definition at line 1388 of file graph_select.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, graphkeys_select_linked_exec(), graphop_visible_keyframes_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by graphedit_operatortypes().
| void GRAPH_OT_select_more | ( | wmOperatorType * | ot | ) |
Definition at line 1472 of file graph_select.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, graphkeys_select_more_exec(), graphop_visible_keyframes_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by graphedit_operatortypes().
|
static |
Definition at line 852 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(), 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 828 of file graph_select.cc.
References ANIM_animdata_get_context(), 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 1970 of file graph_select.cc.
References ANIM_animdata_get_context(), 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 1297 of file graph_select.cc.
References ANIM_animdata_get_context(), 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 426 of file graph_select.cc.
References ANIM_animdata_get_context(), BLI_assert, 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 959 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(), deselect_graph_keys(), SpaceGraph::flag, 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, SIPO_NOHANDLES, SIPO_SELVHANDLESONLY, bAnimContext::sl, WM_event_add_notifier(), and WM_gesture_lasso_path_to_array().
Referenced by GRAPH_OT_select_lasso().
|
static |
Definition at line 1882 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_get(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_NODUPLIS, tNearestVertInfo::bezt, BEZT_OK_FRAME, BKE_nla_tweakedit_remap(), 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 2097 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, GRAPHKEYS_KEYHANDLESSEL_DESELECT, GRAPHKEYS_KEYHANDLESSEL_KEEP, GRAPHKEYS_KEYHANDLESSEL_SELECT, LISTBASE_FOREACH, and FCurve::totvert.
Referenced by graphkeys_select_key_handles_exec().
|
static |
Definition at line 2167 of file graph_select.cc.
References ANIM_animdata_get_context(), 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 1540 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_fcurve(), ANIM_nla_mapping_get(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_NODUPLIS, BEZT_OK_FRAMERANGE, bAnimContext::data, bAnimContext::datatype, deselect_graph_keys(), KeyframeEditData::f1, KeyframeEditData::f2, filter(), float, GRAPHKEYS_LRSEL_LEFT, LISTBASE_FOREACH, MAXFRAMEF, MINAFRAMEF, bAnimContext::scene, SELECT_ADD, SELECT_REPLACE, and SELECT_SUBTRACT.
Referenced by graphkeys_select_leftright_exec().
|
static |
Definition at line 1601 of file graph_select.cc.
References ANIM_animdata_get_context(), 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 1635 of file graph_select.cc.
References ANIM_animdata_get_context(), 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(), and x.
Referenced by GRAPH_OT_select_leftright().
|
static |
Definition at line 1489 of file graph_select.cc.
References ANIM_animdata_get_context(), 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 1348 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, 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 1454 of file graph_select.cc.
References ANIM_animdata_get_context(), 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 525 of file graph_select.cc.
References ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_FOREDIT, ANIMFILTER_NODUPLIS, ANIMFILTER_SELEDIT, filter(), and USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS.
Referenced by box_select_graphcurves(), and box_select_graphkeys().
|
static |
Definition at line 535 of file graph_select.cc.
References ANIM_animdata_filter(), bAnimContext::data, and bAnimContext::datatype.
Referenced by box_select_graphcurves(), and box_select_graphkeys().
|
static |
Definition at line 514 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 543 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_INCL_HANDLES, KeyframeEdit_CircleData::rectf_scaled, KeyframeEdit_LassoData::rectf_scaled, SIPO_SELVHANDLESONLY, and bAnimContext::sl.
Referenced by box_select_graphcurves(), and box_select_graphkeys().
|
static |
Definition at line 1169 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_fcurve(), ANIM_nla_mapping_get(), 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 1707 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, 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, and USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS.
Referenced by graphkeys_clickselect_exec().
|
static |
Definition at line 95 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 684 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 706 of file graph_select.cc.
References BKE_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 692 of file graph_select.cc.
References ABOVE, BELOW, evaluate_fcurve(), INSIDE, rctf::ymax, and rctf::ymin.
Referenced by rectf_curve_intersection().
|
static |
Definition at line 1410 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 1152 of file graph_select.cc.
Referenced by GRAPH_OT_select_column().
|
static |
Definition at line 1531 of file graph_select.cc.
Referenced by GRAPH_OT_select_leftright().
|
static |
Definition at line 2080 of file graph_select.cc.
Referenced by GRAPH_OT_select_key_handles().