Blender V2.61 - r43446
|
#include <string.h>
#include <stdio.h>
#include "DNA_anim_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BKE_nla.h"
#include "BKE_context.h"
#include "BKE_screen.h"
#include "ED_anim_api.h"
#include "ED_keyframes_edit.h"
#include "ED_screen.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_view2d.h"
#include "nla_intern.h"
Go to the source code of this file.
Definition in file nla_select.c.
anonymous enum |
Definition at line 92 of file nla_select.c.
anonymous enum |
Definition at line 213 of file nla_select.c.
static void borderselect_nla_strips | ( | bAnimContext * | ac, |
rcti | rect, | ||
short | mode, | ||
short | selectmode | ||
) | [static] |
Definition at line 220 of file nla_select.c.
References ACHANNEL_SET_FLAG, ANIM_animdata_filter(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_CHANNELS, ANIMFILTER_LIST_VISIBLE, ANIMTYPE_NLATRACK, bAnimContext::ar, BKE_nlastrip_within_bounds(), BLI_freelistN(), bAnimListElem::data, bAnimContext::data, bAnimContext::datatype, filter(), ListBase::first, bAnimListElem::next, NLA_BORDERSEL_CHANNELS, NLA_BORDERSEL_FRAMERANGE, NLACHANNEL_STEP, NLASTRIP_FLAG_ACTIVE, NLASTRIP_FLAG_SELECT, NULL, selmodes_to_flagmodes(), bAnimContext::sl, io_export_cycles_xml::strip(), NlaTrack::strips, bAnimListElem::type, UI_view2d_region_to_view(), ARegion::v2d, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by nlaedit_borderselect_exec().
static void deselect_nla_strips | ( | bAnimContext * | ac, |
short | test, | ||
short | sel | ||
) | [static] |
Definition at line 107 of file nla_select.c.
References ACHANNEL_SET_FLAG, ANIM_animdata_filter(), ANIMFILTER_DATA_VISIBLE, BLI_freelistN(), bAnimListElem::data, bAnimContext::data, bAnimContext::datatype, DESELECT_STRIPS_CLEARACTIVE, DESELECT_STRIPS_TEST, filter(), ListBase::first, bAnimListElem::next, NLASTRIP_FLAG_ACTIVE, NLASTRIP_FLAG_SELECT, NULL, SELECT_SUBTRACT, selmodes_to_flagmodes(), io_export_cycles_xml::strip(), and NlaTrack::strips.
Referenced by mouse_nla_strips(), nlaedit_borderselect_exec(), nlaedit_deselectall_exec(), and nlaedit_select_leftright().
static void mouse_nla_strips | ( | bContext * | C, |
bAnimContext * | ac, | ||
const int | mval[2], | ||
short | select_mode | ||
) | [static] |
Definition at line 508 of file nla_select.c.
References ACHANNEL_SET_FLAG, ACHANNEL_SETFLAG_CLEAR, ANIM_animdata_filter(), ANIM_deselect_anim_channels(), ANIM_set_active_channel(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_CHANNELS, ANIMFILTER_LIST_VISIBLE, ANIMTYPE_NLATRACK, bAnimContext::ar, BKE_nlastrip_within_bounds(), BLI_findlink(), BLI_freelistN(), BLI_remlink(), bAnimListElem::data, bAnimContext::data, bAnimContext::datatype, deselect_nla_strips(), DESELECT_STRIPS_CLEARACTIVE, filter(), ListBase::first, NlaTrack::flag, MEM_freeN(), NLACHANNEL_HEIGHT_HALF, NLACHANNEL_STEP, NLASTRIP_FLAG_ACTIVE, NLASTRIP_FLAG_SELECT, NLATRACK_SELECTED, NULL, SCE_NLA_EDIT_ON, bAnimContext::scene, SELECT_ADD, SELECT_REPLACE, SELECT_SUBTRACT, selmodes_to_flagmodes(), bAnimContext::sl, io_export_cycles_xml::strip(), NlaTrack::strips, bAnimListElem::type, UI_view2d_listview_view_to_cell(), UI_view2d_region_to_view(), ARegion::v2d, WM_OP_EXEC_DEFAULT, and WM_operator_name_call().
Referenced by nlaedit_clickselect_invoke().
void NLA_OT_click_select | ( | wmOperatorType * | ot | ) |
Definition at line 646 of file nla_select.c.
References wmOperatorType::description, ED_operator_nla_active(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, nlaedit_clickselect_invoke(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by nla_operatortypes().
void NLA_OT_select_all_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 186 of file nla_select.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, nlaedit_deselectall_exec(), nlaop_poll_tweakmode_off(), OPTYPE_REGISTER, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by nla_operatortypes().
void NLA_OT_select_border | ( | wmOperatorType * | ot | ) |
Definition at line 331 of file nla_select.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, nlaedit_borderselect_exec(), nlaop_poll_tweakmode_off(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, WM_border_select_cancel(), WM_border_select_invoke(), WM_border_select_modal(), and WM_operator_properties_gesture_border().
Referenced by nla_operatortypes().
void NLA_OT_select_leftright | ( | wmOperatorType * | ot | ) |
Definition at line 484 of file nla_select.c.
References wmOperatorType::description, ED_operator_nla_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NLAEDIT_LRSEL_TEST, nlaedit_select_leftright_exec(), nlaedit_select_leftright_invoke(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_boolean(), RNA_def_enum(), and wmOperatorType::srna.
Referenced by nla_operatortypes().
static int nlaedit_borderselect_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 280 of file nla_select.c.
References ANIM_animdata_get_context(), borderselect_nla_strips(), deselect_nla_strips(), DESELECT_STRIPS_TEST, GESTURE_MODAL_SELECT, NA_SELECTED, NC_ANIMATION, ND_NLA, NLA_BORDERSEL_ALLSTRIPS, NLA_BORDERSEL_CHANNELS, NLA_BORDERSEL_FRAMERANGE, 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 NLA_OT_select_border().
static int nlaedit_clickselect_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 613 of file nla_select.c.
References ANIM_animdata_get_context(), mouse_nla_strips(), wmEvent::mval, NA_SELECTED, NC_ANIMATION, ND_NLA, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_boolean_get(), SELECT_INVERT, SELECT_REPLACE, and WM_event_add_notifier().
Referenced by NLA_OT_click_select().
static int nlaedit_deselectall_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 166 of file nla_select.c.
References ANIM_animdata_get_context(), deselect_nla_strips(), DESELECT_STRIPS_NOTEST, DESELECT_STRIPS_TEST, NA_SELECTED, NC_ANIMATION, ND_NLA, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), SELECT_ADD, SELECT_INVERT, and WM_event_add_notifier().
Referenced by NLA_OT_select_all_toggle().
static void nlaedit_select_leftright | ( | bContext * | C, |
bAnimContext * | ac, | ||
short | leftright, | ||
short | select_mode | ||
) | [static] |
Definition at line 368 of file nla_select.c.
References ACHANNEL_SET_FLAG, ANIM_animdata_filter(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_VISIBLE, BKE_nlastrip_within_bounds(), BLI_freelistN(), CFRA, bAnimListElem::data, bAnimContext::data, bAnimContext::datatype, deselect_nla_strips(), filter(), ListBase::first, Scene::flag, MAXFRAMEF, MINAFRAMEF, bAnimListElem::next, NLAEDIT_LRSEL_LEFT, NLASTRIP_FLAG_SELECT, NULL, SCE_NLA_EDIT_ON, bAnimContext::scene, SELECT_ADD, SELECT_REPLACE, SELECT_SUBTRACT, selmodes_to_flagmodes(), io_export_cycles_xml::strip(), NlaTrack::strips, WM_OP_EXEC_DEFAULT, and WM_operator_name_call().
Referenced by nlaedit_select_leftright_exec().
static int nlaedit_select_leftright_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 427 of file nla_select.c.
References ANIM_animdata_get_context(), NA_SELECTED, NC_ANIMATION, ND_ANIMCHAN, ND_KEYFRAME, NLAEDIT_LRSEL_TEST, nlaedit_select_leftright(), NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), SELECT_INVERT, SELECT_REPLACE, and WM_event_add_notifier().
Referenced by NLA_OT_select_leftright(), and nlaedit_select_leftright_invoke().
static int nlaedit_select_leftright_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 456 of file nla_select.c.
References ANIM_animdata_get_context(), bAnimContext::ar, CFRA, wmEvent::mval, NLAEDIT_LRSEL_LEFT, NLAEDIT_LRSEL_RIGHT, NLAEDIT_LRSEL_TEST, nlaedit_select_leftright_exec(), NULL, OPERATOR_CANCELLED, wmOperator::ptr, RNA_enum_get(), RNA_int_set(), bAnimContext::scene, UI_view2d_region_to_view(), and ARegion::v2d.
Referenced by NLA_OT_select_leftright().
static short selmodes_to_flagmodes | ( | short | sel | ) | [static] |
Definition at line 65 of file nla_select.c.
References ACHANNEL_SETFLAG_ADD, ACHANNEL_SETFLAG_CLEAR, ACHANNEL_SETFLAG_INVERT, SELECT_ADD, SELECT_INVERT, and SELECT_SUBTRACT.
Referenced by borderselect_nla_strips(), deselect_nla_strips(), mouse_nla_strips(), and nlaedit_select_leftright().
{ {NLAEDIT_LRSEL_TEST, "CHECK", 0, "Check if Select Left or Right", ""}, {NLAEDIT_LRSEL_LEFT, "LEFT", 0, "Before current frame", ""}, {NLAEDIT_LRSEL_RIGHT, "RIGHT", 0, "After current frame", ""}, {0, NULL, 0, NULL, NULL} }
Definition at line 359 of file nla_select.c.