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).
This commit is contained in:
2009-05-25 13:48:44 +00:00
parent edd783db73
commit 6d156a1bab
6 changed files with 23 additions and 25 deletions

View File

@@ -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