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/Image.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/Image.c')
-rw-r--r-- | source/blender/python/api2_2x/Image.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Image.c b/source/blender/python/api2_2x/Image.c index 16e537e37d4..d6458c12435 100644 --- a/source/blender/python/api2_2x/Image.c +++ b/source/blender/python/api2_2x/Image.c @@ -47,6 +47,7 @@ #include "DNA_packedFile_types.h" #include "BKE_icons.h" #include "IMB_imbuf.h" +#include "IDProp.h" /* used so we can get G.scene->r.cfra for getting the current image frame, some images change frame if they are a sequence */ @@ -1150,6 +1151,8 @@ static PyObject *Image_getAttr( BPy_Image * self, char *name ) if( strcmp( name, "name" ) == 0 ) attr = PyString_FromString( self->image->id.name + 2 ); + else if ( strcmp( name, "properties" ) == 0 ) + return BPy_Wrap_IDProperty( (ID*)self->image, IDP_GetProperties((ID*)self->image, 1) ); else if( strcmp( name, "filename" ) == 0 ) attr = PyString_FromString( self->image->name ); else if( strcmp( name, "size" ) == 0 ) |