From f75005c2a89f6cc5f1bdac33e26341a14ed92888 Mon Sep 17 00:00:00 2001 From: Jiri Hnidek Date: Wed, 29 Jul 2009 12:35:09 +0000 Subject: 2.5 MetaBalls - It is possible to work with MetaBalls in edit mode now - Added basic UI to the button window (feel free to change it :-)) - Header menus should work - Undo & redo should work - Removed global variable editelems and lastelem (moved it to the MetaBall struct) - All tools from old editmball.c was converted to the operators - Added lastelem to the RNA - Experimental: mb->editelems is only pointer at mb->elems or NULL (depends on Mode). ListBase of MetaElems is not duplicated in edit mode. Tested with scons at Linux and mac OS X TODO: - Recalc data after Undo or Redo - Solve issue with basic MetaBall and Python UI script (only base MetaBall object influence Wiresize and Threshold) - Fix orientation of manipulator in "Normal mode" --- source/blender/editors/screen/screen_ops.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender/editors/screen/screen_ops.c') diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index f5c639745a3..07454088604 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -40,6 +40,7 @@ #include "DNA_mesh_types.h" #include "DNA_curve_types.h" #include "DNA_scene_types.h" +#include "DNA_meta_types.h" #include "BKE_blender.h" #include "BKE_colortools.h" @@ -312,6 +313,14 @@ int ED_operator_editlattice(bContext *C) return 0; } +int ED_operator_editmball(bContext *C) +{ + Object *obedit= CTX_data_edit_object(C); + if(obedit && obedit->type==OB_MBALL) + return NULL != ((MetaBall *)obedit->data)->editelems; + return 0; +} + /* *************************** action zone operator ************************** */ /* operator state vars used: -- cgit v1.2.3