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-03-02 06:09:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-03-02 06:09:27 +0300
commit4913e47aa0107cbe1daf06e8020a60916ea883a3 (patch)
tree29cf5e0671027f74296d866cff0df66267bd09c8 /source/blender/editors/util
parentb7016e69b3fff44d623f8413f9ebd4f7216a9b9b (diff)
parent7e4c23e4d7a3a27a49930824c822b679416724f6 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/numinput.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c
index 0f3240946fd..a139f0e3c87 100644
--- a/source/blender/editors/util/numinput.c
+++ b/source/blender/editors/util/numinput.c
@@ -478,9 +478,9 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event)
/* At this point, our value has changed, try to interpret it with python (if str is not empty!). */
if (n->str[0]) {
const float val_prev = n->val[idx];
+ double val;
#ifdef WITH_PYTHON
Scene *sce = CTX_data_scene(C);
- double val;
char str_unit_convert[NUM_STR_REP_LEN * 6]; /* Should be more than enough! */
const char *default_unit = NULL;
@@ -506,8 +506,9 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event)
n->val_flag[idx] |= NUM_INVALID;
}
#else /* Very unlikely, but does not harm... */
- n->val[idx] = (float)atof(n->str);
- (void)C;
+ val = atof(n->str);
+ n->val[idx] = (float)val;
+ UNUSED_VARS(C);
#endif /* WITH_PYTHON */
if (n->val_flag[idx] & NUM_NEGATE) {