[Bf-blender-cvs] [bc7d331] master: Don't hide on/off buttons of the Softbody modifier when there's Collision.

Alexander Gavrilov noreply at git.blender.org
Sun Aug 7 15:46:14 CEST 2016


Commit: bc7d33176765c437031fae46330fde8b063e2665
Author: Alexander Gavrilov
Date:   Sun Aug 7 16:45:31 2016 +0300
Branches: master
https://developer.blender.org/rBbc7d33176765c437031fae46330fde8b063e2665

Don't hide on/off buttons of the Softbody modifier when there's Collision.

>From source code history, it seems this behavior is a relic of a very
old limitation when the same object couldn't be both a Softbody and a
Collision object. In those times if somehow both modifiers were added
to an object, Softbody auto-disabled itself and buttons were hidden.

Now however there is no problem having both modifiers on an object,
so there is no point hiding the buttons. The same exact buttons are
available on the physics tab in any case.

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

M	source/blender/editors/interface/interface_templates.c

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

diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 5228377..241da5d 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -874,8 +874,8 @@ static uiLayout *draw_modifier(
 		
 		/* mode enabling buttons */
 		UI_block_align_begin(block);
-		/* Softbody not allowed in this situation, enforce! */
-		if (((md->type != eModifierType_Softbody && md->type != eModifierType_Collision) || !(ob->pd && ob->pd->deflect)) &&
+		/* Collision and Surface are always enabled, hide buttons! */
+		if (((md->type != eModifierType_Collision) || !(ob->pd && ob->pd->deflect)) &&
 		    (md->type != eModifierType_Surface) )
 		{
 			uiItemR(row, &ptr, "show_render", 0, "", ICON_NONE);




More information about the Bf-blender-cvs mailing list