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>2006-03-18 18:23:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2006-03-18 18:23:02 +0300
commitbfe42eea43ab7731f92b75c9ecae3098a02a7fc7 (patch)
tree2486bded17675a070840c08e23a8d12903f9ee5d /source/blender/python/api2_2x/Group.c
parent7b37efb35f308bcd21ea78f1350f306a735c2290 (diff)
Moved declerations to the top of the skope so as to work with MSVC?
started removeing // from constant.h to shut GCC's -pedantic up. realized // are used everywhere.
Diffstat (limited to 'source/blender/python/api2_2x/Group.c')
-rwxr-xr-xsource/blender/python/api2_2x/Group.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/source/blender/python/api2_2x/Group.c b/source/blender/python/api2_2x/Group.c
index 5034ddfb050..513efa71d41 100755
--- a/source/blender/python/api2_2x/Group.c
+++ b/source/blender/python/api2_2x/Group.c
@@ -10,20 +10,11 @@
#include "BKE_scene.h"
#include "BKE_group.h"
-#include "BSE_edit.h"
-
-#include "BLI_arithb.h"
#include "BLI_blenlib.h"
-#include "BDR_editobject.h"
-#include "BDR_editcurve.h"
-
-#include "MEM_guardedalloc.h"
-
-#include "mydevice.h"
#include "blendef.h"
#include "Object.h"
-#include "gen_utils.h"
+
/*****************************************************************************/
/* Python API function prototypes for the Blender module. */
@@ -85,15 +76,16 @@ static PyObject *M_Group_getObjects( BPy_Group * self )
return (PyObject *)seq;
}
-
+/* only for internal use Blender.Group.Get("MyGroup").objects= []*/
static int M_Group_setObjects( BPy_Group * self, PyObject * args )
{
int i;
Group *group;
- group= self->group;
Object *blen_ob;
Base *base;
+ group= self->group;
+
if( PyList_Check( args ) ) {
if( EXPP_check_sequence_consistency( args, &Object_Type ) != 1)
return EXPP_ReturnIntError( PyExc_TypeError,
@@ -159,11 +151,12 @@ static int Group_setName( BPy_Group * self, PyObject * value )
static PyObject *Group_getName( BPy_Group * self, PyObject * args )
{
+ PyObject *attr;
if( !(self->group) )
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
"Blender Group was deleted!" );
- PyObject *attr = PyString_FromString( self->group->id.name + 2 );
+ attr = PyString_FromString( self->group->id.name + 2 );
if( attr )
return attr;
@@ -294,12 +287,13 @@ PyObject *M_Group_New( PyObject * self, PyObject * args )
char *name = "Group";
char buf[21];
BPy_Group *py_group; /* for Group Data object wrapper in Python */
+ struct Group *bl_group;
if( !PyArg_ParseTuple( args, "|s", &name ) )
return EXPP_ReturnPyObjError( PyExc_TypeError,
"string expected as argument" );
- struct Group *bl_group= add_group();
+ bl_group= add_group();
if( bl_group ) /* now create the wrapper grp in Python */
py_group = ( BPy_Group * ) Group_CreatePyObject( bl_group );
@@ -396,12 +390,13 @@ PyObject *M_Group_Unlink( PyObject * self, PyObject * args )
{
PyObject *pyob=NULL;
BPy_Group *pygrp=NULL;
+ Group *group;
if( !PyArg_ParseTuple( args, "O!", &Group_Type, &pyob) )
return ( EXPP_ReturnPyObjError( PyExc_TypeError,
"expected a group" ) );
pygrp= (BPy_Group *)pyob;
- Group *group= pygrp->group;
+ group= pygrp->group;
if( !group )
return EXPP_ReturnPyObjError( PyExc_RuntimeError,