From 37943b00f2cf0cda51bea3f14da6f83a75ca1239 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 31 Aug 2021 09:05:03 -0500 Subject: 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. --- source/blender/python/generic/idprop_py_ui_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/python/generic') 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); -- cgit v1.2.3