* One more fix for Collada.
authorThomas Dinges <blender@dingto.org>
Tue, 5 Feb 2013 13:16:21 +0000 (13:16 +0000)
committerThomas Dinges <blender@dingto.org>
Tue, 5 Feb 2013 13:16:21 +0000 (13:16 +0000)
source/blender/collada/collada_utils.cpp

index e000e60..58e6301 100644 (file)
@@ -49,6 +49,7 @@ extern "C" {
 #include "BKE_customdata.h"
 #include "BKE_depsgraph.h"
 #include "BKE_object.h"
+#include "BKE_global.h"
 #include "BKE_mesh.h"
 #include "BKE_scene.h"
 #include "BKE_DerivedMesh.h"
@@ -124,7 +125,7 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
 
 Object *bc_add_object(Scene *scene, int type, const char *name)
 {
-       Object *ob = BKE_object_add_only_object(type, name);
+       Object *ob = BKE_object_add_only_object(G.main, type, name);
 
        ob->data = BKE_object_obdata_add_from_type(type);
        ob->lay = scene->lay;