[Bf-blender-cvs] [af0e6b3] master: Depsgraph: Fix frash with iTaSC solver

Sergey Sharybin noreply at git.blender.org
Tue Nov 15 16:25:32 CET 2016


Commit: af0e6b31a5b06521ef541d8e2adc2b0777c880f9
Author: Sergey Sharybin
Date:   Tue Nov 15 16:18:59 2016 +0100
Branches: master
https://developer.blender.org/rBaf0e6b31a5b06521ef541d8e2adc2b0777c880f9

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).

===================================================================

M	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 b8ed780..d583409 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;




More information about the Bf-blender-cvs mailing list