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:
authorJoshua Leung <aligorith@gmail.com>2007-12-22 06:47:19 +0300
committerJoshua Leung <aligorith@gmail.com>2007-12-22 06:47:19 +0300
commit8eb44b8fcc4f9e48686aa370ab36e05391e4e865 (patch)
treead2ea4b2ba55424146d476fa23b5154999da2786 /source/blender/src
parent276e0569129979fc115d8a8de51c2698ea55f2f6 (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')
-rw-r--r--source/blender/src/editfont.c4
-rw-r--r--source/blender/src/editmball.c13
2 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/src/editfont.c b/source/blender/src/editfont.c
index a3de5d03283..70365c9b234 100644
--- a/source/blender/src/editfont.c
+++ b/source/blender/src/editfont.c
@@ -58,6 +58,7 @@
#include "DNA_scene_types.h"
#include "DNA_text_types.h"
#include "DNA_view3d_types.h"
+#include "DNA_userdef_types.h"
#include "BKE_depsgraph.h"
#include "BKE_font.h"
@@ -1186,7 +1187,8 @@ void add_primitiveFont(int dummy_argument)
cu->tb= MEM_callocN(MAXTEXTBOX*sizeof(TextBox), "textbox");
cu->tb[0].w = cu->tb[0].h = 0.0;
- enter_editmode(EM_WAITCURSOR);
+ if (U.flag & USER_ADD_EDITMODE)
+ enter_editmode(EM_WAITCURSOR);
allqueue(REDRAWALL, 0);
}
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");
}