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:
authorCampbell Barton <ideasman42@gmail.com>2007-03-11 19:25:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-03-11 19:25:17 +0300
commite0c77c0f14f6ad3a742ab7b556ccb46b1ef4fbdf (patch)
treed3795bc43f7fa7cecf49471a4a72e827a2b24e78 /source/blender/python/api2_2x/Group.c
parentf84c02429ebc03faca8413d08540fa04d2461b93 (diff)
made all data adding functions accept a name such as add_mesh or add_curve, previously only some datatypes adding functions accepted a name.
also updated the Bpy.py epydocs
Diffstat (limited to 'source/blender/python/api2_2x/Group.c')
-rwxr-xr-xsource/blender/python/api2_2x/Group.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/source/blender/python/api2_2x/Group.c b/source/blender/python/api2_2x/Group.c
index b5fe226bf2c..faf3fc7db73 100755
--- a/source/blender/python/api2_2x/Group.c
+++ b/source/blender/python/api2_2x/Group.c
@@ -98,7 +98,7 @@ static PyObject *BPy_Group_copy( BPy_Group * self )
GROUP_DEL_CHECK_PY(self);
- bl_group= add_group();
+ bl_group= add_group( self->group->id.name + 2 );
if( bl_group ) /* now create the wrapper grp in Python */
py_group = ( BPy_Group * ) Group_CreatePyObject( bl_group );
@@ -106,8 +106,6 @@ static PyObject *BPy_Group_copy( BPy_Group * self )
return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
"couldn't create Group Data in Blender" ) );
- rename_id( &bl_group->id, self->group->id.name + 2 );
-
bl_group->id.us = 1;
/* Now add the objects to the group */
@@ -362,7 +360,7 @@ PyObject *M_Group_New( PyObject * self, PyObject * args )
return EXPP_ReturnPyObjError( PyExc_TypeError,
"string expected as argument or nothing" );
- bl_group= add_group();
+ bl_group= add_group( name );
if( bl_group ) /* now create the wrapper grp in Python */
py_group = ( BPy_Group * ) Group_CreatePyObject( bl_group );
@@ -370,12 +368,6 @@ PyObject *M_Group_New( PyObject * self, PyObject * args )
return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
"couldn't create Group Data in Blender" ) );
-
- if( strcmp( name, "Group" ) != 0 ) {
- PyOS_snprintf( buf, sizeof( buf ), "%s", name );
- rename_id( &bl_group->id, buf );
- }
-
bl_group->id.us = 1;
return ( PyObject * ) py_group;