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:
authorCampbell Barton <ideasman42@gmail.com>2009-05-25 17:48:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-05-25 17:48:44 +0400
commit6d156a1bab818a8b41dbabca9fb539bde97ad810 (patch)
tree1d3b4632335034d23ec2a137f4b8a348bdecb76e /source/blender/python/intern/bpy_util.h
parentedd783db737c2ea6b97b3bb982bd643f840ccd0e (diff)
Store the context for python in a static variable with assessor functions - BPy_GetContext/BPy_SetContext,
Still not happy with this in the long term but its less problematic then storing the context in pythons namespace which couldn't be set before importing modules. This might fix a crash quite a few people have reported (but I cant reproduce).
Diffstat (limited to 'source/blender/python/intern/bpy_util.h')
-rw-r--r--source/blender/python/intern/bpy_util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_util.h b/source/blender/python/intern/bpy_util.h
index db31f403714..49f48802249 100644
--- a/source/blender/python/intern/bpy_util.h
+++ b/source/blender/python/intern/bpy_util.h
@@ -74,4 +74,8 @@ char *BPy_enum_as_string(struct EnumPropertyItem *item);
/* error reporting */
int BPy_reports_to_error(struct ReportList *reports);
+/* TODO - find a better solution! */
+struct bContext *BPy_GetContext(void);
+void BPy_SetContext(struct bContext *C);
+
#endif