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:
authorCampbell Barton <ideasman42@gmail.com>2018-06-17 15:50:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-17 15:50:42 +0300
commitc7ae7ccfb8d735f05083edadc2b49dd2e11b78b6 (patch)
tree3effedb794b6bbfa0303b9b8be6676820101dd71 /source/blender/editors/animation
parent547e962bf6c12cebf2cd4106ba50f47f9bdf66f9 (diff)
Driver: trailing zeros from expression
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/drivers.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 294cff43c56..f303be0dd76 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -449,6 +449,7 @@ int ANIM_add_driver(ReportList *reports, ID *id, const char rna_path[], int arra
else fval = RNA_property_float_get_index(&ptr, prop, array_index);
BLI_snprintf(expression, maxlen, "%s%.3f", dvar_prefix, fval);
+ BLI_str_rstrip_float_zero(expression, '\0');
}
else if (flag & CREATEDRIVER_WITH_DEFAULT_DVAR) {
BLI_strncpy(expression, "var", maxlen);