Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2011-07-29 10:32:30 +0400
committerMitchell Stokes <mogurijin@gmail.com>2011-07-29 10:32:30 +0400
commitb46d8955509e805f06b76a6fd800ecb4edee113b (patch)
tree7ed0b1a3b5d04ab48d3e9062ff02ce54961ecb06 /source/blender/editors/space_action
parent6960127d2609620d52620539388ada5cb466bab2 (diff)
parent26589497529ca3c8da85391d4976d286a371e258 (diff)
Merging r36529-38806bge_components
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r--source/blender/editors/space_action/CMakeLists.txt7
-rw-r--r--source/blender/editors/space_action/action_select.c26
-rw-r--r--source/blender/editors/space_action/space_action.c1
3 files changed, 14 insertions, 20 deletions
diff --git a/source/blender/editors/space_action/CMakeLists.txt b/source/blender/editors/space_action/CMakeLists.txt
index 7c52f4a9efb..edebaa8273a 100644
--- a/source/blender/editors/space_action/CMakeLists.txt
+++ b/source/blender/editors/space_action/CMakeLists.txt
@@ -22,12 +22,15 @@
set(INC
../include
../../blenkernel
- ../../blenloader
../../blenlib
+ ../../blenloader
../../makesdna
../../makesrna
../../windowmanager
../../../../intern/guardedalloc
+)
+
+set(INC_SYS
${GLEW_INCLUDE_PATH}
)
@@ -41,4 +44,4 @@ set(SRC
action_intern.h
)
-blender_add_lib(bf_editor_space_action "${SRC}" "${INC}")
+blender_add_lib(bf_editor_space_action "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index bee872dbe60..4d0043913ab 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -332,6 +332,7 @@ void ACTION_OT_select_border(wmOperatorType *ot)
ot->invoke= WM_border_select_invoke;
ot->exec= actkeys_borderselect_exec;
ot->modal= WM_border_select_modal;
+ ot->cancel= WM_border_select_cancel;
ot->poll= ED_operator_action_active;
@@ -847,20 +848,14 @@ static int actkeys_select_leftright_invoke (bContext *C, wmOperator *op, wmEvent
Scene *scene= ac.scene;
ARegion *ar= ac.ar;
View2D *v2d= &ar->v2d;
-
- int mval[2];
float x;
-
- /* get mouse coordinates (in region coordinates) */
- mval[0]= (event->x - ar->winrct.xmin);
- mval[1]= (event->y - ar->winrct.ymin);
-
+
/* determine which side of the current frame mouse is on */
- UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, NULL);
+ UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, NULL);
if (x < CFRA)
- RNA_int_set(op->ptr, "mode", ACTKEYS_LRSEL_LEFT);
+ RNA_enum_set(op->ptr, "mode", ACTKEYS_LRSEL_LEFT);
else
- RNA_int_set(op->ptr, "mode", ACTKEYS_LRSEL_RIGHT);
+ RNA_enum_set(op->ptr, "mode", ACTKEYS_LRSEL_RIGHT);
}
/* perform selection */
@@ -974,7 +969,7 @@ static void actkeys_mselect_column(bAnimContext *ac, short select_mode, float se
/* ------------------- */
-static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode, short column)
+static void mouse_action_keys (bAnimContext *ac, const int mval[2], short select_mode, short column)
{
ListBase anim_data = {NULL, NULL};
DLRBT_Tree anim_keys;
@@ -1159,7 +1154,6 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
bAnimContext ac;
ARegion *ar;
short selectmode, column;
- int mval[2];
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -1167,11 +1161,7 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
/* get useful pointers from animation context data */
ar= ac.ar;
-
- /* get mouse coordinates (in region coordinates) */
- mval[0]= (event->x - ar->winrct.xmin);
- mval[1]= (event->y - ar->winrct.ymin);
-
+
/* select mode is either replace (deselect all, then add) or add/extend */
if (RNA_boolean_get(op->ptr, "extend"))
selectmode= SELECT_INVERT;
@@ -1182,7 +1172,7 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
column= RNA_boolean_get(op->ptr, "column");
/* select keyframe(s) based upon mouse position*/
- mouse_action_keys(&ac, mval, selectmode, column);
+ mouse_action_keys(&ac, event->mval, selectmode, column);
/* set notifier that keyframe selection (and channels too) have changed */
WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|ND_ANIMCHAN|NA_SELECTED, NULL);
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 10a1fe62cca..7a824e6bf9d 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -58,6 +58,7 @@
#include "UI_view2d.h"
#include "ED_space_api.h"
+#include "ED_screen.h"
#include "ED_anim_api.h"
#include "ED_markers.h"