Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillian Padovani Germano <wpgermano@gmail.com>2004-04-25 18:43:21 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2004-04-25 18:43:21 +0400
commit2d24298b91f895f8f894591c0a7c9b857213be94 (patch)
treecbf963f6abfc02d83eab2380e53e0a029de77f7a /source/blender/python/api2_2x/Library.c
parent395c1152c80d781b386125ca8da605f3893aa322 (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.c17
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)