Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp6
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp10
2 files changed, 8 insertions, 8 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index ad9855586ee..acd425e788a 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -147,6 +147,7 @@ extern "C" {
#include "BKE_customdata.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_DerivedMesh.h"
+#include "BKE_group.h"
#include "BKE_layer.h"
#include "BKE_material.h" /* give_current_material */
#include "BKE_image.h"
@@ -2052,10 +2053,8 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
for (git=tempglist.begin(); git!=tempglist.end(); git++)
{
Group* group = *git;
- GroupObject* go;
- for (go=(GroupObject*)group->gobject.first; go; go=(GroupObject*)go->next)
+ FOREACH_GROUP_OBJECT(group, blenderobject)
{
- Object* blenderobject = go->ob;
if (converter->FindGameObject(blenderobject) == NULL)
{
allblobj.insert(blenderobject);
@@ -2090,6 +2089,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
}
}
}
+ FOREACH_GROUP_OBJECT_END
}
}
}
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index b3061087344..48b50d24975 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -105,6 +105,7 @@
#include "KX_Light.h"
+#include "BKE_group.h"
#include "BLI_task.h"
static void *KX_SceneReplicationFunc(SG_IObject* node,void* gameobj,void* scene)
@@ -720,7 +721,6 @@ void KX_Scene::DupliGroupRecurse(CValue* obj, int level)
KX_GameObject* gameobj;
Object* blgroupobj = groupobj->GetBlenderObject();
Group* group;
- GroupObject *go;
vector<KX_GameObject*> duplilist;
if (!groupobj->GetSGNode() ||
@@ -738,9 +738,9 @@ void KX_Scene::DupliGroupRecurse(CValue* obj, int level)
m_groupGameObjects.clear();
group = blgroupobj->dup_group;
- for (go=(GroupObject*)group->gobject.first; go; go=(GroupObject*)go->next)
+ FOREACH_GROUP_BASE(group, base)
{
- Object* blenderobj = go->ob;
+ Object *blenderobj = base->object;
if (blgroupobj == blenderobj)
// this check is also in group_duplilist()
continue;
@@ -755,13 +755,13 @@ void KX_Scene::DupliGroupRecurse(CValue* obj, int level)
gameobj->SetBlenderGroupObject(blgroupobj);
- if ((blenderobj->lay & group->layer)==0)
- {
+ if ((base->flag & BASE_VISIBLED) == 0) {
// object is not visible in the 3D view, will not be instantiated
continue;
}
m_groupGameObjects.insert(gameobj);
}
+ FOREACH_GROUP_BASE_END
set<CValue*>::iterator oit;
for (oit=m_groupGameObjects.begin(); oit != m_groupGameObjects.end(); oit++)