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-02-06 09:06:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-06 10:03:28 +0300
commitc7fecab2efd3b28a18b56dbd321616728d8b7cce (patch)
tree0169ab63925ce3d6730f519a4a54822e7f77c652 /source/blender/modifiers
parentef11113399e3273ee647b3710b346356a2b5f8f0 (diff)
Object Mode: Use eval_ctx mode for drawing, paint & modifiers
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_subsurf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c
index a09923d6dfe..8fd510a6662 100644
--- a/source/blender/modifiers/intern/MOD_subsurf.c
+++ b/source/blender/modifiers/intern/MOD_subsurf.c
@@ -117,7 +117,7 @@ static DerivedMesh *applyModifier(ModifierData *md, const EvaluationContext *eva
subsurf_flags |= SUBSURF_USE_RENDER_PARAMS;
if (isFinalCalc)
subsurf_flags |= SUBSURF_IS_FINAL_CALC;
- if (ob->mode & OB_MODE_EDIT)
+ if (eval_ctx->object_mode & OB_MODE_EDIT)
subsurf_flags |= SUBSURF_IN_EDIT_MODE;
#ifdef WITH_OPENSUBDIV
@@ -132,7 +132,7 @@ static DerivedMesh *applyModifier(ModifierData *md, const EvaluationContext *eva
if (U.opensubdiv_compute_type == USER_OPENSUBDIV_COMPUTE_NONE) {
modifier_setError(md, "OpenSubdiv is disabled in User Preferences");
}
- else if ((ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT)) != 0) {
+ else if ((eval_ctx->object_mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT)) != 0) {
modifier_setError(md, "OpenSubdiv is not supported in paint modes");
}
else if ((DEG_get_eval_flags_for_id(eval_ctx->depsgraph, &ob->id) & DAG_EVAL_NEED_CPU) == 0) {
@@ -143,6 +143,8 @@ static DerivedMesh *applyModifier(ModifierData *md, const EvaluationContext *eva
modifier_setError(md, "OpenSubdiv is disabled due to dependencies");
}
}
+#else
+ UNUSED_VARS(ob);
#endif
result = subsurf_make_derived_from_derived(derivedData, smd, NULL, subsurf_flags);