Fix T61107: wmGizmo.test_select can't return -1

This is used to skip selection.
This commit is contained in:
Campbell Barton 2019-02-05 18:38:31 +11:00
parent 49618b0e18
commit 999f3985c0
Notes: blender-bot 2023-02-21 17:59:30 +01:00
Referenced by issue #61107, Python callback `wmGizmo.test_select` doesn't allow return of negative values.
1 changed files with 1 additions and 1 deletions

View File

@ -1015,7 +1015,7 @@ static void rna_def_gizmo(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
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);
parm = RNA_def_int(func, "intersect_id", -1, -1, INT_MAX, "", "Use -1 to skip this gizmo", -1, INT_MAX);
RNA_def_function_return(func, parm);
/* wmGizmo.handler */