Blender V2.61 - r43446
|
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_dlrbTree.h"
#include "BLI_utildefines.h"
#include "DNA_anim_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "BKE_fcurve.h"
#include "BKE_nla.h"
#include "BKE_context.h"
#include "UI_view2d.h"
#include "ED_anim_api.h"
#include "ED_gpencil.h"
#include "ED_keyframes_draw.h"
#include "ED_keyframes_edit.h"
#include "ED_markers.h"
#include "ED_screen.h"
#include "WM_api.h"
#include "WM_types.h"
#include "action_intern.h"
Go to the source code of this file.
Definition in file action_select.c.
#define FRAME_CLICK_THRESH 0.1f |
Definition at line 894 of file action_select.c.
anonymous enum |
Definition at line 188 of file action_select.c.
void ACTION_OT_clickselect | ( | wmOperatorType * | ot | ) |
Definition at line 1177 of file action_select.c.
References actkeys_clickselect_invoke(), wmOperatorType::description, ED_operator_action_active(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by action_operatortypes().
void ACTION_OT_select_all_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 161 of file action_select.c.
References actkeys_deselectall_exec(), wmOperatorType::description, ED_operator_action_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by action_operatortypes().
void ACTION_OT_select_border | ( | wmOperatorType * | ot | ) |
Definition at line 319 of file action_select.c.
References actkeys_borderselect_exec(), wmOperatorType::cancel, wmOperatorType::description, ED_operator_action_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_boolean(), wmOperatorType::srna, TRUE, WM_border_select_cancel(), WM_border_select_invoke(), WM_border_select_modal(), and WM_operator_properties_gesture_border().
Referenced by action_operatortypes().
void ACTION_OT_select_column | ( | wmOperatorType * | ot | ) |
Definition at line 527 of file action_select.c.
References actkeys_columnselect_exec(), wmOperatorType::description, ED_operator_action_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), and wmOperatorType::srna.
Referenced by action_operatortypes().
void ACTION_OT_select_leftright | ( | wmOperatorType * | ot | ) |
Definition at line 863 of file action_select.c.
References ACTKEYS_LRSEL_TEST, actkeys_select_leftright_exec(), actkeys_select_leftright_invoke(), wmOperatorType::description, ED_operator_action_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_boolean(), RNA_def_enum(), and wmOperatorType::srna.
Referenced by action_operatortypes().
void ACTION_OT_select_less | ( | wmOperatorType * | ot | ) |
Definition at line 696 of file action_select.c.
References actkeys_select_less_exec(), wmOperatorType::description, ED_operator_action_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, and wmOperatorType::poll.
Referenced by action_operatortypes().
void ACTION_OT_select_linked | ( | wmOperatorType * | ot | ) |
Definition at line 585 of file action_select.c.
References actkeys_select_linked_exec(), wmOperatorType::description, ED_operator_action_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, and wmOperatorType::poll.
Referenced by action_operatortypes().
void ACTION_OT_select_more | ( | wmOperatorType * | ot | ) |
Definition at line 662 of file action_select.c.
References actkeys_select_more_exec(), wmOperatorType::description, ED_operator_action_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, and wmOperatorType::poll.
Referenced by action_operatortypes().
static int actkeys_borderselect_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 267 of file action_select.c.
References ACTKEYS_BORDERSEL_ALLKEYS, ACTKEYS_BORDERSEL_CHANNELS, ACTKEYS_BORDERSEL_FRAMERANGE, ANIM_animdata_get_context(), borderselect_action(), deselect_action_keys(), GESTURE_MODAL_SELECT, NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_int_get(), SELECT_ADD, SELECT_SUBTRACT, WM_event_add_notifier(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ACTION_OT_select_border().
static int actkeys_clickselect_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 1145 of file action_select.c.
References ANIM_animdata_get_context(), mouse_action_keys(), wmEvent::mval, NA_SELECTED, NC_ANIMATION, ND_ANIMCHAN, ND_KEYFRAME, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_boolean_get(), SELECT_INVERT, SELECT_REPLACE, and WM_event_add_notifier().
Referenced by ACTION_OT_clickselect().
static int actkeys_columnselect_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 504 of file action_select.c.
References ACTKEYS_COLUMNSEL_MARKERS_BETWEEN, ANIM_animdata_get_context(), columnselect_action_keys(), 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 ACTION_OT_select_column().
static int actkeys_deselectall_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 141 of file action_select.c.
References ANIM_animdata_get_context(), deselect_action_keys(), NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), SELECT_ADD, SELECT_INVERT, and WM_event_add_notifier().
Referenced by ACTION_OT_select_all_toggle().
static void actkeys_mselect_column | ( | bAnimContext * | ac, |
short | select_mode, | ||
float | selx | ||
) | [static] |
Definition at line 920 of file action_select.c.
References ANIM_animdata_filter(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIM_nla_mapping_get(), ANIMCONT_GPENCIL, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_VISIBLE, ANIMFILTER_NODUPLIS, ANIMTYPE_GPLAYER, BEZT_OK_FRAME, BKE_nla_tweakedit_remap(), BLI_freelistN(), bAnimContext::data, bAnimContext::datatype, KeyframeEditData::f1, filter(), ListBase::first, bAnimListElem::key_data, KeyframeEditData::list, bAnimListElem::next, NLATIME_CONVERT_UNMAP, NULL, select_gpencil_frame(), and bAnimListElem::type.
Referenced by mouse_action_keys().
static void actkeys_mselect_single | ( | bAnimContext * | ac, |
bAnimListElem * | ale, | ||
short | select_mode, | ||
float | selx | ||
) | [static] |
Definition at line 899 of file action_select.c.
References bAnimContext::ads, ANIM_animchannel_keyframes_loop(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIMTYPE_GPLAYER, BEZT_OK_FRAME, bAnimListElem::data, KeyframeEditData::f1, NULL, select_gpencil_frame(), and bAnimListElem::type.
Referenced by mouse_action_keys().
static void actkeys_select_leftright | ( | bAnimContext * | ac, |
short | leftright, | ||
short | select_mode | ||
) | [static] |
Definition at line 724 of file action_select.c.
References ACTKEYS_LRSEL_LEFT, ACTKEYS_LRSEL_RIGHT, ANIM_animdata_filter(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIM_nla_mapping_apply_fcurve(), ANIM_nla_mapping_get(), ANIMCONT_GPENCIL, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_VISIBLE, ANIMFILTER_NODUPLIS, ANIMTYPE_GPLAYER, BEZT_OK_FRAMERANGE, BLI_freelistN(), borderselect_gplayer_frames(), CFRA, bAnimContext::data, bAnimListElem::data, bAnimContext::datatype, deselect_action_keys(), ED_animcontext_get_markers(), KeyframeEditData::f1, KeyframeEditData::f2, filter(), ListBase::first, SpaceAction::flag, TimeMarker::flag, TimeMarker::frame, if(), bAnimListElem::key_data, MAXFRAMEF, MINAFRAMEF, TimeMarker::next, bAnimListElem::next, NULL, SACTION_MARKERS_MOVE, bAnimContext::scene, SELECT, SELECT_ADD, SELECT_REPLACE, SELECT_SUBTRACT, bAnimContext::sl, and bAnimListElem::type.
Referenced by actkeys_select_leftright_exec().
static int actkeys_select_leftright_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 806 of file action_select.c.
References ACTKEYS_LRSEL_TEST, actkeys_select_leftright(), ANIM_animdata_get_context(), 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 ACTION_OT_select_leftright(), and actkeys_select_leftright_invoke().
static int actkeys_select_leftright_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 835 of file action_select.c.
References ACTKEYS_LRSEL_LEFT, ACTKEYS_LRSEL_RIGHT, ACTKEYS_LRSEL_TEST, actkeys_select_leftright_exec(), ANIM_animdata_get_context(), bAnimContext::ar, CFRA, wmEvent::mval, NULL, OPERATOR_CANCELLED, wmOperator::ptr, RNA_enum_get(), RNA_enum_set(), bAnimContext::scene, UI_view2d_region_to_view(), and ARegion::v2d.
Referenced by ACTION_OT_select_leftright().
static int actkeys_select_less_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 679 of file action_select.c.
References ANIM_animdata_get_context(), NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, select_moreless_action_keys(), SELMAP_LESS, and WM_event_add_notifier().
Referenced by ACTION_OT_select_less().
static int actkeys_select_linked_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 547 of file action_select.c.
References ANIM_animdata_filter(), ANIM_animdata_get_context(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_VISIBLE, ANIMFILTER_NODUPLIS, BEZT_OK_SELECTED, BLI_freelistN(), 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 ACTION_OT_select_linked().
static int actkeys_select_more_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 645 of file action_select.c.
References ANIM_animdata_get_context(), NA_SELECTED, NC_ANIMATION, ND_KEYFRAME, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, select_moreless_action_keys(), SELMAP_MORE, and WM_event_add_notifier().
Referenced by ACTION_OT_select_more().
static void borderselect_action | ( | bAnimContext * | ac, |
rcti | rect, | ||
short | mode, | ||
short | selectmode | ||
) | [static] |
Definition at line 195 of file action_select.c.
References ACHANNEL_HEIGHT_HALF, ACHANNEL_STEP, ACTKEYS_BORDERSEL_ALLKEYS, ACTKEYS_BORDERSEL_FRAMERANGE, bAnimContext::ads, ANIM_animchannel_keyframes_loop(), ANIM_animdata_filter(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIM_nla_mapping_get(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_CHANNELS, ANIMFILTER_LIST_VISIBLE, ANIMFILTER_NODUPLIS, ANIMTYPE_GPLAYER, bAnimContext::ar, BEZT_OK_FRAMERANGE, BKE_nla_tweakedit_remap(), BLI_freelistN(), borderselect_gplayer_frames(), bAnimContext::data, bAnimListElem::data, bAnimContext::datatype, ELEM, KeyframeEditData::f1, KeyframeEditData::f2, filter(), ListBase::first, bAnimListElem::next, NLATIME_CONVERT_UNMAP, NULL, bAnimListElem::type, UI_view2d_region_to_view(), ARegion::v2d, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by actkeys_borderselect_exec().
static void columnselect_action_keys | ( | bAnimContext * | ac, |
short | mode | ||
) | [static] |
Definition at line 414 of file action_select.c.
References ACTKEYS_COLUMNSEL_CFRA, ACTKEYS_COLUMNSEL_KEYS, ACTKEYS_COLUMNSEL_MARKERS_COLUMN, ANIM_animdata_filter(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIM_nla_mapping_get(), ANIMCONT_GPENCIL, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_VISIBLE, ANIMTYPE_GPLAYER, BEZT_OK_FRAME, bezt_to_cfraelem(), BKE_nla_tweakedit_remap(), BLI_addtail(), BLI_freelistN(), CfraElem::cfra, CFRA, bAnimContext::data, bAnimListElem::data, bAnimContext::datatype, ED_markers_make_cfra_list(), KeyframeEditData::f1, filter(), ListBase::first, gplayer_make_cfra_list(), bAnimListElem::key_data, KeyframeEditData::list, bAnimContext::markers, MEM_callocN(), bAnimListElem::next, CfraElem::next, NLATIME_CONVERT_UNMAP, NULL, bAnimContext::scene, SELECT, SELECT_ADD, select_gpencil_frame(), and bAnimListElem::type.
Referenced by actkeys_columnselect_exec().
static void deselect_action_keys | ( | bAnimContext * | ac, |
short | test, | ||
short | sel | ||
) | [static] |
Definition at line 85 of file action_select.c.
References ANIM_animdata_filter(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIMCONT_GPENCIL, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_VISIBLE, ANIMFILTER_NODUPLIS, ANIMTYPE_GPLAYER, BEZT_OK_SELECTED, BLI_freelistN(), bAnimContext::data, bAnimListElem::data, bAnimContext::datatype, filter(), ListBase::first, is_gplayer_frame_selected(), bAnimListElem::key_data, bAnimListElem::next, NULL, SELECT_SUBTRACT, set_gplayer_frame_selection(), and bAnimListElem::type.
Referenced by actkeys_borderselect_exec(), actkeys_deselectall_exec(), actkeys_select_leftright(), and mouse_action_keys().
static void markers_selectkeys_between | ( | bAnimContext * | ac | ) | [static] |
Definition at line 365 of file action_select.c.
References ANIM_animdata_filter(), ANIM_editkeyframes_ok(), ANIM_editkeyframes_select(), ANIM_fcurve_keyframes_loop(), ANIM_nla_mapping_apply_fcurve(), ANIM_nla_mapping_get(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_VISIBLE, ANIMFILTER_NODUPLIS, ANIMTYPE_GPLAYER, BEZT_OK_FRAMERANGE, BLI_freelistN(), borderselect_gplayer_frames(), bAnimContext::data, bAnimListElem::data, bAnimContext::datatype, ED_markers_get_minmax(), KeyframeEditData::f1, KeyframeEditData::f2, filter(), ListBase::first, bAnimListElem::key_data, bAnimContext::markers, max, min, bAnimListElem::next, NULL, SELECT_ADD, and bAnimListElem::type.
Referenced by actkeys_columnselect_exec().
static void mouse_action_keys | ( | bAnimContext * | ac, |
const int | mval[2], | ||
short | select_mode, | ||
short | column | ||
) | [static] |
Definition at line 965 of file action_select.c.
References ACHANNEL_HEIGHT_HALF, ACHANNEL_SETFLAG_CLEAR, ACHANNEL_STEP, action_to_keylist(), actkeys_mselect_column(), actkeys_mselect_single(), agroup_to_keylist(), AGRP_SELECTED, ALE_ACT, ALE_FCURVE, ALE_OB, ALE_SCE, ANIM_animdata_filter(), ANIM_deselect_anim_channels(), ANIM_nla_mapping_get(), ANIM_set_active_channel(), ANIMCONT_ACTION, ANIMCONT_DOPESHEET, ANIMCONT_GPENCIL, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_CHANNELS, ANIMFILTER_LIST_VISIBLE, ANIMTYPE_FCURVE, ANIMTYPE_GPLAYER, ANIMTYPE_GROUP, ANIMTYPE_SUMMARY, bAnimContext::ar, BKE_nla_tweakedit_remap(), BLI_dlrbTree_free(), BLI_dlrbTree_init(), BLI_findlink(), BLI_freelistN(), BLI_remlink(), ActKeyColumn::cfra, bAnimContext::data, bAnimListElem::data, bAnimContext::datatype, bAnimListElem::datatype, deselect_action_keys(), ELEM, FCURVE_SELECTED, fcurve_to_keylist(), filter(), bGPDlayer::flag, FCurve::flag, bActionGroup::flag, GP_LAYER_SELECT, gpl_to_keylist(), IN_RANGE, bAnimListElem::key_data, ActKeyColumn::left, MEM_freeN(), NLATIME_CONVERT_UNMAP, NULL, ob_to_keylist(), ActKeyColumn::right, DLRBT_Tree::root, scene_to_keylist(), SELECT_ADD, SELECT_REPLACE, SELECT_SUBTRACT, summary_to_keylist(), bAnimListElem::type, UI_view2d_listview_view_to_cell(), UI_view2d_region_to_view(), ARegion::v2d, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by actkeys_clickselect_invoke().
static void select_moreless_action_keys | ( | bAnimContext * | ac, |
short | mode | ||
) | [static] |
Definition at line 603 of file action_select.c.
References ANIM_animdata_filter(), ANIM_editkeyframes_buildselmap(), ANIM_fcurve_keyframes_loop(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_VISIBLE, ANIMFILTER_NODUPLIS, FCurve::bezt, bezt_selmap_flush(), BLI_freelistN(), 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 actkeys_select_less_exec(), and actkeys_select_more_exec().
{ {ACTKEYS_LRSEL_TEST, "CHECK", 0, "Check if Select Left or Right", ""}, {ACTKEYS_LRSEL_LEFT, "LEFT", 0, "Before current frame", ""}, {ACTKEYS_LRSEL_RIGHT, "RIGHT", 0, "After current frame", ""}, {0, NULL, 0, NULL, NULL} }
Definition at line 715 of file action_select.c.
EnumPropertyItem prop_column_select_types[] [static] |
{ {ACTKEYS_COLUMNSEL_KEYS, "KEYS", 0, "On Selected Keyframes", ""}, {ACTKEYS_COLUMNSEL_CFRA, "CFRA", 0, "On Current Frame", ""}, {ACTKEYS_COLUMNSEL_MARKERS_COLUMN, "MARKERS_COLUMN", 0, "On Selected Markers", ""}, {ACTKEYS_COLUMNSEL_MARKERS_BETWEEN, "MARKERS_BETWEEN", 0, "Between Min/Max Selected Markers", ""}, {0, NULL, 0, NULL, NULL} }
Definition at line 352 of file action_select.c.