diff options
author | Joseph Eagar <joeedh@gmail.com> | 2006-11-17 09:14:15 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2006-11-17 09:14:15 +0300 |
commit | 4c5fcf136b510ddb2aeb9c1c9afbc155e95ce12c (patch) | |
tree | 1cf7b5790e151d5f9b2cb39e6ccd2f320bd64b2b /source/blender/python/api2_2x/Scene.c | |
parent | c8ca36a9c8b9f8fabf1b8f09507f35349017cfbf (diff) |
=ID Properties Update=
This commit adds file reading/writing of ID properties to all ID types,
and also adds python access for NMesh, Mesh, Scene and Image. Note
that the file reading code might need some more work for certain
future/planned features to save right. Also I updated a few comments in idprop.c.
Diffstat (limited to 'source/blender/python/api2_2x/Scene.c')
-rw-r--r-- | source/blender/python/api2_2x/Scene.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Scene.c b/source/blender/python/api2_2x/Scene.c index 8b096f81840..150aa0b9fd3 100644 --- a/source/blender/python/api2_2x/Scene.c +++ b/source/blender/python/api2_2x/Scene.c @@ -67,6 +67,7 @@ struct View3D; #include "Mesh.h" #include "Lattice.h" #include "Metaball.h" +#include "IDProp.h" #include "Text3d.h" #include "gen_utils.h" @@ -279,6 +280,10 @@ static PyObject *Scene_getAttr( BPy_Scene * self, char *name ) if( strcmp( name, "name" ) == 0 ) attr = PyString_FromString( self->scene->id.name + 2 ); + + else if ( strcmp( name, "properties" ) == 0 ) + return BPy_Wrap_IDProperty( (ID*)self->scene, IDP_GetProperties((ID*)self->scene, 1) ); + /* accept both Layer (for compatibility with ob.Layer) and Layers */ else if( strncmp( name, "Layer", 5 ) == 0 ) attr = PyInt_FromLong( self->scene->lay & (1<<20)-1 ); |