Commit: c0a13322cdea417885ce9f88d0b42ff0ef62483c
Author: Sergey Sharybin
Date:   Tue Feb 11 18:23:59 2014 +0600
https://developer.blender.org/rBc0a13322cdea417885ce9f88d0b42ff0ef62483c

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.

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

M       source/gameengine/Converter/BL_BlenderDataConversion.cpp

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

diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp 
b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index ebd9430..c823665 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) 
        {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to