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/Metaball.c')
-rw-r--r--source/blender/python/api2_2x/Metaball.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/python/api2_2x/Metaball.c b/source/blender/python/api2_2x/Metaball.c
index 94b5535c520..f7629707ea3 100644
--- a/source/blender/python/api2_2x/Metaball.c
+++ b/source/blender/python/api2_2x/Metaball.c
@@ -437,7 +437,11 @@ static PyObject *M_Metaball_New( PyObject * self, PyObject * args )
return ( EXPP_ReturnPyObjError( PyExc_TypeError,
"Metaball.New() - expected string argument (or nothing)" ) );
- blmball = add_mball( ); /* first create the MetaBall Data in Blender */
+ /* first create the MetaBall Data in Blender */
+ if (name)
+ blmball = add_mball( name );
+ else
+ blmball = add_mball( "Meta" );
if( blmball ) {
/* return user count to zero since add_mball() incref'ed it */
@@ -456,8 +460,6 @@ static PyObject *M_Metaball_New( PyObject * self, PyObject * args )
pymball->metaball = blmball;
/*link Python mballer wrapper to Blender MetaBall */
- if( name ) /* user gave us a name for the metaball, use it */
- rename_id( &blmball->id, name );
return ( PyObject * ) pymball;
}