From 74111ac11c0da9f1c5279e80dd5e90c896ff2bac Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 21 Jul 2011 00:07:07 +0000 Subject: 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. --- source/blender/editors/animation/anim_draw.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/editors/animation') diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 22ab419de2e..2c2a8045b64 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -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 @@ AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale) 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 @@ void ANIM_unit_mapping_apply_fcurve (Scene *scene, ID *id, FCurve *fcu, short fl 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) -- cgit v1.2.3