[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51015] trunk/blender/source/blender: Fix #32742: Motion path calculation on linked armatures locks up Blender

Sergey Sharybin sergey.vfx at gmail.com
Wed Oct 3 10:51:05 CEST 2012


Revision: 51015
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51015
Author:   nazgul
Date:     2012-10-03 08:51:05 +0000 (Wed, 03 Oct 2012)
Log Message:
-----------
Fix #32742: Motion path calculation on linked armatures locks up Blender

Issue was happening when linking armature object and making proxy and was
caused by not copying visualization settings in BKE_pose_copy_data.

This lead to deadlocks in motion path drawing code.

After discussion with Campbell decided it is crucial fix since it fixes
bug appearing in really common scenario of using armatures.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/action.c
    trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenkernel/intern/action.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/action.c	2012-10-03 07:35:29 UTC (rev 51014)
+++ trunk/blender/source/blender/blenkernel/intern/action.c	2012-10-03 08:51:05 UTC (rev 51015)
@@ -539,6 +539,7 @@
 	outPose->iksolver = src->iksolver;
 	outPose->ikdata = NULL;
 	outPose->ikparam = MEM_dupallocN(src->ikparam);
+	outPose->avs = src->avs;
 	
 	for (pchan = outPose->chanbase.first; pchan; pchan = pchan->next) {
 		/* TODO: rename this argument... */

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c	2012-10-03 07:35:29 UTC (rev 51014)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2012-10-03 08:51:05 UTC (rev 51015)
@@ -8008,6 +8008,22 @@
 		}
 	}
 
+	/* correction for files saved in blender version when BKE_pose_copy_data
+	 * didn't copy animation visualization, which lead to deadlocks on motion
+	 * path calculation for proxied armatures, see [#32742]
+	 */
+	if (main->versionfile < 264) {
+		Object *ob;
+
+		for (ob = main->object.first; ob; ob = ob->id.next) {
+			if (ob->pose) {
+				if (ob->pose->avs.path_step == 0) {
+					animviz_settings_init(&ob->pose->avs);
+				}
+			}
+		}
+	}
+
 	/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
 	/* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */
 




More information about the Bf-blender-cvs mailing list