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:
authorRamil Roosileht <Limarest>2022-06-10 12:15:47 +0300
committerSergey Sharybin <sergey@blender.org>2022-06-10 12:17:14 +0300
commit9670c649d86cbc6a54967b5cb91d745595f0884c (patch)
tree369f6274b6393852b5c23e76e21598da2077b4e4 /source/blender/blenkernel/BKE_unit.h
parenta24a28db7b00551effcce2fb7d6de9b3fcdd05c5 (diff)
Fix regression in the recent unit system change
Resolves unit tests failure since the D15085. Also addressed API documentation and formatting format. Differential Revision: https://developer.blender.org/D15162
Diffstat (limited to 'source/blender/blenkernel/BKE_unit.h')
-rw-r--r--source/blender/blenkernel/BKE_unit.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_unit.h b/source/blender/blenkernel/BKE_unit.h
index 823d32f83ba..f051335fc41 100644
--- a/source/blender/blenkernel/BKE_unit.h
+++ b/source/blender/blenkernel/BKE_unit.h
@@ -19,6 +19,10 @@ struct UnitSettings;
*/
size_t BKE_unit_value_as_string_adaptive(
char *str, int len_max, double value, int prec, int system, int type, bool split, bool pad);
+/**
+ * Representation of a value in units. Negative precision is used to disable stripping of zeroes.
+ * This reduces text jumping when changing values.
+ */
size_t BKE_unit_value_as_string(char *str,
int len_max,
double value,