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_object.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c
index e47a80fe9fa..ed9b2043924 100644
--- a/source/blender/src/buttons_object.c
+++ b/source/blender/src/buttons_object.c
@@ -2462,11 +2462,21 @@ static void object_softbodies__enable(void *ob_v, void *arg2)
allqueue(REDRAWBUTSEDIT, 0);
}
+static int _can_softbodies_at_all(Object *ob)
+{
+ // list of Yes
+ if ((ob->type==OB_MESH)
+ || (ob->type==OB_CURVE)
+ || (ob->type==OB_LATTICE)
+ ) return 1;
+ // else deny
+ return 0;
+}
static void object_softbodies_II(Object *ob)
{
uiBlock *block;
static int val;
-
+ if(!_can_softbodies_at_all(ob)) return;
block= uiNewBlock(&curarea->uiblocks, "object_softbodies_II", UI_EMBOSS, UI_HELV, curarea->win);
uiNewPanelTabbed("Soft Body", "Physics");
if(uiNewPanel(curarea, block, "Soft Body Collision", "Physics", 651, 0, 318, 204)==0) return;
@@ -2545,9 +2555,9 @@ static void object_softbodies(Object *ob)
uiBlock *block;
static int val;
uiBut *but;
+ if(!_can_softbodies_at_all(ob)) return;
block= uiNewBlock(&curarea->uiblocks, "object_softbodies", UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Soft Body", "Physics", 640, 0, 318, 204)==0) return;
-
uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
val = modifiers_isSoftbodyEnabled(ob);