diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-07-19 17:48:21 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-07-20 11:22:06 +0300 |
commit | c205de020365eddbbc0f0cde0ad02dda91126807 (patch) | |
tree | 7358cf5ace428f2fccff43e25d8c5f091eab87a7 /source/blender/editors | |
parent | 8a42b3909f33d90b065eec2b8eb342df0a1fb659 (diff) |
Fix T55973: [2.8] Crash when 'apply pose as rest pose' when bone scale is 0,0,0.
`BKE_pose_rebuild()` should (ideally) always trigger a rebuild of the
depsgraph, since it can add or remove posechannels.
This function now takes a Main parameter to ensure that related
depsgraphes are tagged as dirty (kept it optional, for some corner cases).
We should also probably double-check calls to that function, think in
theory it should only be called from depsgraph itself? But for now...
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/armature/armature_utils.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_add.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index 02d45a4e041..c93bfb5d8c3 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -681,7 +681,7 @@ void ED_armature_from_edit(Main *bmain, bArmature *arm) /* so all users of this armature should get rebuilt */ for (obt = bmain->object.first; obt; obt = obt->id.next) { if (obt->data == arm) { - BKE_pose_rebuild(obt, arm); + BKE_pose_rebuild(bmain, obt, arm); } } diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index a8917f4c4aa..8c60dd01e89 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -2222,7 +2222,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, ViewLayer ID_NEW_REMAP_US2(obn->data) else { obn->data = ID_NEW_SET(obn->data, BKE_armature_copy(bmain, obn->data)); - BKE_pose_rebuild(obn, obn->data); + BKE_pose_rebuild(bmain, obn, obn->data); didit = 1; } id_us_min(id); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 324b6eca34a..2c3ff8b6afe 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -360,7 +360,7 @@ static int make_proxy_exec(bContext *C, wmOperator *op) newob = BKE_object_add_from(bmain, scene, view_layer, OB_EMPTY, name, gob ? gob : ob); /* set layers OK */ - BKE_object_make_proxy(newob, ob, gob); + BKE_object_make_proxy(bmain, newob, ob, gob); /* Set back pointer immediately so dependency graph knows that this is * is a proxy and will act accordingly. Otherwise correctness of graph @@ -1809,7 +1809,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer case OB_ARMATURE: DEG_id_tag_update(&ob->id, OB_RECALC_DATA); ob->data = ID_NEW_SET(ob->data, BKE_armature_copy(bmain, ob->data)); - BKE_pose_rebuild(ob, ob->data); + BKE_pose_rebuild(bmain, ob, ob->data); break; case OB_SPEAKER: ob->data = ID_NEW_SET(ob->data, BKE_speaker_copy(bmain, ob->data)); |