[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [10835] trunk/blender/source/blender/src/ buttons_object.c: test commit
Jens Ole Wund (bjornmose)
bjornmose at gmx.net
Fri Jun 1 02:40:52 CEST 2007
Revision: 10835
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10835
Author: bjornmose
Date: 2007-06-01 02:40:52 +0200 (Fri, 01 Jun 2007)
Log Message:
-----------
test commit
knit picking users complained about available options
with non softbody able objects
Modified Paths:
--------------
trunk/blender/source/blender/src/buttons_object.c
Modified: trunk/blender/source/blender/src/buttons_object.c
===================================================================
--- trunk/blender/source/blender/src/buttons_object.c 2007-05-31 20:40:59 UTC (rev 10834)
+++ trunk/blender/source/blender/src/buttons_object.c 2007-06-01 00:40:52 UTC (rev 10835)
@@ -2462,11 +2462,21 @@
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 @@
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);
More information about the Bf-blender-cvs
mailing list