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:
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 1fb30925446..af768050bb6 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -2608,6 +2608,9 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
bConstraint *curcon;
conlist = get_active_constraints2(blenderobject);
+ if((gameobj->GetLayer()&activeLayerBitInfo)==0)
+ continue;
+
if (conlist) {
for (curcon = (bConstraint *)conlist->first; curcon; curcon=(bConstraint *)curcon->next) {
if (curcon->type==CONSTRAINT_TYPE_RIGIDBODYJOINT){
@@ -2621,7 +2624,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
if (dat->tar)
{
KX_GameObject *gotar=getGameOb(dat->tar->id.name+2,sumolist);
- if (gotar && gotar->GetPhysicsController())
+ if (gotar && ((gotar->GetLayer()&activeLayerBitInfo)!=0) && gotar->GetPhysicsController())
physctr2 = (PHY_IPhysicsController*) gotar->GetPhysicsController()->GetUserData();
}