diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-05-26 16:01:08 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-05-26 16:01:08 +0400 |
commit | e5cc9abceb5047b934b3ae8c4aac521d7e82fc00 (patch) | |
tree | a97e64cfcc8f28541facfb127e64cf851401f1e5 /source/gameengine/Converter | |
parent | 05e76c22b08cd2844b25d9c45b25581da78ee7c9 (diff) |
Fix Bug #1309 Disabling Actor leaves Ghost, Dynamic and Rigid Body etc enabled.
Depth sorting for Transparent polygons. Use ZTransp in Material buttons to enable.
This will cause an object's polygons to be sorted (back to front for alpha polygons, front to back for solid polygons.)
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index dbe68b96fac..301c8115162 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -364,8 +364,11 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* bool istriangle = (mface->v4==0); + bool zsort = ma?(ma->mode & MA_ZTRA) != 0:false; - RAS_IPolyMaterial* polymat = rendertools->CreateBlenderPolyMaterial(imastr,false,matnameptr,tile,tilexrep,tileyrep,mode,transp, lightlayer,istriangle,blenderobj,tface); + RAS_IPolyMaterial* polymat = rendertools->CreateBlenderPolyMaterial(imastr, false, matnameptr, + tile, tilexrep, tileyrep, + mode, transp, zsort, lightlayer, istriangle, blenderobj, tface); if (ma) { @@ -698,13 +701,20 @@ void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj, CreateMaterialFromBlenderObject(blenderobject, kxscene); KX_ObjectProperties objprop; - objprop.m_dyna = (blenderobject->gameflag & OB_DYNAMIC) != 0; + if ((objprop.m_isactor = (blenderobject->gameflag & OB_ACTOR)!=0)) + { + objprop.m_dyna = (blenderobject->gameflag & OB_DYNAMIC) != 0; + objprop.m_angular_rigidbody = (blenderobject->gameflag & OB_RIGID_BODY) != 0; + objprop.m_ghost = (blenderobject->gameflag & OB_GHOST) != 0; + } else { + objprop.m_dyna = false; + objprop.m_angular_rigidbody = false; + objprop.m_ghost = false; + } //mmm, for now, taks this for the size of the dynamicobject // Blender uses inertia for radius of dynamic object objprop.m_radius = blenderobject->inertia; - objprop.m_angular_rigidbody = (blenderobject->gameflag & OB_RIGID_BODY) != 0; objprop.m_in_active_layer = (blenderobject->lay & activeLayerBitInfo) != 0; - objprop.m_ghost = (blenderobject->gameflag & OB_GHOST) != 0; objprop.m_dynamic_parent=NULL; objprop.m_isdeformable = ((blenderobject->gameflag2 & 2)) != 0; objprop.m_boundclass = objprop.m_dyna?KX_BOUNDSPHERE:KX_BOUNDMESH; @@ -763,7 +773,6 @@ void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj, } - objprop.m_isactor = (blenderobject->gameflag & OB_ACTOR)!=0; objprop.m_concave = (blenderobject->boundtype & 4) != 0; switch (physics_engine) |