diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/drawview.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index 27c6e08418a..5069b5b5955 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -63,6 +63,7 @@ #include "DNA_image_types.h" #include "DNA_lattice_types.h" #include "DNA_mesh_types.h" +#include "DNA_meta_types.h" #include "DNA_object_types.h" #include "DNA_screen_types.h" #include "DNA_texture_types.h" @@ -1282,7 +1283,27 @@ static void v3d_editarmature_buts(uiBlock *block, Object *ob, float lim) } - +static void v3d_editmetaball_buts(uiBlock *block, Object *ob, float lim) +{ + extern MetaElem *lastelem; + + uiBlockBeginAlign(block); + uiDefButF(block, NUM, B_RECALCMBALL, "LocX:", 10, 70, 140, 19, &lastelem->x, -lim, lim, 100, 3, ""); + uiDefButF(block, NUM, B_RECALCMBALL, "LocY:", 10, 50, 140, 19, &lastelem->y, -lim, lim, 100, 3, ""); + uiDefButF(block, NUM, B_RECALCMBALL, "LocZ:", 10, 30, 140, 19, &lastelem->z, -lim, lim, 100, 3, ""); + + uiBlockBeginAlign(block); + if(lastelem->type!=MB_BALL) + uiDefButF(block, NUM, B_RECALCMBALL, "dx:", 160, 70, 140, 19, &lastelem->expx, 0, lim, 100, 3, ""); + if((lastelem->type!=MB_BALL) && (lastelem->type!=MB_TUBE)) + uiDefButF(block, NUM, B_RECALCMBALL, "dy:", 160, 50, 140, 19, &lastelem->expy, 0, lim, 100, 3, ""); + if((lastelem->type==MB_ELIPSOID) || (lastelem->type==MB_CUBE)) + uiDefButF(block, NUM, B_RECALCMBALL, "dz:", 160, 30, 140, 19, &lastelem->expz, 0, lim, 100, 3, ""); + + uiBlockEndAlign(block); + + uiDefButF(block, NUM, B_RECALCMBALL, "Stiffness:", 10, 100, 140, 19, &lastelem->s, 0, lim, 100, 3, ""); +} void do_viewbuts(unsigned short event) { @@ -1447,6 +1468,7 @@ static void view3d_panel_object(short cntrl) // VIEW3D_HANDLER_OBJECT if(ob==G.obedit) { if(ob->type==OB_ARMATURE) v3d_editarmature_buts(block, ob, lim); + if(ob->type==OB_MBALL) v3d_editmetaball_buts(block, ob, lim); else v3d_editvertex_buts(block, ob, lim); } else if(ob==G.obpose) { |