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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-07-19 17:48:21 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-07-20 11:22:06 +0300
commitc205de020365eddbbc0f0cde0ad02dda91126807 (patch)
tree7358cf5ace428f2fccff43e25d8c5f091eab87a7 /source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
parent8a42b3909f33d90b065eec2b8eb342df0a1fb659 (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/depsgraph/intern/builder/deg_builder_nodes_rig.cc')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
index 00d7a5da455..043148a0f70 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
@@ -161,7 +161,8 @@ void DepsgraphNodeBuilder::build_rig(Object *object)
build_armature(armature);
/* Rebuild pose if not up to date. */
if (object->pose == NULL || (object->pose->flag & POSE_RECALC)) {
- BKE_pose_rebuild(object, armature);
+ /* By definition, no need to tag depsgraph as dirty from here, so we can pass NULL bmain. */
+ BKE_pose_rebuild(NULL, object, armature);
/* XXX: Without this animation gets lost in certain circumstances
* after loading file. Need to investigate further since it does
* not happen with simple scenes..