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/blender/src/buttons_logic.c19
-rw-r--r--source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp2
2 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c
index 605568680ba..2cda73eaef3 100644
--- a/source/blender/src/buttons_logic.c
+++ b/source/blender/src/buttons_logic.c
@@ -3068,7 +3068,7 @@ static void check_body_type(void *arg1_but, void *arg2_object)
switch (ob->body_type) {
case OB_BODY_TYPE_SENSOR:
ob->gameflag |= OB_SENSOR|OB_COLLISION|OB_GHOST;
- ob->gameflag &= ~(OB_OCCLUDER|OB_DYNAMIC|OB_RIGID_BODY|OB_ACTOR|OB_ANISOTROPIC_FRICTION|OB_DO_FH|OB_ROT_FH|OB_COLLISION_RESPONSE);
+ ob->gameflag &= ~(OB_OCCLUDER|OB_DYNAMIC|OB_RIGID_BODY|OB_SOFT_BODY|OB_ACTOR|OB_ANISOTROPIC_FRICTION|OB_DO_FH|OB_ROT_FH|OB_COLLISION_RESPONSE);
break;
case OB_BODY_TYPE_OCCLUDER:
ob->gameflag |= OB_OCCLUDER;
@@ -3315,14 +3315,21 @@ static void buttons_bullet(uiBlock *block, Object *ob)
"Object type%t|Occluder%x5|No collision%x0|Sensor%x6|Static%x1|Dynamic%x2|Rigid body%x3|Soft body%x4",
10, 205, 100, 19, &ob->body_type, 0, 0, 0, 0, tip);
uiButSetFunc(but, check_body_type, but, ob);
-
+
+ uiBlockEndAlign(block);
+
+ uiDefButBitS(block, TOG, OB_RESTRICT_RENDER, B_NOP, "Invisible",
+ 210, 205, 60, 19,
+ &ob->restrictflag, 0, 0, 0, 0,
+ "Initializes objects as invisible, this can be toggled by the visibility actuator (uses outliner render option)");
+
if (ob->gameflag & OB_COLLISION) {
if (ob->gameflag & OB_SENSOR) {
uiBlockEndAlign(block);
uiDefBlockBut(block, advanced_bullet_menu, ob,
- "Advanced Settings",
- 210, 205, 140, 19, "Display collision advanced settings");
+ "Advanced",
+ 270, 205, 80, 19, "Display collision advanced settings");
uiBlockBeginAlign(block);
} else {
uiDefButBitI(block, TOG, OB_ACTOR, 0, "Actor",
@@ -3338,8 +3345,8 @@ static void buttons_bullet(uiBlock *block, Object *ob)
//uiBlockSetCol(block, TH_BUT_SETTING1);
uiDefBlockBut(block, advanced_bullet_menu, ob,
- "Advanced Settings",
- 210, 205, 140, 19, "Display collision advanced settings");
+ "Advanced",
+ 270, 205, 80, 19, "Display collision advanced settings");
//uiBlockSetCol(block, TH_BUT_SETTING2);
}
diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
index 73693e68642..d81b6d5a653 100644
--- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
+++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
@@ -1129,8 +1129,6 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj,
// bullet will not synchronize, we must do it explicitely
SG_Callbacks& callbacks = gameobj->GetSGNode()->GetCallBackFunctions();
callbacks.m_updatefunc = KX_GameObject::SynchronizeTransformFunc;
- // make sensor object invisible by default
- gameobj->SetVisible(false, false);
}
// don't add automatically sensor object, they are added when a collision sensor is registered
else if (objprop->m_in_active_layer)