diff options
Diffstat (limited to 'source/gameengine/Converter/BL_BlenderDataConversion.cpp')
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 4309ca6c1ff..2ff9d38dee4 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -325,7 +325,6 @@ bool ConvertMaterial( MFace* mface, MCol* mmcol, int lightlayer, - Object* blenderobj, MTF_localLayer *layers, bool glslmat) { @@ -751,11 +750,11 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* // Determine if we need to make a skinned mesh if (mesh->dvert || mesh->key || ((blenderobj->gameflag & OB_SOFT_BODY) != 0) || BL_ModifierDeformer::HasCompatibleDeformer(blenderobj)) { - meshobj = new BL_SkinMeshObject(mesh, lightlayer); + meshobj = new BL_SkinMeshObject(mesh); skinMesh = true; } else - meshobj = new RAS_MeshObject(mesh, lightlayer); + meshobj = new RAS_MeshObject(mesh); // Extract avaiable layers MTF_localLayer *layers = new MTF_localLayer[MAX_MTFACE]; @@ -860,7 +859,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* if (!bl_mat) bl_mat = new BL_Material(); ConvertMaterial(bl_mat, ma, tface, tfaceName, mface, mcol, - lightlayer, blenderobj, layers, converter->GetGLSLMaterials()); + lightlayer, layers, converter->GetGLSLMaterials()); visible = ((bl_mat->ras_mode & POLY_VIS)!=0); collider = ((bl_mat->ras_mode & COLLIDER)!=0); @@ -1686,8 +1685,7 @@ static KX_GameObject *gameobject_from_blenderobject( Object *ob, KX_Scene *kxscene, RAS_IRenderTools *rendertools, - KX_BlenderSceneConverter *converter, - Scene *blenderscene) + KX_BlenderSceneConverter *converter) { KX_GameObject *gameobj = NULL; @@ -1747,7 +1745,7 @@ static KX_GameObject *gameobject_from_blenderobject( if (bHasModifier) { BL_ModifierDeformer *dcont = new BL_ModifierDeformer((BL_DeformableGameObject *)gameobj, - blenderscene, ob, (BL_SkinMeshObject *)meshobj); + kxscene->GetBlenderScene(), ob, (BL_SkinMeshObject *)meshobj); ((BL_DeformableGameObject*)gameobj)->SetDeformer(dcont); if (bHasShapeKey && bHasArmature) dcont->LoadShapeDrivers(ob->parent); @@ -1786,7 +1784,7 @@ static KX_GameObject *gameobject_from_blenderobject( kxscene, KX_Scene::m_callbacks, ob, - blenderscene // handle + kxscene->GetBlenderScene() // handle ); /* Get the current pose from the armature object and apply it as the rest pose */ break; @@ -1900,7 +1898,6 @@ KX_GameObject* getGameOb(STR_String busc,CListValue* sumolist){ // convert blender objects into ketsji gameobjects void BL_ConvertBlenderObjects(struct Main* maggie, - const STR_String& scenename, KX_Scene* kxscene, KX_KetsjiEngine* ketsjiEngine, e_PhysicsEngine physics_engine, @@ -1913,7 +1910,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie, ) { - Scene *blenderscene = converter->GetBlenderSceneForName(scenename); + Scene *blenderscene = kxscene->GetBlenderScene(); // for SETLOOPER Scene *sce; Base *base; @@ -2005,8 +2002,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie, base->object, kxscene, rendertools, - converter, - blenderscene); + converter); bool isInActiveLayer = (blenderobject->lay & activeLayerBitInfo) !=0; bool addobj=true; @@ -2195,8 +2191,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie, blenderobject, kxscene, rendertools, - converter, - blenderscene); + converter); // this code is copied from above except that // object from groups are never in active layer |