diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-06-17 15:52:04 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-06-17 16:00:13 +0400 |
commit | 10af70cef8962744b1509614496861ee9c4a37e0 (patch) | |
tree | 4cc450df7043559b49269c81ec2c98ed59955cc9 /source/blender | |
parent | c40cc0bf6d93bde49f1ae16a663cb504d1a588d3 (diff) |
Support for building without Python
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/idprop.c | 2 | ||||
-rw-r--r-- | source/blender/editors/util/numinput.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c index f12a0720692..3188676fb6c 100644 --- a/source/blender/blenkernel/intern/idprop.c +++ b/source/blender/blenkernel/intern/idprop.c @@ -821,7 +821,7 @@ bool IDP_EqualsProperties_ex(IDProperty *prop1, IDProperty *prop2, const bool is case IDP_INT: return (IDP_Int(prop1) == IDP_Int(prop2)); case IDP_FLOAT: -#ifdef DEBUG +#if defined(DEBUG) && defined(WITH_PYTHON) { float p1 = IDP_Float(prop1); float p2 = IDP_Float(prop2); diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c index ee391af185d..26b9d8b5d71 100644 --- a/source/blender/editors/util/numinput.c +++ b/source/blender/editors/util/numinput.c @@ -256,7 +256,6 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event) short idx = n->idx, idx_max = n->idx_max; short dir = STRCUR_DIR_NEXT, mode = STRCUR_JUMP_NONE; int cur; - double val; switch (event->type) { case EVT_MODAL_MAP: @@ -467,6 +466,7 @@ 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]) { #ifdef WITH_PYTHON + double val; char str_unit_convert[NUM_STR_REP_LEN * 6]; /* Should be more than enough! */ const char *default_unit = NULL; @@ -489,6 +489,7 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event) } #else /* Very unlikely, but does not harm... */ n->val[idx] = (float)atof(n->str); + (void)C; #endif /* WITH_PYTHON */ if (n->val_flag[idx] & NUM_NEGATE) { |