Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_init_exit.c')
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index c235c4e47ae..8293504d068 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -23,8 +23,8 @@
* Manage initializing resources and correctly shutting down.
*/
-#include <stdlib.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
@@ -45,36 +45,36 @@
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_threads.h"
-#include "BLI_utildefines.h"
#include "BLI_timer.h"
+#include "BLI_utildefines.h"
-#include "BLO_writefile.h"
#include "BLO_undofile.h"
+#include "BLO_writefile.h"
-#include "BKE_blendfile.h"
#include "BKE_blender.h"
+#include "BKE_blendfile.h"
#include "BKE_callbacks.h"
#include "BKE_context.h"
#include "BKE_font.h"
#include "BKE_global.h"
#include "BKE_icons.h"
-#include "BKE_library_remap.h"
+#include "BKE_keyconfig.h"
+#include "BKE_lib_remap.h"
#include "BKE_main.h"
#include "BKE_mball_tessellate.h"
#include "BKE_node.h"
#include "BKE_report.h"
-#include "BKE_screen.h"
#include "BKE_scene.h"
+#include "BKE_screen.h"
#include "BKE_sound.h"
-#include "BKE_keyconfig.h"
#include "BKE_addon.h"
#include "BKE_appdir.h"
+#include "BKE_mask.h" /* free mask clipboard */
+#include "BKE_material.h" /* BKE_material_copybuf_clear */
#include "BKE_sequencer.h" /* free seq clipboard */
#include "BKE_studiolight.h"
-#include "BKE_material.h" /* clear_matcopybuf */
#include "BKE_tracking.h" /* free tracking clipboard */
-#include "BKE_mask.h" /* free mask clipboard */
#include "RE_engine.h"
#include "RE_pipeline.h" /* RE_ free stuff */
@@ -85,42 +85,43 @@
# include "BPY_extern.h"
#endif
-#include "GHOST_Path-api.h"
#include "GHOST_C-api.h"
+#include "GHOST_Path-api.h"
#include "RNA_define.h"
#include "WM_api.h"
-#include "WM_types.h"
#include "WM_message.h"
+#include "WM_types.h"
+#include "wm.h"
#include "wm_cursors.h"
#include "wm_event_system.h"
-#include "wm.h"
#include "wm_files.h"
-#include "wm_window.h"
#include "wm_platform_support.h"
+#include "wm_surface.h"
+#include "wm_window.h"
#include "ED_anim_api.h"
#include "ED_armature.h"
#include "ED_gpencil.h"
-#include "ED_keyframing.h"
#include "ED_keyframes_edit.h"
+#include "ED_keyframing.h"
#include "ED_node.h"
#include "ED_render.h"
-#include "ED_space_api.h"
#include "ED_screen.h"
-#include "ED_util.h"
+#include "ED_space_api.h"
#include "ED_undo.h"
+#include "ED_util.h"
-#include "UI_interface.h"
-#include "UI_resources.h"
#include "BLF_api.h"
#include "BLT_lang.h"
+#include "UI_interface.h"
+#include "UI_resources.h"
-#include "GPU_material.h"
#include "GPU_draw.h"
#include "GPU_init_exit.h"
+#include "GPU_material.h"
#include "BKE_sound.h"
#include "COM_compositor.h"
@@ -150,11 +151,9 @@ static void wm_init_reports(bContext *C)
BKE_reports_init(reports, RPT_STORE);
}
-static void wm_free_reports(bContext *C)
+static void wm_free_reports(wmWindowManager *wm)
{
- ReportList *reports = CTX_wm_reports(C);
-
- BKE_reports_clear(reports);
+ BKE_reports_clear(&wm->reports);
}
static bool wm_start_with_console = false;
@@ -218,8 +217,10 @@ static void sound_jack_sync_callback(Main *bmain, int mode, float time)
if (depsgraph == NULL) {
continue;
}
+ BKE_sound_lock_scene(scene);
Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
BKE_sound_jack_scene_update(scene_eval, mode, time);
+ BKE_sound_unlock_scene(scene);
}
}
@@ -249,13 +250,12 @@ void WM_init(bContext *C, int argc, const char **argv)
ED_undosys_type_init();
- BKE_library_callback_free_window_manager_set(wm_close_and_free); /* library.c */
BKE_library_callback_free_notifier_reference_set(
- WM_main_remove_notifier_reference); /* library.c */
+ WM_main_remove_notifier_reference); /* lib_id.c */
BKE_region_callback_free_gizmomap_set(wm_gizmomap_remove); /* screen.c */
BKE_region_callback_refresh_tag_gizmomap_set(WM_gizmomap_tag_refresh);
BKE_library_callback_remap_editor_id_reference_set(
- WM_main_remap_editor_id_reference); /* library.c */
+ WM_main_remap_editor_id_reference); /* lib_id.c */
BKE_spacedata_callback_id_remap_set(ED_spacedata_id_remap); /* screen.c */
DEG_editors_set_update_cb(ED_render_id_flush_update, ED_render_scene_update);
@@ -350,7 +350,7 @@ void WM_init(bContext *C, int argc, const char **argv)
GHOST_toggleConsole(3);
}
- clear_matcopybuf();
+ BKE_material_copybuf_clear();
ED_render_clear_mtex_copybuf();
// glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
@@ -360,7 +360,8 @@ void WM_init(bContext *C, int argc, const char **argv)
/* allow a path of "", this is what happens when making a new file */
#if 0
if (BKE_main_blendfile_path_from_global()[0] == '\0') {
- BLI_make_file_string("/", G_MAIN->name, BKE_appdir_folder_default(), "untitled.blend");
+ BLI_join_dirfile(
+ G_MAIN->name, sizeof(G_MAIN->name), BKE_appdir_folder_default(), "untitled.blend");
}
#endif
@@ -470,7 +471,7 @@ void wm_exit_schedule_delayed(const bContext *C)
/* Use modal UI handler for now.
* Could add separate WM handlers or so, but probably not worth it. */
WM_event_add_ui_handler(C, &win->modalhandlers, wm_exit_handler, NULL, NULL, 0);
- WM_event_add_mousemove(C); /* ensure handler actually gets called */
+ WM_event_add_mousemove(win); /* ensure handler actually gets called */
}
/**
@@ -497,9 +498,9 @@ void WM_exit_ex(bContext *C, const bool do_python)
bool has_edited;
int fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_HISTORY);
- BLI_make_file_string("/", filename, BKE_tempdir_base(), BLENDER_QUIT_FILE);
+ BLI_join_dirfile(filename, sizeof(filename), BKE_tempdir_base(), BLENDER_QUIT_FILE);
- has_edited = ED_editors_flush_edits(bmain, false);
+ has_edited = ED_editors_flush_edits(bmain);
if ((has_edited && BLO_write_file(bmain, filename, fileflags, NULL, NULL)) ||
(undo_memfile && BLO_memfile_write_file(undo_memfile, filename))) {
@@ -533,9 +534,10 @@ void WM_exit_ex(bContext *C, const bool do_python)
BKE_addon_pref_type_free();
BKE_keyconfig_pref_type_free();
- BKE_material_gpencil_default_free();
+ BKE_materials_exit();
wm_operatortype_free();
+ wm_surfaces_free();
WM_menutype_free();
WM_uilisttype_free();
@@ -557,9 +559,9 @@ void WM_exit_ex(bContext *C, const bool do_python)
ED_preview_free_dbase(); /* frees a Main dbase, before BKE_blender_free! */
- if (C && wm) {
+ if (wm) {
/* Before BKE_blender_free! - since the ListBases get freed there. */
- wm_free_reports(C);
+ wm_free_reports(wm);
}
BKE_sequencer_free_clipboard(); /* sequencer.c */
@@ -581,7 +583,7 @@ void WM_exit_ex(bContext *C, const bool do_python)
}
BKE_blender_free(); /* blender.c, does entire library and spacetypes */
- // free_matcopybuf();
+ // BKE_material_copybuf_free();
ANIM_fcurves_copybuf_free();
ANIM_drivers_copybuf_free();
ANIM_driver_vars_copybuf_free();
@@ -606,8 +608,6 @@ void WM_exit_ex(bContext *C, const bool do_python)
}
#ifdef WITH_INTERNATIONAL
- BLF_free_unifont();
- BLF_free_unifont_mono();
BLT_lang_free();
#endif