changes to help refcounts in rna be more predictable (still leaks when reloading on - F8)
This commit is contained in:
@@ -154,9 +154,15 @@ static void bpy_init_modules( void )
|
||||
|
||||
void BPY_update_modules( void )
|
||||
{
|
||||
#if 0 // slow, this runs all the time poll, draw etc 100's of time a sec.
|
||||
PyObject *mod= PyImport_ImportModuleLevel("bpy", NULL, NULL, NULL, 0);
|
||||
PyModule_AddObject( mod, "data", BPY_rna_module() );
|
||||
PyModule_AddObject( mod, "types", BPY_rna_types() );
|
||||
PyModule_AddObject( mod, "types", BPY_rna_types() ); // atm this does not need updating
|
||||
#endif
|
||||
|
||||
/* refreshes the main struct */
|
||||
BPY_update_rna_module();
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -264,6 +270,8 @@ void BPY_start_python( int argc, char **argv )
|
||||
PyDict_SetItemString(d, "__import__", item=PyCFunction_New(bpy_import_meth, NULL)); Py_DECREF(item);
|
||||
}
|
||||
|
||||
pyrna_alloc_types();
|
||||
|
||||
py_tstate = PyGILState_GetThisThreadState();
|
||||
PyEval_ReleaseThread(py_tstate);
|
||||
}
|
||||
|
Reference in New Issue
Block a user