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:
authorMichel Selten <michel@mselten.demon.nl>2003-06-22 22:34:36 +0400
committerMichel Selten <michel@mselten.demon.nl>2003-06-22 22:34:36 +0400
commitd253eb4b757ac5f01c01201815cb3db0c7308d33 (patch)
tree95ff32031d2134ad2260737663e02cc047d9f447 /source/blender/python/api2_2x/EXPP_interface.c
parent85f580433327c6be84e2fcc57a555ae251fb9b8a (diff)
* Fixes segfault caused in the Object.getParent function.
Found by Jonathan Thambidurai * Fixes a scriptlink problem when a script is run using ALT-p. Found by Yann Vernier (LoneTech) * Prints unhandled exceptions. Should fix some memory leaks too. Fixed by Yann Verniet (LoneTech)
Diffstat (limited to 'source/blender/python/api2_2x/EXPP_interface.c')
-rw-r--r--source/blender/python/api2_2x/EXPP_interface.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/EXPP_interface.c b/source/blender/python/api2_2x/EXPP_interface.c
index 77267db1a32..d987af6c004 100644
--- a/source/blender/python/api2_2x/EXPP_interface.c
+++ b/source/blender/python/api2_2x/EXPP_interface.c
@@ -54,6 +54,17 @@ void initBlenderApi2_2x (void)
M_Blender_Init ();
}
+void clearScriptLinks (void)
+{
+ Py_INCREF (Py_False);
+ PyDict_SetItemString (g_blenderdict, "bylink", Py_False);
+ /* Old API meant link could be unset. Or even valid when bylink is false.
+ * This way, you can import it and check its value afterwards, ignoring
+ * bylink. */
+ Py_INCREF (Py_None);
+ PyDict_SetItemString (g_blenderdict, "link", Py_None);
+}
+
ScriptLink * setScriptLinks(ID *id, short event)
{
ScriptLink * scriptlink;