diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2004-04-25 18:43:21 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2004-04-25 18:43:21 +0400 |
commit | 2d24298b91f895f8f894591c0a7c9b857213be94 (patch) | |
tree | cbf963f6abfc02d83eab2380e53e0a029de77f7a /source/blender/python/api2_2x/Library.c | |
parent | 395c1152c80d781b386125ca8da605f3893aa322 (diff) |
BPython:
-- epydoc Documentation for eeshlo's Noise module + small typo fix in Noise.c
-- BPY_end_python closes .blend file opened by Library module when script doesn't do it by itself.
Diffstat (limited to 'source/blender/python/api2_2x/Library.c')
-rw-r--r-- | source/blender/python/api2_2x/Library.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Library.c b/source/blender/python/api2_2x/Library.c index 6a0a958c9d7..3b546d8f4f0 100644 --- a/source/blender/python/api2_2x/Library.c +++ b/source/blender/python/api2_2x/Library.c @@ -176,6 +176,23 @@ PyObject *M_Library_Close(PyObject *self) } /** + * helper function for 'atexit' clean-ups, used by BPY_end_python, + * declared in EXPP_interface.h. + */ +void EXPP_Library_Close(void) +{ + if (bpy_openlib) { + BLO_blendhandle_close(bpy_openlib); + bpy_openlib = NULL; + } + + if (bpy_openlibname) { + MEM_freeN (bpy_openlibname); + bpy_openlibname = NULL; + } +} + +/** * Get the filename of the currently open library file, if any. */ PyObject *M_Library_GetName(PyObject *self) |