From c205de020365eddbbc0f0cde0ad02dda91126807 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 19 Jul 2018 16:48:21 +0200 Subject: 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... --- source/blender/editors/armature/armature_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/armature') 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); } } -- cgit v1.2.3