Refactor BKE_blender into separate headers

- BKE_blender_version.h (only version defines & versionstr).
- BKE_blender_copybuffer.h (currently only used for view3d copy/paste).
- BKE_blender_undo.h (global undo functions).
- BKE_blendfile.h (high level blend file read/write API).
This commit is contained in:
2016-04-24 22:42:41 +10:00
parent 935998312c
commit beaa57d269
49 changed files with 1410 additions and 1096 deletions

View File

@@ -54,6 +54,7 @@
#include "BLO_writefile.h"
#include "BKE_blender.h"
#include "BKE_blender_undo.h"
#include "BKE_context.h"
#include "BKE_screen.h"
#include "BKE_DerivedMesh.h"
@@ -492,10 +493,10 @@ void WM_exit_ext(bContext *C, const bool do_python)
RE_FreeAllRender();
RE_engines_exit();
ED_preview_free_dbase(); /* frees a Main dbase, before free_blender! */
ED_preview_free_dbase(); /* frees a Main dbase, before BKE_blender_free! */
if (C && wm)
wm_free_reports(C); /* before free_blender! - since the ListBases get freed there */
wm_free_reports(C); /* before BKE_blender_free! - since the ListBases get freed there */
BKE_sequencer_free_clipboard(); /* sequencer.c */
BKE_tracking_clipboard_free();
@@ -506,7 +507,7 @@ void WM_exit_ext(bContext *C, const bool do_python)
COM_deinitialize();
#endif
free_blender(); /* blender.c, does entire library and spacetypes */
BKE_blender_free(); /* blender.c, does entire library and spacetypes */
// free_matcopybuf();
ANIM_fcurves_copybuf_free();
ANIM_drivers_copybuf_free();
@@ -534,10 +535,10 @@ void WM_exit_ext(bContext *C, const bool do_python)
/* option not to close python so we can use 'atexit' */
if (do_python) {
/* XXX - old note */
/* before free_blender so py's gc happens while library still exists */
/* before BKE_blender_free so py's gc happens while library still exists */
/* needed at least for a rare sigsegv that can happen in pydrivers */
/* Update for blender 2.5, move after free_blender because blender now holds references to PyObject's
/* Update for blender 2.5, move after BKE_blender_free because blender now holds references to PyObject's
* so decref'ing them after python ends causes bad problems every time
* the pyDriver bug can be fixed if it happens again we can deal with it then */
BPY_python_end();
@@ -562,7 +563,7 @@ void WM_exit_ext(bContext *C, const bool do_python)
ED_file_exit(); /* for fsmenu */
UI_exit();
BKE_userdef_free();
BKE_blender_userdef_free();
RNA_exit(); /* should be after BPY_python_end so struct python slots are cleared */