pass along the context to extension functions, this was already being done in all cases except for the render engine.

this allows python to NULL its internal context while scripts are not running.
This commit is contained in:
2010-12-07 04:12:15 +00:00
parent 48614fbc2a
commit d624d1cbdd
12 changed files with 52 additions and 38 deletions

View File

@@ -223,7 +223,7 @@ void BPy_init_modules( void )
PyModule_AddObject( mod, "app", BPY_app_struct() );
/* bpy context */
RNA_pointer_create(NULL, &RNA_Context, BPy_GetContext(), &ctx_ptr);
RNA_pointer_create(NULL, &RNA_Context, (void *)BPy_GetContext(), &ctx_ptr);
bpy_context_module= (BPy_StructRNA *)pyrna_struct_CreatePyObject(&ctx_ptr);
/* odd that this is needed, 1 ref on creation and another for the module
* but without we get a crash on exit */