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:
Diffstat (limited to 'source/blender/python/api2_2x/NMesh.c')
-rw-r--r--source/blender/python/api2_2x/NMesh.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/NMesh.c b/source/blender/python/api2_2x/NMesh.c
index f2bf3aa31e4..2e6f2ca2601 100644
--- a/source/blender/python/api2_2x/NMesh.c
+++ b/source/blender/python/api2_2x/NMesh.c
@@ -2796,7 +2796,7 @@ static PyObject *M_NMesh_PutRaw( PyObject * self, PyObject * args )
ob = add_object( OB_MESH );
if( !ob ) {
PyErr_SetString( PyExc_RuntimeError,
- "Fatal: could not create mesh object" );
+ "Fatal: could not create mesh object" );
return 0;
}
@@ -2824,6 +2824,11 @@ static PyObject *M_NMesh_PutRaw( PyObject * self, PyObject * args )
if( !during_script( ) )
EXPP_allqueue( REDRAWVIEW3D, 0 );
+ if (ob && G.obedit) { /* prevents a crash when a new object is created */
+ exit_editmode(1);
+ enter_editmode();
+ }
+
// @OK...this requires some explanation:
// Materials can be assigned two ways:
// a) to the object data (in this case, the mesh)