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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-01-08 20:04:10 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-01-08 20:05:05 +0400
commitd5c9b509ec0e06318186f25212ffb2ba12177692 (patch)
tree53df5a913b0e5d0c5f944bd9bd07ae752036b183 /source/blender/editors/include
parent8305fd8841440f4498758b6f218483cd6db363a9 (diff)
Fix issues with float precision in numinput, like 'R 123' who would show additional 'noise' digits.
Expose float precision helper in UI_interface.h API, so that numinput can use this helper as numbuttons already do. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D186
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/UI_interface.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 735e7f35d61..10a4b383694 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -941,4 +941,9 @@ void UI_template_fix_linking(void);
bool UI_editsource_enable_check(void);
void UI_editsource_active_but_test(uiBut *but);
+/* Float precision helpers */
+#define UI_PRECISION_FLOAT_MAX 7
+
+int uiFloatPrecisionCalc(int prec, double value);
+
#endif /* __UI_INTERFACE_H__ */