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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-03-29 13:18:07 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-03-29 13:18:07 +0300
commit0cbf747ffaa64e8e91f7b919d463382aee490169 (patch)
treeb9854f9db20761c33a9ae75f51eaa8c790f7c42f /source/blender/draw/modes/sculpt_mode.c
parent317702310412454bdad8a942f4e02e1ff93c6aa1 (diff)
Draw manager: Make evaluation context a part of context state
This way we don't have to re-initialize the full evaluation context in every area we need it.
Diffstat (limited to 'source/blender/draw/modes/sculpt_mode.c')
-rw-r--r--source/blender/draw/modes/sculpt_mode.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/source/blender/draw/modes/sculpt_mode.c b/source/blender/draw/modes/sculpt_mode.c
index d8c5bae522b..65f4653591f 100644
--- a/source/blender/draw/modes/sculpt_mode.c
+++ b/source/blender/draw/modes/sculpt_mode.c
@@ -193,12 +193,8 @@ static void SCULPT_cache_populate(void *vedata, Object *ob)
if (ob->type == OB_MESH) {
const DRWContextState *draw_ctx = DRW_context_state_get();
- EvaluationContext eval_ctx;
-
- CTX_data_eval_ctx(draw_ctx->evil_C, &eval_ctx);
if (ob->sculpt && (ob == draw_ctx->obact)) {
-
/* XXX, needed for dyntopo-undo (which clears).
* probably depsgraph should handlle? in 2.7x getting derived-mesh does this (mesh_build_data) */
if (ob->sculpt->pbvh == NULL) {
@@ -206,7 +202,7 @@ static void SCULPT_cache_populate(void *vedata, Object *ob)
* but this avoids waiting on first stroke) */
Scene *scene = draw_ctx->scene;
- BKE_sculpt_update_mesh_elements(&eval_ctx, scene, scene->toolsettings->sculpt, ob, false, false);
+ BKE_sculpt_update_mesh_elements(&draw_ctx->eval_ctx, scene, scene->toolsettings->sculpt, ob, false, false);
}
PBVH *pbvh = ob->sculpt->pbvh;