Fix building w/o Python

Also minor cleanup.
This commit is contained in:
2018-03-02 11:09:24 +11:00
parent ec76f38b09
commit 341ab45f7b
5 changed files with 9 additions and 7 deletions

View File

@@ -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,

View File

@@ -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);

View File

@@ -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) {

View File

@@ -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

View File

@@ -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();