diff options
author | Jens Ole Wund <bjornmose@gmx.net> | 2007-06-01 04:40:52 +0400 |
---|---|---|
committer | Jens Ole Wund <bjornmose@gmx.net> | 2007-06-01 04:40:52 +0400 |
commit | 9d0f74658001947781cd65d28fb7982b36acd1fd (patch) | |
tree | d2f13946d50b9a892f169a883ef2d12742268bd6 /source/blender/src/buttons_object.c | |
parent | a9640819ffbad25f2730bb89e47ee94c1d89786e (diff) |
test commit
knit picking users complained about available options
with non softbody able objects
Diffstat (limited to 'source/blender/src/buttons_object.c')
-rw-r--r-- | source/blender/src/buttons_object.c | 14 |
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); |