Blender V5.3
graph_select.cc File Reference
#include <cfloat>
#include <cstdlib>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "BLI_lasso_2d.hh"
#include "BLI_listbase.hh"
#include "BLI_math_vector_c.hh"
#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  blender::tNearestVertInfo

Namespaces

namespace  blender
 BMesh Iterators.

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 blender::deselect_graph_keys (bAnimContext *ac, bool test, eEditKeyframes_Select sel, bool do_channels)
static wmOperatorStatus blender::graphkeys_deselectall_exec (bContext *C, wmOperator *op)
void blender::GRAPH_OT_select_all (wmOperatorType *ot)
Select Linked Operator
static wmOperatorStatus blender::graphkeys_select_linked_exec (bContext *C, wmOperator *)
void blender::GRAPH_OT_select_linked (wmOperatorType *ot)
Select More/Less Operators
static void blender::select_moreless_graph_keys (bAnimContext *ac, short mode)
static wmOperatorStatus blender::graphkeys_select_more_exec (bContext *C, wmOperator *)
void blender::GRAPH_OT_select_more (wmOperatorType *ot)
static wmOperatorStatus blender::graphkeys_select_less_exec (bContext *C, wmOperator *)
void blender::GRAPH_OT_select_less (wmOperatorType *ot)
Mouse-Click Select Operator

This operator works in one of three ways:

  • 1) keyframe under mouse - no special modifiers
  • 2) all keyframes on the same side of current frame indicator as mouse - ALT modifier
  • 3) column select all keyframes in frame under mouse - CTRL modifier

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 blender::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 blender::graphkeys_mselect_column (bAnimContext *ac, const int mval[2], eEditKeyframes_Select select_mode, bool wait_to_deselect_others)
Click Select Operator
static wmOperatorStatus blender::graphkeys_clickselect_exec (bContext *C, wmOperator *op)
void blender::GRAPH_OT_clickselect (wmOperatorType *ot)

Internal Keyframe Utilities

#define GVERTSEL_TOL   (10 * U.pixelsize)
enum  blender::eGraphVertIndex { blender::NEAREST_HANDLE_LEFT = -1 , blender::NEAREST_HANDLE_KEY , blender::NEAREST_HANDLE_RIGHT }
static bool blender::fcurve_handle_sel_check (SpaceGraph *sipo, BezTriple *bezt)
static void blender::nearest_fcurve_vert_store (ListBaseT< tNearestVertInfo > *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 blender::get_nearest_fcurve_verts_list (bAnimContext *ac, const int mval[2], ListBaseT< tNearestVertInfo > *matches)
static tNearestVertInfo * blender::get_best_nearest_fcurve_vert (ListBaseT< tNearestVertInfo > *matches)
static tNearestVertInfo * blender::find_nearest_fcurve_vert (bAnimContext *ac, const int mval[2])

Box Select Operator

#define ABOVE   1
#define INSIDE   0
#define BELOW   -1
static rctf blender::initialize_box_select_coords (const bAnimContext *ac, const rctf *rectf_view)
static int blender::initialize_animdata_selection_filter ()
static ListBaseT< bAnimListElem > blender::initialize_box_select_anim_data (const int filter, bAnimContext *ac)
static void blender::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 blender::box_select_graphkeys (bAnimContext *ac, const rctf *rectf_view, short mode, eEditKeyframes_Select selectmode, bool incl_handles, void *data)
static short blender::ok_bezier_always_ok (KeyframeEditData *, BezTriple *)
static int blender::rectf_curve_zone_y (const FCurve *fcu, const rctf *rectf, const float offset, const float unit_scale, const float eval_x)
static bool blender::rectf_curve_intersection (const float offset, const float unit_scale, const rctf *rectf, bAnimListElem *ale, const FCurve *fcu)
static void blender::box_select_graphcurves (bAnimContext *ac, const rctf *rectf_view, const short mode, const eEditKeyframes_Select selectmode, const bool incl_handles, void *data)
static wmOperatorStatus blender::graphkeys_box_select_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus blender::graphkeys_box_select_exec (bContext *C, wmOperator *op)
void blender::GRAPH_OT_select_box (wmOperatorType *ot)
static wmOperatorStatus blender::graphkeys_lassoselect_exec (bContext *C, wmOperator *op)
void blender::GRAPH_OT_select_lasso (wmOperatorType *ot)
static wmOperatorStatus blender::graph_circle_select_exec (bContext *C, wmOperator *op)
void blender::GRAPH_OT_select_circle (wmOperatorType *ot)

Column Select Operator

This operator works in one of four ways:

  • 1) select all keyframes in the same frame as a selected one (KKEY)
  • 2) select all keyframes in the same frame as the current frame marker (CTRL-KKEY)
  • 3) select all keyframes in the same frame as a selected markers (SHIFT-KKEY)
  • 4) select all keyframes that occur between selected markers (ALT-KKEY)
static const EnumPropertyItem blender::prop_column_select_types []
static void blender::markers_selectkeys_between (bAnimContext *ac)
static void blender::columnselect_graph_keys (bAnimContext *ac, short mode)
static wmOperatorStatus blender::graphkeys_columnselect_exec (bContext *C, wmOperator *op)
void blender::GRAPH_OT_select_column (wmOperatorType *ot)

Select Left/Right Operator

Select keyframes left/right of the current frame indicator.

static const EnumPropertyItem blender::prop_graphkeys_leftright_select_types []
static void blender::graphkeys_select_leftright (bAnimContext *ac, short leftright, eEditKeyframes_Select select_mode)
static wmOperatorStatus blender::graphkeys_select_leftright_exec (bContext *C, wmOperator *op)
static wmOperatorStatus blender::graphkeys_select_leftright_invoke (bContext *C, wmOperator *op, const wmEvent *event)
void blender::GRAPH_OT_select_leftright (wmOperatorType *ot)

Key/handles Selection Operator

static const EnumPropertyItem blender::prop_graphkeys_select_key_handles_actions []
static void blender::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 blender::graphkeys_select_key_handles_exec (bContext *C, wmOperator *op)
void blender::GRAPH_OT_select_key_handles (wmOperatorType *ot)

Macro Definition Documentation

◆ ABOVE

#define ABOVE   1

Definition at line 687 of file graph_select.cc.

Referenced by blender::rectf_curve_zone_y().

◆ BELOW

#define BELOW   -1

Definition at line 689 of file graph_select.cc.

Referenced by blender::rectf_curve_zone_y().

◆ GVERTSEL_TOL

#define GVERTSEL_TOL   (10 * U.pixelsize)

Definition at line 76 of file graph_select.cc.

Referenced by blender::nearest_fcurve_vert_store().

◆ INSIDE

#define INSIDE   0