diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-11 16:23:59 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-11 16:25:53 +0400 |
commit | c0a13322cdea417885ce9f88d0b42ff0ef62483c (patch) | |
tree | b2d00ae5c5e4546b6a51b4233d92210fb2961f8d | |
parent | 0203c5f2a2632451f4f56b43135be4108b46b559 (diff) |
Fix T38553: Crash load new level; array modifier using curve length
Since threaded object update we've disabled in-place
curve evaluation (in cases when applying curve modifier
with target curve non-evaluated yet).
This requires game engine to take care of DAG and object
evaluation (currently it's designed to export only objects
it able to render).
This workaround will make sure that curve_cache for curves
is up-to-date.
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index ebd9430401c..c823665c3bb 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -34,6 +34,19 @@ # pragma warning (disable:4786) #endif +/* Since threaded object update we've disabled in-place + * curve evaluation (in cases when applying curve modifier + * with target curve non-evaluated yet). + * + * This requires game engine to take care of DAG and object + * evaluation (currently it's designed to export only objects + * it able to render). + * + * This workaround will make sure that curve_cache for curves + * is up-to-date. + */ +#define THREADED_DAG_WORKAROUND + #include <math.h> #include <vector> #include <algorithm> @@ -143,6 +156,7 @@ extern "C" { #include "BKE_material.h" /* give_current_material */ #include "BKE_image.h" #include "IMB_imbuf_types.h" +#include "BKE_displist.h" extern Material defmaterial; /* material.c */ } @@ -1985,6 +1999,15 @@ static KX_GameObject *gameobject_from_blenderobject( break; } +#ifdef THREADED_DAG_WORKAROUND + case OB_CURVE: + { + if (ob->curve_cache == NULL) { + BKE_displist_make_curveTypes(blenderscene, ob, FALSE); + } + } +#endif + } if (gameobj) { |