diff options
author | Luca Rood <dev@lucarood.com> | 2017-07-21 12:53:13 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-07-21 15:47:26 +0300 |
commit | 1c4c288727214fa0588d66556a1cdf71755d70b4 (patch) | |
tree | 1433952be7e88cc7d09e8563831995290e3013ce /source/blender/draw/modes/sculpt_mode.c | |
parent | 9edb7e49d7e5e69385f3a0434c568c79fad88cd8 (diff) |
Pass EvaluationContext argument everywhere
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
Diffstat (limited to 'source/blender/draw/modes/sculpt_mode.c')
-rw-r--r-- | source/blender/draw/modes/sculpt_mode.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/draw/modes/sculpt_mode.c b/source/blender/draw/modes/sculpt_mode.c index a3f29b5bb8f..7d2c96dc8de 100644 --- a/source/blender/draw/modes/sculpt_mode.c +++ b/source/blender/draw/modes/sculpt_mode.c @@ -33,6 +33,8 @@ #include "BKE_pbvh.h" #include "BKE_paint.h" +#include "DEG_depsgraph.h" + /* If builtin shaders are needed */ #include "GPU_shader.h" #include "GPU_matrix.h" @@ -191,6 +193,9 @@ 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)) { @@ -201,7 +206,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(scene, scene->toolsettings->sculpt, ob, false, false); + BKE_sculpt_update_mesh_elements(&eval_ctx, scene, scene->toolsettings->sculpt, ob, false, false); } PBVH *pbvh = ob->sculpt->pbvh; |