From af0e6b31a5b06521ef541d8e2adc2b0777c880f9 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 15 Nov 2016 16:18:59 +0100 Subject: Depsgraph: Fix frash with iTaSC solver This commit reverts part of a fix for T33275, but things are: - I can not reproduce the original issue at all, so doesn't seem to cause any regressions. - It is really bad idea to do delayed initialization in the threaded environment, it's a straight way to some nasty issues. - We can't do things like this anyway because we go more granular, meaning such a delayed initialization will fail in the case of having several IK solvers (unless they properly accommodate to changed bone head). - Verified the fix with various files from Mango project and all of them seems to work nice with new depednency graph now (old depsgraph has some flickering, but it's not related on DEG itself, but on an environment with lots of proxies and threaded evaluation and it is not a new behavior). --- source/blender/ikplugin/intern/itasc_plugin.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'source/blender/ikplugin/intern/itasc_plugin.cpp') diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index b8ed780397f..d58340965a7 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -1763,20 +1763,15 @@ void itasc_initialize_tree(struct Scene *scene, Object *ob, float ctime) } // if at least one tree, create the scenes from the PoseTree stored in the channels // postpone until execute_tree: this way the pose constraint are included - //if (count) - // create_scene(scene, ob, ctime); - //itasc_update_param(ob->pose); + if (count) + create_scene(scene, ob, ctime); + itasc_update_param(ob->pose); // make sure we don't rebuilt until the user changes something important ob->pose->flag &= ~POSE_WAS_REBUILT; } void itasc_execute_tree(struct Scene *scene, Object *ob, bPoseChannel *pchan_root, float ctime) { - if (!ob->pose->ikdata) { - // IK tree not yet created, no it now - create_scene(scene, ob, ctime); - itasc_update_param(ob->pose); - } if (ob->pose->ikdata) { IK_Data *ikdata = (IK_Data *)ob->pose->ikdata; bItasc *ikparam = (bItasc *) ob->pose->ikparam; -- cgit v1.2.3