Scene
* Moved to getsetattrs * added scene.users (get) * added scene.fakeUser (get/set) * added scene.world (get/set) * added scene.timeline (get) * added scene.render (get) * added scene.radiosity (get) * added scene.objects.camera (get/set) Group * added properties gen_utils * made getScriptLinks work as documented, return an empty list rather then None. header files, noted libdata after PyObject as a requirement. Others, * Deprecate prints for older functionality EpyDocs still need updating.
This commit is contained in:
@@ -214,6 +214,20 @@ static int Group_compare( BPy_Group * a, BPy_Group * b );
|
||||
/*****************************************************************************/
|
||||
/* Python BPy_Group methods: */
|
||||
/*****************************************************************************/
|
||||
static PyObject *Group_getName( BPy_Group * self )
|
||||
{
|
||||
PyObject *attr;
|
||||
GROUP_DEL_CHECK_PY(self);
|
||||
|
||||
attr = PyString_FromString( self->group->id.name + 2 );
|
||||
|
||||
if( attr )
|
||||
return attr;
|
||||
|
||||
return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
|
||||
"couldn't get Group.name attribute" ) );
|
||||
}
|
||||
|
||||
static int Group_setName( BPy_Group * self, PyObject * value )
|
||||
{
|
||||
char *name = NULL;
|
||||
@@ -230,21 +244,6 @@ static int Group_setName( BPy_Group * self, PyObject * value )
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *Group_getName( BPy_Group * self )
|
||||
{
|
||||
PyObject *attr;
|
||||
GROUP_DEL_CHECK_PY(self);
|
||||
|
||||
attr = PyString_FromString( self->group->id.name + 2 );
|
||||
|
||||
if( attr )
|
||||
return attr;
|
||||
|
||||
return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
|
||||
"couldn't get Group.name attribute" ) );
|
||||
}
|
||||
|
||||
static PyObject *Group_getLib( BPy_Group * self )
|
||||
{
|
||||
GROUP_DEL_CHECK_PY(self);
|
||||
@@ -273,6 +272,11 @@ static int Group_setFakeUser( BPy_Group * self, PyObject * value )
|
||||
return SetIdFakeUser(&self->group->id, value);
|
||||
}
|
||||
|
||||
static PyObject *Group_getProperties( BPy_Group * self )
|
||||
{
|
||||
/*sanity check, we set parent property type to Group here*/
|
||||
return BPy_Wrap_IDProperty( (ID*)self->group, IDP_GetProperties((ID*)self->group, 1), NULL );
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
@@ -325,6 +329,9 @@ static PyGetSetDef BPy_Group_getseters[] = {
|
||||
(getter)Group_getFakeUser, (setter)Group_setFakeUser,
|
||||
"Groups fake user state",
|
||||
NULL},
|
||||
{"properties",
|
||||
(getter)Group_getProperties, NULL,
|
||||
"get the ID properties associated with this group"},
|
||||
{"layers",
|
||||
(getter)Group_getLayers, (setter)Group_setLayers,
|
||||
"Number of group users",
|
||||
|
||||
Reference in New Issue
Block a user