[Bf-blender-cvs] [3436c41] master: Fix T38739: Simulations, unsupported in the Game Engine, could not be removed from the UI.

Thomas Dinges noreply at git.blender.org
Fri Feb 21 12:46:56 CET 2014


Commit: 3436c41dee284b0338674d07025bf47ddfc3bb10
Author: Thomas Dinges
Date:   Fri Feb 21 12:46:17 2014 +0100
https://developer.blender.org/rB3436c41dee284b0338674d07025bf47ddfc3bb10

Fix T38739: Simulations, unsupported in the Game Engine, could not be removed from the UI.

Also shorten info messages a bit.

===================================================================

M	release/scripts/startup/bl_ui/properties_data_modifier.py
M	release/scripts/startup/bl_ui/properties_freestyle.py
M	source/blender/editors/interface/interface_templates.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 093b7f2..8e3e289 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -237,10 +237,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
             col.prop(md, "use_transform")
 
     def CLOTH(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Physics context")
+        layout.label(text="Settings are inside the Physics tab")
 
     def COLLISION(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Physics context")
+        layout.label(text="Settings are inside the Physics tab")
 
     def CURVE(self, layout, ob, md):
         split = layout.split()
@@ -314,7 +314,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         row.prop(md, "strength")
 
     def DYNAMIC_PAINT(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Physics context")
+        layout.label(text="Settings are inside the Physics tab")
 
     def EDGE_SPLIT(self, layout, ob, md):
         split = layout.split()
@@ -349,7 +349,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         layout.operator("object.explode_refresh", text="Refresh")
 
     def FLUID_SIMULATION(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Physics context")
+        layout.label(text="Settings are inside the Physics tab")
 
     def HOOK(self, layout, ob, md):
         split = layout.split()
@@ -766,7 +766,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.prop(md, "limits", slider=True)
 
     def SMOKE(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Physics context")
+        layout.label(text="Settings are inside the Physics tab")
 
     def SMOOTH(self, layout, ob, md):
         split = layout.split(percentage=0.25)
@@ -784,7 +784,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
 
     def SOFT_BODY(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Physics context")
+        layout.label(text="Settings are inside the Physics tab")
 
     def SOLIDIFY(self, layout, ob, md):
         split = layout.split()
@@ -845,7 +845,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.prop(md, "show_only_control_edges")
 
     def SURFACE(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Physics context")
+        layout.label(text="Settings are inside the Physics tab")
 
     def UV_PROJECT(self, layout, ob, md):
         split = layout.split()
diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py
index 87a0810..197b0d2 100644
--- a/release/scripts/startup/bl_ui/properties_freestyle.py
+++ b/release/scripts/startup/bl_ui/properties_freestyle.py
@@ -60,7 +60,7 @@ class RENDER_PT_freestyle(RenderFreestyleButtonsPanel, Panel):
             layout.prop(rd, "line_thickness")
 
         row = layout.row()
-        row.label(text="Line style settings are found in the Render Layers context")
+        row.label(text="Line style settings are in the Render Layers tab")
         row.operator("wm.properties_context_change", text="", icon='BUTS').context = 'RENDER_LAYER'
 
 
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index e11055f..bbc0b25 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -943,9 +943,9 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
 		
 		uiBlockSetEmboss(block, UI_EMBOSSN);
 		/* When Modifier is a simulation, show button to switch to context rather than the delete button. */
-		if (modifier_can_delete(md) && !modifier_is_simulation(md))
+		if (modifier_can_delete(md) && (!modifier_is_simulation(md) || STREQ(scene->r.engine, "BLENDER_GAME")))
 			uiItemO(row, "", ICON_X, "OBJECT_OT_modifier_remove");
-		if (modifier_is_simulation(md) == 1)
+		else if (modifier_is_simulation(md) == 1)
 			uiItemStringO(row, "", ICON_BUTS, "WM_OT_properties_context_change", "context", "PHYSICS");
 		else if (modifier_is_simulation(md) == 2)
 			uiItemStringO(row, "", ICON_BUTS, "WM_OT_properties_context_change", "context", "PARTICLES");




More information about the Bf-blender-cvs mailing list