172 key_hsize = roundf(key_hsize / 2.0f);
177 for (
ActKeyColumn *ak = anim_keys.
root; ak; ak = (ak->cfra < xmin) ? ak->right : ak->left) {
178 if (
IN_RANGE(ak->cfra, xmin, xmax)) {
186 *r_is_selected = (ak->sel &
SELECT) != 0;
209 if (*r_ale !=
NULL) {
211 ac, *r_ale, region_x, r_selx, r_frame, r_found, r_is_selected);
224 ac,
filter, region_x, region_y, &ale, &selx, &frame, &found, &is_selected);
271 for (ale = anim_data.
first; ale; ale = ale->
next) {
297 for (ale = anim_data.
first; ale; ale = ale->
next) {
358 ot->
idname =
"ACTION_OT_select_all";
422 for (masklay =
mask->masklayers.first; masklay; masklay = masklay->
next) {
593 ot->
idname =
"ACTION_OT_select_box";
594 ot->
description =
"Select all keyframes within the specified region";
615 ot->
srna,
"tweak", 0,
"Tweak",
"Operator has been activated using a tweak event");
658 for (masklay =
mask->masklayers.first; masklay; masklay = masklay->
next) {
701 rctf rectf, scaled_rectf;
720 sel_data.
ked.
data = data_lasso;
728 sel_data.
ked.
data = &scaled_rectf;
766 scaled_rectf.
ymin = ymin;
767 scaled_rectf.
ymax = ymax;
827 ot->
name =
"Lasso Select";
828 ot->
description =
"Select keyframe points using lasso selection";
829 ot->
idname =
"ACTION_OT_select_lasso";
873 data.radius_squared = radius * radius;
874 data.rectf_view = &rect_fl;
876 rect_fl.
xmin =
x - radius;
877 rect_fl.
xmax =
x + radius;
878 rect_fl.
ymin =
y - radius;
879 rect_fl.
ymax =
y + radius;
894 ot->
name =
"Circle Select";
895 ot->
description =
"Select keyframe points using circle selection";
896 ot->
idname =
"ACTION_OT_select_circle";
928 "Between Min/Max Selected Markers",
966 for (ale = anim_data.
first; ale; ale = ale->
next) {
1010 for (ale = anim_data.
first; ale; ale = ale->
next) {
1018 for (ale = anim_data.
first; ale; ale = ale->
next) {
1056 for (ale = anim_data.
first; ale; ale = ale->
next) {
1126 ot->
idname =
"ACTION_OT_select_column";
1127 ot->
description =
"Select all keyframes on the specified frame(s)";
1163 for (ale = anim_data.
first; ale; ale = ale->
next) {
1187 ot->
name =
"Select Linked";
1188 ot->
idname =
"ACTION_OT_select_linked";
1189 ot->
description =
"Select keyframes occurring in the same F-Curves as selected ones";
1219 for (ale = anim_data.
first; ale; ale = ale->
next) {
1273 ot->
name =
"Select More";
1274 ot->
idname =
"ACTION_OT_select_more";
1275 ot->
description =
"Select keyframes beside already selected ones";
1310 ot->
name =
"Select Less";
1311 ot->
idname =
"ACTION_OT_select_less";
1312 ot->
description =
"Deselect keyframes on ends of selection islands";
1379 for (ale = anim_data.
first; ale; ale = ale->
next) {
1407 for (marker =
markers->first; marker; marker = marker->
next) {
1496 ot->
name =
"Select Left/Right";
1497 ot->
idname =
"ACTION_OT_select_leftright";
1498 ot->
description =
"Select keyframes to the left or the right of the current frame";
1563 for (ale = anim_data.
first; ale; ale = ale->
next) {
1612 for (ale = anim_data.
first; ale; ale = ale->
next) {
1669 for (ale = anim_data.
first; ale; ale = ale->
next) {
1693 const bool deselect_all,
1695 const bool same_channel,
1696 bool wait_to_deselect_others)
1702 bool is_selected =
false;
1708 ac,
filter, mval[0], mval[1], &ale, &selx, &frame, &found, &is_selected);
1711 wait_to_deselect_others =
false;
1717 if ((select_mode ==
SELECT_REPLACE && found) || (!found && deselect_all)) {
1723 if (wait_to_deselect_others && (!found || is_selected)) {
1793 else if (same_channel) {
1833 const bool wait_to_deselect_others =
RNA_boolean_get(op->
ptr,
"wait_to_deselect_others");
1845 &ac, mval, selectmode, deselect_all, column, channel, wait_to_deselect_others);
1860 ot->
name =
"Select Keyframes";
1861 ot->
idname =
"ACTION_OT_clickselect";
1880 "Toggle keyframe selection instead of leaving newly selected keyframes only");
1886 "Deselect On Nothing",
1887 "Deselect all when nothing under the cursor");
1895 "Select all keyframes that occur on the same frame as the one under the mouse");
1903 "Select all the keyframes in the channel under the mouse");
typedef float(TangentPoint)[2]
void BKE_gpencil_layer_active_set(struct bGPdata *gpd, struct bGPDlayer *active)
struct bGPDlayer * BKE_gpencil_layer_active_get(struct bGPdata *gpd)
void BKE_gpencil_layer_autolock_set(struct bGPdata *gpd, const bool unlock)
float BKE_nla_tweakedit_remap(struct AnimData *adt, float cframe, short mode)
void BLI_dlrbTree_init(DLRBT_Tree *tree)
void BLI_dlrbTree_free(DLRBT_Tree *tree)
void BLI_lasso_boundbox(struct rcti *rect, const int mcoords[][2], const unsigned int mcoords_len)
#define LISTBASE_FOREACH(type, var, list)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
void BLI_rctf_rcti_copy(struct rctf *dst, const struct rcti *src)
#define IN_RANGE(a, b, c)
Object is a sort of wrapper for general info.
#define ACHANNEL_HEIGHT(ac)
#define ACHANNEL_FIRST_TOP(ac)
#define ACHANNEL_STEP(ac)
@ ANIMFILTER_DATA_VISIBLE
@ ANIMFILTER_LIST_VISIBLE
@ ANIMFILTER_LIST_CHANNELS
short(* KeyframeEditFunc)(KeyframeEditData *ked, struct BezTriple *bezt)
void ED_masklayer_frame_select_set(struct MaskLayer *mask_layer, short mode)
void ED_mask_select_frames(struct MaskLayer *mask_layer, short select_mode)
void ED_masklayer_frames_select_region(struct KeyframeEditData *ked, struct MaskLayer *mask_layer, short tool, short select_mode)
void ED_masklayer_frames_select_box(struct MaskLayer *mask_layer, float min, float max, short select_mode)
void ED_mask_select_frame(struct MaskLayer *mask_layer, int selx, short select_mode)
bool ED_masklayer_frame_select_check(struct MaskLayer *mask_layer)
bool ED_operator_action_active(struct bContext *C)
#define SEL_OP_USE_PRE_DESELECT(sel_op)
eSelectOp ED_select_op_modal(const eSelectOp sel_op, const bool is_first)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
Read Guarded memory(de)allocation.
void UI_view2d_listview_view_to_cell(float columnwidth, float rowheight, float startx, float starty, float viewx, float viewy, int *column, int *row)
void UI_view2d_region_to_view_rctf(const struct View2D *v2d, const struct rctf *rect_src, struct rctf *rect_dst) ATTR_NONNULL()
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
float UI_view2d_region_to_view_x(const struct View2D *v2d, float x)
@ ACTKEYS_COLUMNSEL_MARKERS_BETWEEN
@ ACTKEYS_COLUMNSEL_MARKERS_COLUMN
static void deselect_action_keys(bAnimContext *ac, short test, short sel)
static bool actkeys_is_key_at_position(bAnimContext *ac, float region_x, float region_y)
static int actkeys_box_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void ACTION_OT_select_column(wmOperatorType *ot)
static void box_select_elem(BoxSelectData *sel_data, bAnimListElem *ale, float xmin, float xmax, bool summary)
struct BoxSelectData BoxSelectData
void ACTION_OT_select_less(wmOperatorType *ot)
static void actkeys_mselect_channel_only(bAnimContext *ac, bAnimListElem *ale, short select_mode)
static int actkeys_clickselect_exec(bContext *C, wmOperator *op)
static int actkeys_box_select_exec(bContext *C, wmOperator *op)
static void actkeys_list_element_to_keylist(bAnimContext *ac, DLRBT_Tree *anim_keys, bAnimListElem *ale)
static int actkeys_select_linked_exec(bContext *C, wmOperator *UNUSED(op))
static int actkeys_columnselect_exec(bContext *C, wmOperator *op)
static void region_select_action_keys(bAnimContext *ac, const rctf *rectf_view, short mode, short selectmode, void *data)
static int action_circle_select_exec(bContext *C, wmOperator *op)
static const EnumPropertyItem prop_actkeys_leftright_select_types[]
static void actkeys_select_leftright(bAnimContext *ac, short leftright, short select_mode)
static void region_select_elem(RegionSelectData *sel_data, bAnimListElem *ale, bool summary)
static void actkeys_find_key_at_position(bAnimContext *ac, int filter, float region_x, float region_y, bAnimListElem **r_ale, float *r_selx, float *r_frame, bool *r_found, bool *r_is_selected)
static int actkeys_select_leftright_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int actkeys_lassoselect_exec(bContext *C, wmOperator *op)
static int mouse_action_keys(bAnimContext *ac, const int mval[2], short select_mode, const bool deselect_all, const bool column, const bool same_channel, bool wait_to_deselect_others)
void ACTION_OT_select_all(wmOperatorType *ot)
static bAnimListElem * actkeys_find_list_element_at_position(bAnimContext *ac, int filter, float region_x, float region_y)
static int actkeys_deselectall_exec(bContext *C, wmOperator *op)
void ACTION_OT_select_lasso(wmOperatorType *ot)
void ACTION_OT_select_leftright(wmOperatorType *ot)
static void markers_selectkeys_between(bAnimContext *ac)
static void actkeys_mselect_column(bAnimContext *ac, short select_mode, float selx)
static void columnselect_action_keys(bAnimContext *ac, short mode)
static void select_moreless_action_keys(bAnimContext *ac, short mode)
static void actkeys_mselect_single(bAnimContext *ac, bAnimListElem *ale, short select_mode, float selx)
static void box_select_action(bAnimContext *ac, const rcti rect, short mode, short selectmode)
@ ACTKEYS_BORDERSEL_ALLKEYS
@ ACTKEYS_BORDERSEL_CHANNELS
@ ACTKEYS_BORDERSEL_FRAMERANGE
void ACTION_OT_select_linked(wmOperatorType *ot)
static void actkeys_find_key_in_list_element(bAnimContext *ac, bAnimListElem *ale, float region_x, float *r_selx, float *r_frame, bool *r_found, bool *r_is_selected)
static int actkeys_select_leftright_exec(bContext *C, wmOperator *op)
void ACTION_OT_select_box(wmOperatorType *ot)
struct RegionSelectData RegionSelectData
void ACTION_OT_select_circle(wmOperatorType *ot)
void ACTION_OT_clickselect(wmOperatorType *ot)
static const EnumPropertyItem prop_column_select_types[]
static int actkeys_select_less_exec(bContext *C, wmOperator *UNUSED(op))
static int actkeys_select_more_exec(bContext *C, wmOperator *UNUSED(op))
void ACTION_OT_select_more(wmOperatorType *ot)
void ANIM_anim_channels_select_set(bAnimContext *ac, eAnimChannels_SetFlag sel)
void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datatype, eAnimFilter_Flags filter, void *channel_data, eAnim_ChannelType channel_type)
void ANIM_animdata_freelist(ListBase *anim_data)
void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data)
AnimData * ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, bool only_keys)
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, eAnimFilter_Flags filter_mode, void *data, eAnimCont_Types datatype)
void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short only_sel)
void ED_markers_get_minmax(ListBase *markers, short sel, float *r_first, float *r_last)
ListBase * ED_animcontext_get_markers(const bAnimContext *ac)
void ED_gpencil_layer_frame_select_set(bGPDlayer *gpl, short mode)
void ED_gpencil_select_frames(bGPDlayer *gpl, short select_mode)
void ED_gpencil_select_frame(bGPDlayer *gpl, int selx, short select_mode)
void ED_gpencil_layer_frames_select_region(KeyframeEditData *ked, bGPDlayer *gpl, short tool, short select_mode)
void ED_gpencil_layer_frames_select_box(bGPDlayer *gpl, float min, float max, short select_mode)
void ED_gpencil_layer_make_cfra_list(bGPDlayer *gpl, ListBase *elems, bool onlysel)
bool ED_gpencil_layer_frame_select_check(bGPDlayer *gpl)
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
const vector< Marker > & markers
void scene_to_keylist(bDopeSheet *ads, Scene *sce, DLRBT_Tree *keys, int saction_flag)
void agroup_to_keylist(AnimData *adt, bActionGroup *agrp, DLRBT_Tree *keys, int saction_flag)
void mask_to_keylist(bDopeSheet *UNUSED(ads), MaskLayer *masklay, DLRBT_Tree *keys)
void action_to_keylist(AnimData *adt, bAction *act, DLRBT_Tree *keys, int saction_flag)
void summary_to_keylist(bAnimContext *ac, DLRBT_Tree *keys, int saction_flag)
void ob_to_keylist(bDopeSheet *ads, Object *ob, DLRBT_Tree *keys, int saction_flag)
void gpl_to_keylist(bDopeSheet *UNUSED(ads), bGPDlayer *gpl, DLRBT_Tree *keys)
void fcurve_to_keylist(AnimData *adt, FCurve *fcu, DLRBT_Tree *keys, int saction_flag)
short bezt_selmap_flush(KeyframeEditData *ked, BezTriple *bezt)
KeyframeEditFunc ANIM_editkeyframes_select(short selectmode)
short bezt_to_cfraelem(KeyframeEditData *ked, BezTriple *bezt)
KeyframeEditFunc ANIM_editkeyframes_buildselmap(short mode)
short ANIM_animchannel_keyframes_loop(KeyframeEditData *ked, bDopeSheet *ads, bAnimListElem *ale, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb)
short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb)
KeyframeEditFunc ANIM_editkeyframes_ok(short mode)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
int RNA_int_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
KeyframeEditFunc select_cb
eKeyframeIterFlags iterflags
KeyframeEditFunc select_cb
struct bAnimListElem * next
struct bAnimListElem * prev
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
bool WM_gesture_is_modal_first(const wmGesture *gesture)
void WM_gesture_box_cancel(bContext *C, wmOperator *op)
int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_circle_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void WM_gesture_circle_cancel(bContext *C, wmOperator *op)
int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_circle_modal(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_lasso_modal(bContext *C, wmOperator *op, const wmEvent *event)
void WM_gesture_lasso_cancel(bContext *C, wmOperator *op)
int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, const wmEvent *event)
const int(* WM_gesture_lasso_path_to_array(bContext *UNUSED(C), wmOperator *op, int *r_mcoords_len))[2]
void WM_operator_properties_border_to_rcti(struct wmOperator *op, rcti *rect)
void WM_operator_properties_gesture_box(wmOperatorType *ot)
void WM_operator_properties_select_operation_simple(wmOperatorType *ot)
void WM_operator_properties_generic_select(wmOperatorType *ot)
void WM_operator_properties_gesture_lasso(wmOperatorType *ot)
void WM_operator_properties_gesture_circle(wmOperatorType *ot)
void WM_operator_properties_select_all(wmOperatorType *ot)
int WM_generic_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int WM_generic_select_modal(bContext *C, wmOperator *op, const wmEvent *event)