diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-12-22 06:47:19 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-12-22 06:47:19 +0300 |
commit | 8eb44b8fcc4f9e48686aa370ab36e05391e4e865 (patch) | |
tree | ad2ea4b2ba55424146d476fa23b5154999da2786 /source/blender/src/editmball.c | |
parent | 276e0569129979fc115d8a8de51c2698ea55f2f6 (diff) |
Bugfix #7854: Adding Meta/Text Object causes Blender to go into EditMode (setting disabled)
This was caused by a few missing checks for this setting in the appropriate places.
Diffstat (limited to 'source/blender/src/editmball.c')
-rw-r--r-- | source/blender/src/editmball.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/src/editmball.c b/source/blender/src/editmball.c index 06b2e8b5dd7..71fbf834c17 100644 --- a/source/blender/src/editmball.c +++ b/source/blender/src/editmball.c @@ -49,6 +49,7 @@ #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_view3d_types.h" +#include "DNA_userdef_types.h" #include "BKE_utildefines.h" #include "BKE_depsgraph.h" @@ -132,6 +133,7 @@ void add_primitiveMball(int dummy_argument) { MetaElem *ml; float *curs, mat[3][3], cent[3], imat[3][3], cmat[3][3]; + short newob= 0; if(G.scene->id.lib) return; @@ -150,6 +152,7 @@ void add_primitiveMball(int dummy_argument) make_editMball(); setcursor_space(SPACE_VIEW3D, CURSOR_EDIT); + newob= 1; } /* deselect */ @@ -222,7 +225,15 @@ void add_primitiveMball(int dummy_argument) DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); // added ball can influence others - countall(); + countall(); + + /* if a new object was created, it stores it in Mball, for reload original data and undo */ + if ( !(newob) || (U.flag & USER_ADD_EDITMODE)) { + if(newob) load_editMball(); + } else { + exit_editmode(2); + } + allqueue(REDRAWALL, 0); BIF_undo_push("Add MetaElem"); } |