[Bf-blender-cvs] [ec22327a5f9] blender2.8: Merge branch 'master' into blender2.8
Campbell Barton
noreply at git.blender.org
Mon Jul 2 12:46:33 CEST 2018
Commit: ec22327a5f9af5d23a7b6adaa745828c9a7ddb78
Author: Campbell Barton
Date: Mon Jul 2 12:41:47 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBec22327a5f9af5d23a7b6adaa745828c9a7ddb78
Merge branch 'master' into blender2.8
===================================================================
===================================================================
diff --cc source/blender/editors/screen/screen_ops.c
index c6041d830b1,44467b6a994..7c36ced212b
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@@ -1871,34 -1719,29 +1899,33 @@@ static int area_split_invoke(bContext *
}
else {
ScrEdge *actedge;
+ rcti screen_rect;
- int x, y;
+ int event_co[2];
/* retrieve initial mouse coord, so we can find the active edge */
- if (RNA_struct_property_is_set(op->ptr, "mouse_x"))
- x = RNA_int_get(op->ptr, "mouse_x");
- else
- x = event->x;
-
- if (RNA_struct_property_is_set(op->ptr, "mouse_y"))
- y = RNA_int_get(op->ptr, "mouse_y");
- else
- y = event->x;
+ if (RNA_property_is_set(op->ptr, prop_cursor)) {
+ RNA_property_int_get_array(op->ptr, prop_cursor, event_co);
+ }
+ else {
+ copy_v2_v2_int(event_co, &event->x);
+ }
- actedge = screen_find_active_scredge(sc, winsize_x, winsize_y, event_co[0], event_co[1]);
+ WM_window_screen_rect_calc(win, &screen_rect);
+
- actedge = screen_geom_area_map_find_active_scredge(AREAMAP_FROM_SCREEN(sc), &screen_rect, x, y);
- if (actedge == NULL)
++ actedge = screen_geom_area_map_find_active_scredge(
++ AREAMAP_FROM_SCREEN(sc), &screen_rect, event_co[0], event_co[1]);
+ if (actedge == NULL) {
return OPERATOR_CANCELLED;
+ }
- dir = scredge_is_horizontal(actedge) ? 'v' : 'h';
+ dir = screen_geom_edge_is_horizontal(actedge) ? 'v' : 'h';
- RNA_enum_set(op->ptr, "direction", dir);
+ RNA_property_enum_set(op->ptr, prop_dir, dir);
/* special case, adds customdata, sets defaults */
- if (!area_split_menu_init(C, op))
+ if (!area_split_menu_init(C, op)) {
return OPERATOR_CANCELLED;
-
+ }
}
sd = (sAreaSplitData *)op->customdata;
More information about the Bf-blender-cvs
mailing list