From 58eacb8e7c7ae95bf34896d9cdd868e7a11e044e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Jul 2021 22:26:33 +1000 Subject: Cleanup: pass sizeof array element to PyC_AsArray Replace the is_double argument which was only used for single/double precision floats. This allows supporting different sized int types more easily. --- source/blender/python/intern/bpy_rna_gizmo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/python/intern/bpy_rna_gizmo.c') diff --git a/source/blender/python/intern/bpy_rna_gizmo.c b/source/blender/python/intern/bpy_rna_gizmo.c index 869019692df..768cc927d5c 100644 --- a/source/blender/python/intern/bpy_rna_gizmo.c +++ b/source/blender/python/intern/bpy_rna_gizmo.c @@ -80,10 +80,10 @@ static void py_rna_gizmo_handler_get_cb(const wmGizmo *UNUSED(gz), } else { if (PyC_AsArray(value, + sizeof(*value), ret, gz_prop->type->array_length, &PyFloat_Type, - false, "Gizmo get callback: ") == -1) { goto fail; } @@ -426,11 +426,11 @@ static PyObject *bpy_gizmo_target_set_value(PyObject *UNUSED(self), PyObject *ar if (array_len != 0) { float *value = BLI_array_alloca(value, array_len); if (PyC_AsArray(value, + sizeof(*value), params.value, gz_prop->type->array_length, &PyFloat_Type, - false, - "Gizmo target property array") == -1) { + "Gizmo target property array: ") == -1) { goto fail; } WM_gizmo_target_property_float_set_array(BPY_context_get(), gz, gz_prop, value); -- cgit v1.2.3