Blender
V3.3
|
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_lasso_2d.h"
#include "BLI_math.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.h"
#include "RNA_define.h"
#include "BKE_context.h"
#include "BKE_fcurve.h"
#include "BKE_nla.h"
#include "UI_view2d.h"
#include "ED_anim_api.h"
#include "ED_keyframes_edit.h"
#include "ED_markers.h"
#include "ED_select_utils.h"
#include "WM_api.h"
#include "WM_types.h"
#include "graph_intern.h"
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, short 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 *UNUSED(op)) |
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 *UNUSED(op)) |
void | GRAPH_OT_select_more (wmOperatorType *ot) |
static int | graphkeys_select_less_exec (bContext *C, wmOperator *UNUSED(op)) |
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 } |
typedef struct tNearestVertInfo | tNearestVertInfo |
typedef enum eGraphVertIndex | eGraphVertIndex |
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 (const SpaceGraph *sipo) |
static ListBase | initialize_box_select_anim_data (const int filter, bAnimContext *ac) |
static void | initialize_box_select_key_editing_data (const SpaceGraph *sipo, 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, short selectmode, bool incl_handles, void *data) |
static short | ok_bezier_always_ok (KeyframeEditData *UNUSED(ked), BezTriple *UNUSED(bezt)) |
static int | rectf_curve_zone_y (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, FCurve *fcu) |
static void | box_select_graphcurves (bAnimContext *ac, const rctf *rectf_view, const short mode, const short 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 | |
static const EnumPropertyItem | prop_graphkeys_leftright_select_types [] |
static void | graphkeys_select_leftright (bAnimContext *ac, short leftright, short 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) |
#define ABOVE 1 |
Definition at line 667 of file graph_select.c.
#define BELOW -1 |
Definition at line 669 of file graph_select.c.
#define GVERTSEL_TOL (10 * U.pixelsize) |
Definition at line 75 of file graph_select.c.
#define INSIDE 0 |
Definition at line 668 of file graph_select.c.
typedef enum eGraphVertIndex eGraphVertIndex |
typedef struct tNearestVertInfo tNearestVertInfo |
enum eGraphVertIndex |
Enumerator | |
---|---|
NEAREST_HANDLE_LEFT | |
NEAREST_HANDLE_KEY | |
NEAREST_HANDLE_RIGHT |
Definition at line 67 of file graph_select.c.
|
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 731 of file graph_select.c.
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, data, bAnimContext::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, NULL, offset, ok_bezier_always_ok(), rectf_curve_intersection(), bAnimContext::scene, SELECT_ADD, SELECT_REPLACE, bAnimContext::sl, 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 571 of file graph_select.c.
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, data, KeyframeEditData::f1, KeyframeEditData::f2, tNearestVertInfo::fcu, FCURVE_SELECTED, filter(), ListBase::first, FCurve::flag, SpaceGraph::flag, bAnimListElem::id, initialize_animdata_selection_filter(), initialize_box_select_anim_data(), initialize_box_select_coords(), initialize_box_select_key_editing_data(), bAnimListElem::key_data, bAnimListElem::next, NULL, offset, bAnimContext::scene, SELECT_ADD, SIPO_SELCUVERTSONLY, bAnimContext::sl, 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 1179 of file graph_select.c.
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, RenderData::cfra, bAnimContext::data, bAnimContext::datatype, ED_markers_make_cfra_list(), KeyframeEditData::f1, filter(), ListBase::first, float(), GRAPHKEYS_COLUMNSEL_CFRA, GRAPHKEYS_COLUMNSEL_KEYS, GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN, bAnimListElem::key_data, KeyframeEditData::list, bAnimContext::markers, MEM_callocN, CfraElem::next, bAnimListElem::next, NLATIME_CONVERT_UNMAP, NULL, Scene::r, scene, bAnimContext::scene, SELECT, and SELECT_ADD.
Referenced by graphkeys_columnselect_exec().
void deselect_graph_keys | ( | struct bAnimContext * | ac, |
bool | test, | ||
short | sel, | ||
bool | do_channels | ||
) |
Deselects keyframes in the Graph Editor
Definition at line 335 of file graph_select.c.
References filter(), NULL, and bAnimContext::sl.
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 81 of file graph_select.c.
References tNearestVertInfo::bezt, 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 307 of file graph_select.c.
References BLI_freelistN(), get_best_nearest_fcurve_vert(), get_nearest_fcurve_verts_list(), and NULL.
Referenced by graphkeys_box_select_invoke(), graphkeys_mselect_column(), and mouse_graph_keys().
|
static |
Definition at line 261 of file graph_select.c.
References BLI_listbase_is_empty(), BLI_listbase_is_single(), BLI_pophead(), BLI_remlink(), ListBase::first, tNearestVertInfo::next, NULL, and tNearestVertInfo::sel.
Referenced by find_nearest_fcurve_vert().
|
static |
Definition at line 161 of file graph_select.c.
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, tNearestVertInfo::fcu, fcurve_handle_sel_check(), filter(), ListBase::first, SpaceGraph::flag, FCurve::fpt, bAnimListElem::id, BezTriple::ipo, bAnimListElem::key_data, nearest_fcurve_vert_store(), NEAREST_HANDLE_KEY, NEAREST_HANDLE_LEFT, NEAREST_HANDLE_RIGHT, bAnimListElem::next, NULL, offset, bAnimContext::region, bAnimContext::scene, SIPO_SELCUVERTSONLY, bAnimContext::sl, FCurve::totvert, bAnimListElem::type, and ARegion::v2d.
Referenced by find_nearest_fcurve_vert().
|
static |
Definition at line 1017 of file graph_select.c.
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(), SpaceGraph::flag, if(), NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), 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 1963 of file graph_select.c.
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 457 of file graph_select.c.
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 880 of file graph_select.c.
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_REGISTER, 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 1075 of file graph_select.c.
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 1282 of file graph_select.c.
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, RNA_def_enum(), and wmOperatorType::srna.
Referenced by graphedit_operatortypes().
void GRAPH_OT_select_lasso | ( | wmOperatorType * | ot | ) |
Definition at line 986 of file graph_select.c.
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 1620 of file graph_select.c.
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 1465 of file graph_select.c.
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 1346 of file graph_select.c.
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 1430 of file graph_select.c.
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 821 of file graph_select.c.
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, NULL, 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 797 of file graph_select.c.
References ANIM_animdata_get_context(), C, find_nearest_fcurve_vert(), MEM_freeN, NULL, 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 1918 of file graph_select.c.
References ANIM_animdata_get_context(), C, graphkeys_mselect_column(), mouse_graph_keys(), NA_SELECTED, NC_ANIMATION, ND_ANIMCHAN, ND_KEYFRAME, NULL, 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 1256 of file graph_select.c.
References ANIM_animdata_get_context(), C, columnselect_graph_keys(), GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN, markers_selectkeys_between(), NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), and WM_event_add_notifier().
Referenced by GRAPH_OT_select_column().
|
static |
Definition at line 402 of file graph_select.c.
References ANIM_animdata_get_context(), BLI_assert, C, bAnimListElem::data, deselect_graph_keys(), tNearestVertInfo::fcu, FCURVE_ACTIVE, FCURVE_SELECTED, FCurve::flag, get_active_fcurve_channel(), MEM_freeN, NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, NULL, 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 928 of file graph_select.c.
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(), SpaceGraph::flag, if(), KeyframeEdit_LassoData::mcoords, KeyframeEdit_LassoData::mcoords_len, MEM_freeN, NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, NULL, 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, 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 1831 of file graph_select.c.
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(), ListBase::first, tNearestVertInfo::frame, bAnimListElem::key_data, KeyframeEditData::list, MEM_freeN, bAnimListElem::next, NLATIME_CONVERT_UNMAP, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, SELECT, SELECT_ADD, SELECT_REPLACE, and SELECT_SUBTRACT.
Referenced by graphkeys_clickselect_exec().
|
static |
Definition at line 1498 of file graph_select.c.
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, RenderData::cfra, bAnimContext::data, bAnimContext::datatype, deselect_graph_keys(), KeyframeEditData::f1, KeyframeEditData::f2, filter(), ListBase::first, float(), GRAPHKEYS_LRSEL_LEFT, bAnimListElem::key_data, MAXFRAMEF, MINAFRAMEF, bAnimListElem::next, NULL, Scene::r, scene, bAnimContext::scene, SELECT_ADD, SELECT_REPLACE, and SELECT_SUBTRACT.
Referenced by graphkeys_select_leftright_exec().
|
static |
Definition at line 1555 of file graph_select.c.
References ANIM_animdata_get_context(), C, GRAPHKEYS_LRSEL_TEST, graphkeys_select_leftright(), NA_SELECTED, NC_ANIMATION, ND_ANIMCHAN, ND_KEYFRAME, NULL, 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 1589 of file graph_select.c.
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, r, bAnimContext::region, RNA_enum_get(), RNA_enum_set(), scene, bAnimContext::scene, UI_view2d_region_to_view_x(), ARegion::v2d, and x.
Referenced by GRAPH_OT_select_leftright().
|
static |
Definition at line 1447 of file graph_select.c.
References ANIM_animdata_get_context(), C, NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, NULL, 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 1306 of file graph_select.c.
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::first, if(), bAnimListElem::key_data, NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, bAnimListElem::next, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, SELECT_ADD, and WM_event_add_notifier().
Referenced by GRAPH_OT_select_linked().
|
static |
Definition at line 1412 of file graph_select.c.
References ANIM_animdata_get_context(), C, NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, NULL, 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 501 of file graph_select.c.
References ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_FOREDIT, ANIMFILTER_NODUPLIS, ANIMFILTER_SELEDIT, filter(), SpaceGraph::flag, and SIPO_SELCUVERTSONLY.
Referenced by box_select_graphcurves(), and box_select_graphkeys().
|
static |
Definition at line 511 of file graph_select.c.
References ANIM_animdata_filter(), bAnimContext::data, bAnimContext::datatype, filter(), and NULL.
Referenced by box_select_graphcurves(), and box_select_graphkeys().
|
static |
Definition at line 490 of file graph_select.c.
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 518 of file graph_select.c.
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_LassoData::rectf_scaled, KeyframeEdit_CircleData::rectf_scaled, and SIPO_SELVHANDLESONLY.
Referenced by box_select_graphcurves(), and box_select_graphkeys().
|
static |
Definition at line 1133 of file graph_select.c.
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::first, bAnimListElem::key_data, bAnimContext::markers, max, min, bAnimListElem::next, NULL, and SELECT_ADD.
Referenced by graphkeys_columnselect_exec().
|
static |
Definition at line 1661 of file graph_select.c.
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, BEZT_ISSEL_ANY, BKE_fcurve_active_keyframe_index(), BKE_fcurve_active_keyframe_set(), bAnimContext::data, bAnimContext::datatype, deselect_graph_keys(), KeyframeEditData::fcu, FCURVE_ACTIVE_KEYFRAME_NONE, FCURVE_PROTECTED, FCURVE_SELECTED, filter(), find_nearest_fcurve_vert(), SpaceGraph_Runtime::flag, SpaceGraph::flag, MEM_freeN, NEAREST_HANDLE_KEY, NEAREST_HANDLE_LEFT, NEAREST_HANDLE_RIGHT, NULL, 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, SIPO_SELCUVERTSONLY, and bAnimContext::sl.
Referenced by graphkeys_clickselect_exec().
|
static |
Definition at line 94 of file graph_select.c.
References tNearestVertInfo::bezt, BEZT_ISSEL_ANY, BLI_addtail(), tNearestVertInfo::ctype, tNearestVertInfo::dist, tNearestVertInfo::fcu, tNearestVertInfo::fpt, tNearestVertInfo::frame, GVERTSEL_TOL, tNearestVertInfo::hpoint, if(), ListBase::last, len_v2v2_int(), MEM_callocN, offset, 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 662 of file graph_select.c.
References KEYFRAME_OK_H1, KEYFRAME_OK_H2, and KEYFRAME_OK_KEY.
Referenced by box_select_graphcurves().
|
static |
Definition at line 681 of file graph_select.c.
References BKE_nla_tweakedit_remap(), INSIDE, NLATIME_CONVERT_UNMAP, offset, blender::meshintersect::prev(), rectf_curve_zone_y(), rctf::xmax, and rctf::xmin.
Referenced by box_select_graphcurves().
|
static |
Definition at line 670 of file graph_select.c.
References ABOVE, BELOW, evaluate_fcurve(), tNearestVertInfo::fcu, INSIDE, offset, rctf::ymax, and rctf::ymin.
Referenced by rectf_curve_intersection().
|
static |
Definition at line 1368 of file graph_select.c.
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::first, if(), bAnimListElem::key_data, MEM_callocN, MEM_freeN, bAnimListElem::next, NULL, and FCurve::totvert.
Referenced by graphkeys_select_less_exec(), and graphkeys_select_more_exec().
|
static |
Definition at line 1116 of file graph_select.c.
Referenced by GRAPH_OT_select_column().
|
static |
Definition at line 1489 of file graph_select.c.
Referenced by GRAPH_OT_select_leftright().