Don't make Python classes of StructRNA on startup

This gives small start time speedup, classes are lazy loaded instead.

Keep existing behavior in debug builds to catch any errors early.
This commit is contained in:
Campbell Barton 2015-07-22 19:41:59 +10:00
parent 3dd8f287e1
commit cf6002737d

@ -7446,8 +7446,14 @@ static void bpy_class_free(void *pyob_ptr)
PyGILState_Release(gilstate);
}
/**
* \note This isn't essential to run on startup, since subtypes will lazy initialize.
* But keep running in debug mode so we get immediate notification of bad class hierarchy
* or any errors in "bpy_types.py" at load time, so errors don't go unnoticed.
*/
void pyrna_alloc_types(void)
{
#ifdef DEBUG
PyGILState_STATE gilstate;
PointerRNA ptr;
@ -7475,6 +7481,7 @@ void pyrna_alloc_types(void)
RNA_PROP_END;
PyGILState_Release(gilstate);
#endif /* DEBUG */
}