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:
authorHans Goudey <h.goudey@me.com>2021-08-31 17:05:03 +0300
committerHans Goudey <h.goudey@me.com>2021-08-31 17:05:03 +0300
commit37943b00f2cf0cda51bea3f14da6f83a75ca1239 (patch)
treeff7b96344b82fbcdca03958029f54bc6425e6156
parent99b1e8428dde21f4e9836bfbe47d8b7b0f48c014 (diff)
Fix: Output int for precision in UI data as_dict method
This is stored internally and used as an integer, so there is no need to convert it to a float for "as_dict". This was just an oversight.
-rw-r--r--source/blender/python/generic/idprop_py_ui_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/generic/idprop_py_ui_api.c b/source/blender/python/generic/idprop_py_ui_api.c
index 92cc3b8e1dd..7e88e79496b 100644
--- a/source/blender/python/generic/idprop_py_ui_api.c
+++ b/source/blender/python/generic/idprop_py_ui_api.c
@@ -489,7 +489,7 @@ static void idprop_ui_data_to_dict_float(IDProperty *property, PyObject *dict)
Py_DECREF(item);
PyDict_SetItemString(dict, "step", item = PyFloat_FromDouble((double)ui_data->step));
Py_DECREF(item);
- PyDict_SetItemString(dict, "precision", item = PyFloat_FromDouble((double)ui_data->precision));
+ PyDict_SetItemString(dict, "precision", item = PyLong_FromDouble((double)ui_data->precision));
Py_DECREF(item);
if (property->type == IDP_ARRAY) {
PyObject *list = PyList_New(ui_data->default_array_len);