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:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-12-01 19:06:44 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-12-01 19:09:09 +0300
commit9ed522db735b1d798a5d68c6bf547e8123d33a4b (patch)
treeb8e08f92ea02f1a6e73c2883e5f55d296cd3cadf /source/blender/editors/armature/armature_skinning.c
parentdbb479b998a63bec22ebc3173b22420c955892dd (diff)
Fix more cases of evaluated mesh being built for non-COW objects.
Diffstat (limited to 'source/blender/editors/armature/armature_skinning.c')
-rw-r--r--source/blender/editors/armature/armature_skinning.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c
index c68c2720b0b..06385ab0cee 100644
--- a/source/blender/editors/armature/armature_skinning.c
+++ b/source/blender/editors/armature/armature_skinning.c
@@ -53,6 +53,7 @@
#include "BKE_subsurf.h"
#include "DEG_depsgraph.h"
+#include "DEG_depsgraph_query.h"
#include "ED_armature.h"
#include "ED_mesh.h"
@@ -249,7 +250,7 @@ static void envelope_bone_weighting(
}
static void add_verts_to_dgroups(
- ReportList *reports, Depsgraph *depsgraph, Scene *scene, Object *ob, Object *par,
+ ReportList *reports, Depsgraph *depsgraph, Scene *UNUSED(scene), Object *ob, Object *par,
int heat, const bool mirror)
{
/* This functions implements the automatic computation of vertex group
@@ -375,7 +376,9 @@ static void add_verts_to_dgroups(
if (wpmode) {
/* if in weight paint mode, use final verts from evaluated mesh */
- Mesh *me_eval = mesh_get_eval_final(depsgraph, scene, ob, CD_MASK_BAREMESH);
+ 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, CD_MASK_BAREMESH);
BKE_mesh_foreach_mapped_vert_coords_get(me_eval, verts, mesh->totvert);
vertsfilled = 1;