[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38550] branches/soc-2011-pepper/source/ blender/editors: Attempted bugfix: don' t perform any keyframe remapping stuff if

Joshua Leung aligorith at gmail.com
Thu Jul 21 02:07:08 CEST 2011


Revision: 38550
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38550
Author:   aligorith
Date:     2011-07-21 00:07:07 +0000 (Thu, 21 Jul 2011)
Log Message:
-----------
Attempted bugfix: don't perform any keyframe remapping stuff if
rendering, to prevent any race condition problems

I've noticed some weird and random crashes recently while rendering,
which I suspect have been arising from having an Action Editor open
while rendering. Previously only the timeline was patched against
these problems, though the issues may be more widespread. Hence,
solving this problem at the root cause instead.

Modified Paths:
--------------
    branches/soc-2011-pepper/source/blender/editors/animation/anim_draw.c
    branches/soc-2011-pepper/source/blender/editors/space_time/space_time.c

Modified: branches/soc-2011-pepper/source/blender/editors/animation/anim_draw.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/animation/anim_draw.c	2011-07-20 23:33:10 UTC (rev 38549)
+++ branches/soc-2011-pepper/source/blender/editors/animation/anim_draw.c	2011-07-21 00:07:07 UTC (rev 38550)
@@ -38,6 +38,7 @@
 #include "BLI_math.h"
 
 #include "BKE_context.h"
+#include "BKE_global.h"
 #include "BKE_nla.h"
 #include "BKE_object.h"
 
@@ -308,6 +309,9 @@
 	if (ac == NULL)
 		return NULL;
 	
+	/* abort if rendering - we may get some race condition issues... */
+	if (G.rendering) return NULL;
+	
 	/* handling depends on the type of animation-context we've got */
 	if (ale)
 		return ale->adt;
@@ -447,6 +451,9 @@
 	KeyframeEditFunc sel_cb;
 	float fac;
 	
+	/* abort if rendering - we may get some race condition issues... */
+	if (G.rendering) return;
+	
 	/* calculate mapping factor, and abort if nothing to change */
 	fac= ANIM_unit_mapping_get_factor(scene, id, fcu, (flag & ANIM_UNITCONV_RESTORE));
 	if (fac == 1.0f)

Modified: branches/soc-2011-pepper/source/blender/editors/space_time/space_time.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/space_time/space_time.c	2011-07-20 23:33:10 UTC (rev 38549)
+++ branches/soc-2011-pepper/source/blender/editors/space_time/space_time.c	2011-07-21 00:07:07 UTC (rev 38550)
@@ -480,8 +480,7 @@
 	UI_view2d_view_ortho(v2d);
 	
 	/* keyframes */
-	if(!G.rendering) /* ANIM_nla_mapping_apply_fcurve() modifies curve data while rendering, possible race condition */
-		time_draw_keyframes(C, stime, ar);
+	time_draw_keyframes(C, stime, ar);
 	
 	/* markers */
 	UI_view2d_view_orthoSpecial(ar, v2d, 1);




More information about the Bf-blender-cvs mailing list