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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user