Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2008-12-31 20:11:42 +0300
committerTon Roosendaal <ton@blender.org>2008-12-31 20:11:42 +0300
commitc9b60a7b64c75bf999cb8390b328aa42e7a5f53f (patch)
treeebd8dc28b62913d6fa7d675c6d21ac31c5c3119e /source/blender/editors/util/ed_util.c
parentb65a3e9337ac1d9c3870e0e04ee96090bc7e9b23 (diff)
2.5
So, editmode mesh is back! :) At the moment only TABkey works and mouse select, 1 vertex at a time. More will follow of course. Note for the devs: - G.editMesh has been removed, be careful with old code. - EditMesh now is property of Mesh itself Although it means unlimited editmodes, for migration purposes we better stick to 1 "obedit" per scene, which is in Context too - G.obedit will get removed soon, so use CTX_data_edit_object(C) Or if you can't, just scene->obedit for now - Also removed the CTX_data_edit_mesh(), this has no meaning anymore. EditMesh is not context senstitive anymore, only the edit-object for time being is. - Martin: I've already tucked some EditMesh pointer in T and removed all G.editMesh there.
Diffstat (limited to 'source/blender/editors/util/ed_util.c')
-rw-r--r--source/blender/editors/util/ed_util.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index 5113326cff1..034b8a1576b 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -31,18 +31,52 @@
#include "MEM_guardedalloc.h"
+#include "DNA_curve_types.h"
+#include "DNA_mesh_types.h"
+#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
#include "BLI_blenlib.h"
+#include "BLI_editVert.h"
+#include "BKE_context.h"
#include "BKE_global.h"
+#include "ED_mesh.h"
#include "ED_util.h"
#include "UI_text.h"
/* ********* general editor util funcs, not BKE stuff please! ********* */
+
+void ED_editors_exit(bContext *C)
+{
+ if(CTX_data_edit_object(C)) {
+ Object *ob= CTX_data_edit_object(C);
+
+ if(ob->type==OB_MESH) {
+ Mesh *me= ob->data;
+ if(me->edit_mesh) {
+ free_editMesh(me->edit_mesh);
+ MEM_freeN(me->edit_mesh);
+ me->edit_mesh= NULL;
+ }
+ }
+ if(ob->type==OB_FONT) {
+ // free_editText();
+ }
+ // else if(ob->type==OB_MBALL)
+ // BLI_freelistN(&editelems);
+ }
+
+ // free_editLatt();
+ // free_editArmature();
+ // free_posebuf();
+
+}
+
+
/* ***** XXX: functions are using old blender names, cleanup later ***** */