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:
authorCampbell Barton <ideasman42@gmail.com>2018-08-09 16:10:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-08-10 01:14:22 +0300
commit3daf5cc1ceb4854ba7ca481b9e2f1a5ed19bd2cb (patch)
tree5c1b49497d66ec2f6fb010e9ff60d29bdcde106f /source/blender/makesrna/intern
parenteb7b450c0c65388758fcec5764a759d3d347c314 (diff)
Gizmo: 2d select now takes region coords
Was taking an event, when only the region coords are needed.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_wm_gizmo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_wm_gizmo.c b/source/blender/makesrna/intern/rna_wm_gizmo.c
index 7a2460a7694..1eee5e5522f 100644
--- a/source/blender/makesrna/intern/rna_wm_gizmo.c
+++ b/source/blender/makesrna/intern/rna_wm_gizmo.c
@@ -111,7 +111,7 @@ static void rna_gizmo_draw_select_cb(
}
static int rna_gizmo_test_select_cb(
- struct bContext *C, struct wmGizmo *gz, const struct wmEvent *event)
+ struct bContext *C, struct wmGizmo *gz, const int location[2])
{
extern FunctionRNA rna_Gizmo_test_select_func;
wmGizmoGroup *gzgroup = gz->parent_gzgroup;
@@ -123,7 +123,7 @@ static int rna_gizmo_test_select_cb(
func = &rna_Gizmo_test_select_func;
RNA_parameter_list_create(&list, &gz_ptr, func);
RNA_parameter_set_lookup(&list, "context", &C);
- RNA_parameter_set_lookup(&list, "event", &event);
+ RNA_parameter_set_lookup(&list, "location", location);
gzgroup->type->ext.call((bContext *)C, &gz_ptr, func, &list);
void *ret;
@@ -966,7 +966,7 @@ static void rna_def_gizmo(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
- parm = RNA_def_pointer(func, "event", "Event", "", "");
+ parm = RNA_def_int_array(func, "location", 2, NULL, INT_MIN, INT_MAX, "Location", "Region coordinates", INT_MIN, INT_MAX);
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
parm = RNA_def_int(func, "intersect_id", 0, 0, INT_MAX, "", "", 0, INT_MAX);
RNA_def_function_return(func, parm);