diff options
Diffstat (limited to 'source/gameengine/Converter')
5 files changed, 36 insertions, 24 deletions
diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index a5af525e13a..049fd49cab9 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -138,7 +138,8 @@ static void game_copy_pose(bPose **dst, bPose *src, int copy_constraint) if (pchan->prop) pchan->prop= IDP_CopyProperty(pchan->prop); #endif - pchan->prop= NULL; + pchan->prop = NULL; + pchan->draw_data = NULL; } BLI_ghash_free(ghash, NULL, NULL); @@ -469,6 +470,8 @@ bool BL_ArmatureObject::UnlinkObject(SCA_IObject* clientobj) void BL_ArmatureObject::ApplyPose() { + /* TODO: This doesn't work currently because of eval_ctx. */ +#if 0 m_armpose = m_objArma->pose; m_objArma->pose = m_pose; // in the GE, we use ctime to store the timestep @@ -491,6 +494,7 @@ void BL_ArmatureObject::ApplyPose() } m_lastapplyframe = m_lastframe; } +#endif } void BL_ArmatureObject::RestorePose() diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 4751e60996d..acd425e788a 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -45,7 +45,9 @@ * This workaround will make sure that curve_cache for curves * is up-to-date. */ -#define THREADED_DAG_WORKAROUND + +/* TODO: Disabled for now, because of eval_ctx. */ +//#define THREADED_DAG_WORKAROUND #include <math.h> #include <vector> @@ -145,6 +147,8 @@ 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" #include "IMB_imbuf_types.h" @@ -589,17 +593,17 @@ static bool ConvertMaterial( /* In Multitexture use the face texture if and only if * it is set in the buttons * In GLSL is not working yet :/ 3.2011 */ - bool facetex = false; - if (validface && mat->mode & MA_FACETEXTURE) { - facetex = true; - } // foreach MTex for (int i = 0; i < MAXTEX; i++) { // use face tex - if (i == 0 && facetex ) { - facetex = false; + if (i == 0) { +#if 0 Image *tmp = (Image *)(tface->tpage); +#else + /* weak but better then nothing */ + Image *tmp = mat ? mat->edit_image : NULL; +#endif if (tmp) { material->img[i] = tmp; @@ -789,7 +793,11 @@ static bool ConvertMaterial( // check for tface tex to fallback on if (validface) { +#if 0 material->img[0] = (Image *)(tface->tpage); +#else + material->img[0] = mat ? mat->edit_image : NULL; +#endif // ------------------------ if (material->img[0]) { material->texname[0] = material->img[0]->id.name; @@ -830,7 +838,7 @@ static bool ConvertMaterial( /* No material, what to do? let's see what is in the UV and set the material accordingly * light and visible is always on */ if (validface) { - material->tile = tface->tile; + /* nop */ } else { // nothing at all @@ -869,13 +877,6 @@ static bool ConvertMaterial( if (validmat) { material->matname =(mat->id.name); } - - if (tface) { - ME_MTEXFACE_CPY(&material->mtexpoly, tface); - } - else { - memset(&material->mtexpoly, 0, sizeof(material->mtexpoly)); - } material->material = mat; return true; } @@ -894,7 +895,7 @@ static RAS_MaterialBucket *material_from_mesh(Material *ma, MFace *mface, MTFace ConvertMaterial(bl_mat, ma, tface, tfaceName, mface, mcol, converter->GetGLSLMaterials()); - if (ma && (ma->mode & MA_FACETEXTURE) == 0) + if (ma) converter->CacheBlenderMaterial(scene, ma, bl_mat); } @@ -910,7 +911,7 @@ static RAS_MaterialBucket *material_from_mesh(Material *ma, MFace *mface, MTFace kx_blmat->Initialize(scene, bl_mat, (ma?&ma->game:NULL), lightlayer); polymat = static_cast<RAS_IPolyMaterial*>(kx_blmat); - if (ma && (ma->mode & MA_FACETEXTURE) == 0) + if (ma) converter->CachePolyMaterial(scene, ma, polymat); } @@ -1740,7 +1741,7 @@ static void blenderSceneSetBackground(Scene *blenderscene) for (SETLOOPER(blenderscene, it, base)) { base->object->lay = base->lay; - base->object->flag = base->flag; + BKE_scene_object_base_flag_sync_from_base(base); } } @@ -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/Converter/BL_ModifierDeformer.cpp b/source/gameengine/Converter/BL_ModifierDeformer.cpp index b40fb7a9f47..3be2c1aff43 100644 --- a/source/gameengine/Converter/BL_ModifierDeformer.cpp +++ b/source/gameengine/Converter/BL_ModifierDeformer.cpp @@ -133,6 +133,8 @@ bool BL_ModifierDeformer::HasArmatureDeformer(Object *ob) // return a deformed mesh that supports mapping (with a valid CD_ORIGINDEX layer) struct DerivedMesh* BL_ModifierDeformer::GetPhysicsMesh() { + /* TODO: This doesn't work currently because of eval_ctx. */ +#if 0 /* we need to compute the deformed mesh taking into account the current * shape and skin deformers, we cannot just call mesh_create_derived_physics() * because that would use the m_transvers already deformed previously by BL_ModifierDeformer::Update(), @@ -152,10 +154,14 @@ struct DerivedMesh* BL_ModifierDeformer::GetPhysicsMesh() /* m_transverts is correct here (takes into account deform only modifiers) */ /* the derived mesh returned by this function must be released by the caller !!! */ return dm; +#endif + return NULL; } bool BL_ModifierDeformer::Update(void) { + /* TODO: This doesn't work currently because of eval_ctx. */ +#if 0 bool bShapeUpdate = BL_ShapeDeformer::Update(); if (bShapeUpdate || m_lastModifierUpdate != m_gameobj->GetLastFrame()) { @@ -208,6 +214,8 @@ bool BL_ModifierDeformer::Update(void) } } return bShapeUpdate; +#endif + return false; } bool BL_ModifierDeformer::Apply(RAS_IPolyMaterial *mat) diff --git a/source/gameengine/Converter/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt index 4db9fcebd06..7d6195e3c38 100644 --- a/source/gameengine/Converter/CMakeLists.txt +++ b/source/gameengine/Converter/CMakeLists.txt @@ -113,7 +113,7 @@ if(WITH_BULLET) endif() if(WITH_AUDASPACE) - add_definitions(${AUDASPACE_DEFINITIONS}) + add_definitions(-DWITH_AUDASPACE) list(APPEND INC_SYS ${AUDASPACE_C_INCLUDE_DIRS} diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index 974dcbca95b..d78ea4eed54 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -42,7 +42,7 @@ #include "KX_ConvertActuators.h" #ifdef WITH_AUDASPACE -# include AUD_SOUND_H +# include <AUD_Sound.h> #endif // Actuators |