diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-03-02 03:09:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-03-02 03:17:57 +0300 |
commit | 341ab45f7b10e6a84eaceccc40372372106583f7 (patch) | |
tree | b25977878aa626dee3bb8ac73988785243c16d76 /source/blender | |
parent | ec76f38b0902e9effcee0cd96efd07fe6d1d1f4c (diff) |
Fix building w/o Python
Also minor cleanup.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_DerivedMesh.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 2 | ||||
-rw-r--r-- | source/blender/editors/util/numinput.c | 7 | ||||
-rw-r--r-- | source/blender/render/intern/source/external_engine.c | 3 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 2 |
5 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index 700bfe568f1..4d2e9ef8b3c 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -166,7 +166,7 @@ typedef enum DMDirtyFlag { DM_DIRTY_TESS_CDLAYERS = 1 << 0, /* One of the MCOL layers have been updated, force updating of GPUDrawObject's colors buffer. * This is necessary with modern, VBO draw code, as e.g. in vpaint mode me->mcol may be updated - * without actually rebuilding dm (hence by defautl keeping same GPUDrawObject, and same colors + * without actually rebuilding dm (hence by default keeping same GPUDrawObject, and same colors * buffer, which prevents update during a stroke!). */ DM_DIRTY_MCOL_UPDATE_DRAW = 1 << 1, diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 16017d8c250..34cc4809db3 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -2497,7 +2497,7 @@ Mesh *BKE_mesh_new_from_object( ListBase disp = {NULL, NULL}; /* TODO(sergey): This is gonna to work for until EvaluationContext * only contains for_render flag. As soon as CoW is - * implemented, this is to be rethinked. + * implemented, this is to be rethought. */ EvaluationContext eval_ctx; DEG_evaluation_context_init(&eval_ctx, DAG_EVAL_RENDER); 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) { diff --git a/source/blender/render/intern/source/external_engine.c b/source/blender/render/intern/source/external_engine.c index 6277f1ff727..fdf914102b0 100644 --- a/source/blender/render/intern/source/external_engine.c +++ b/source/blender/render/intern/source/external_engine.c @@ -1,11 +1,10 @@ /* - * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 71d6ec673e6..16cc1d44923 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -482,6 +482,8 @@ static void wm_file_read_post(bContext *C, const bool is_startup_file, const boo BPY_python_reset(C); addons_loaded = true; } +#else + UNUSED_VARS(use_userdef); #endif /* WITH_PYTHON */ WM_operatortype_last_properties_clear_all(); |