diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-06 13:07:27 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-16 20:55:33 +0300 |
commit | 34ab90f546f097cada951b2c9ca22bf271996980 (patch) | |
tree | ebcdb3d37120ac1d8fb16462b9104badd1800329 /source/blender/editors/armature/armature_skinning.c | |
parent | 0c495005dd83913864acb510c1d4194a2275dbb0 (diff) |
Depsgraph: remove EvaluationContext, pass Depsgraph instead.
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.
This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.
Differential Revision: https://developer.blender.org/D3152
Diffstat (limited to 'source/blender/editors/armature/armature_skinning.c')
-rw-r--r-- | source/blender/editors/armature/armature_skinning.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c index e25056a7a4a..c98eb9218cc 100644 --- a/source/blender/editors/armature/armature_skinning.c +++ b/source/blender/editors/armature/armature_skinning.c @@ -251,7 +251,7 @@ static void envelope_bone_weighting( } static void add_verts_to_dgroups( - ReportList *reports, const EvaluationContext *eval_ctx, Scene *scene, Object *ob, Object *par, + ReportList *reports, Depsgraph *depsgraph, Scene *scene, Object *ob, Object *par, int heat, const bool mirror) { /* This functions implements the automatic computation of vertex group @@ -377,7 +377,7 @@ static void add_verts_to_dgroups( if (wpmode) { /* if in weight paint mode, use final verts from derivedmesh */ - DerivedMesh *dm = mesh_get_derived_final(eval_ctx, scene, ob, CD_MASK_BAREMESH); + DerivedMesh *dm = mesh_get_derived_final(depsgraph, scene, ob, CD_MASK_BAREMESH); if (dm->foreachMappedVert) { mesh_get_mapped_verts_coords(dm, verts, mesh->totvert); @@ -432,7 +432,7 @@ static void add_verts_to_dgroups( } void ED_object_vgroup_calc_from_armature( - ReportList *reports, const EvaluationContext *eval_ctx, Scene *scene, Object *ob, Object *par, + ReportList *reports, Depsgraph *depsgraph, Scene *scene, Object *ob, Object *par, const int mode, const bool mirror) { /* Lets try to create some vertex groups @@ -459,6 +459,6 @@ void ED_object_vgroup_calc_from_armature( * that are populated with the vertices for which the * bone is closest. */ - add_verts_to_dgroups(reports, eval_ctx, scene, ob, par, (mode == ARM_GROUPS_AUTO), mirror); + add_verts_to_dgroups(reports, depsgraph, scene, ob, par, (mode == ARM_GROUPS_AUTO), mirror); } } |