diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-01 19:06:44 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-01 19:09:09 +0300 |
commit | 9ed522db735b1d798a5d68c6bf547e8123d33a4b (patch) | |
tree | b8e08f92ea02f1a6e73c2883e5f55d296cd3cadf /source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c | |
parent | dbb479b998a63bec22ebc3173b22420c955892dd (diff) |
Fix more cases of evaluated mesh being built for non-COW objects.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c index 46eb3995ea3..464b7b8ad2e 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c @@ -60,6 +60,7 @@ #include "BKE_colortools.h" #include "DEG_depsgraph.h" +#include "DEG_depsgraph_query.h" #include "WM_api.h" #include "WM_types.h" @@ -786,7 +787,10 @@ static int paint_weight_gradient_exec(bContext *C, wmOperator *op) ED_view3d_init_mats_rv3d(ob, ar->regiondata); - Mesh *me_eval = mesh_get_eval_final(depsgraph, scene, ob, scene->customdata_mask | CD_MASK_ORIGINDEX); + Scene *scene_eval = DEG_get_evaluated_scene(depsgraph); + Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); + + Mesh *me_eval = mesh_get_eval_final(depsgraph, scene_eval, ob_eval, scene->customdata_mask | CD_MASK_ORIGINDEX); if (data.is_init) { data.vert_visit = BLI_BITMAP_NEW(me->totvert, __func__); |