diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-07-27 15:26:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-07-27 15:36:01 +0300 |
commit | 58eacb8e7c7ae95bf34896d9cdd868e7a11e044e (patch) | |
tree | 7e62d569d7196bbfc20be0b4a5cb3e822eaa8bc4 /source/blender/python/intern/bpy_rna_gizmo.c | |
parent | b1a2abd6b2ba92c0b9134ae72b502a375556a417 (diff) |
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.
Diffstat (limited to 'source/blender/python/intern/bpy_rna_gizmo.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna_gizmo.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |