diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-02-23 17:51:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-02-23 17:51:20 +0300 |
commit | 086d51c822774ec68e95d9ab68679fb219ad8a12 (patch) | |
tree | 49591a038e005b8aaa7263668929d645dbfc8ca1 /source/blender/python/api2_2x/gen_utils.c | |
parent | 260af5f3c1590900353cce62657536bc96d3f53b (diff) |
BPython API
* Added data.lib attributes to almost all data types, (except for Text3d and NLA)
This is None or the path of the library as a string.
* Main was giving a warning, Include Curve.h rather then CurNurb.h
* Added Library.LinkedLibs(), returns a list of externaly linked libs.
Diffstat (limited to 'source/blender/python/api2_2x/gen_utils.c')
-rw-r--r-- | source/blender/python/api2_2x/gen_utils.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/gen_utils.c b/source/blender/python/api2_2x/gen_utils.c index 641992ecb43..01cf7c461bc 100644 --- a/source/blender/python/api2_2x/gen_utils.c +++ b/source/blender/python/api2_2x/gen_utils.c @@ -185,7 +185,17 @@ int SetIdFakeUser( ID * id, PyObject *value) return 0; } - +/*****************************************************************************/ +/* Description: This function sets the fake user status of the ID */ +/* returns an int error, so from getsetattrs */ +/*****************************************************************************/ +PyObject *EXPP_GetIdLib( ID * id ) +{ + if (id->lib) + return PyString_FromString(id->lib->name); + else + return EXPP_incr_ret( Py_None ); +} /*****************************************************************************/ /* Description: These functions set an internal string with the given type */ |