test commit
knit picking users complained about available options with non softbody able objects
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user