diff --git a/src/app_dialogs.cpp b/src/app_dialogs.cpp index c8ae263..263ae03 100644 --- a/src/app_dialogs.cpp +++ b/src/app_dialogs.cpp @@ -674,6 +674,7 @@ void App::dialog_timelapse_export() void App::dialog_export_mp4() { std::thread([this] { + BT_SetTerminate(); const int video_width = 1024; const int video_height = 512; const int video_frames = 500; diff --git a/src/canvas.cpp b/src/canvas.cpp index 5f44d7f..34c4bdf 100644 --- a/src/canvas.cpp +++ b/src/canvas.cpp @@ -1897,6 +1897,7 @@ void Canvas::export_depth(std::string file_name, std::function on_comple if (App::I->check_license()) { std::thread t([=] { + BT_SetTerminate(); export_depth_thread(file_name); if (on_complete) on_complete(); diff --git a/src/main.cpp b/src/main.cpp index 8607fe3..e680d48 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -780,6 +780,7 @@ LRESULT CALLBACK splash_proc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lPara HWND splash_dialog; void splash_thread_loop() { + BT_SetTerminate(); splash_dialog = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SPLASH), NULL, reinterpret_cast(splash_proc)); MSG msg; diff --git a/src/node_panel_brush.cpp b/src/node_panel_brush.cpp index 6e442a1..c61088e 100644 --- a/src/node_panel_brush.cpp +++ b/src/node_panel_brush.cpp @@ -841,6 +841,8 @@ bool NodePanelBrushPreset::export_ppbr(const std::string& path_in, const PPBRInf bool NodePanelBrushPreset::import_ppbr(const std::string& path) { + BT_SetTerminate(); + Asset f; if (f.open(path.c_str())) { diff --git a/src/node_panel_grid.cpp b/src/node_panel_grid.cpp index b4e59e5..2004bd4 100644 --- a/src/node_panel_grid.cpp +++ b/src/node_panel_grid.cpp @@ -126,6 +126,7 @@ void NodePanelGrid::init_controls() if (ShaderManager::ext_float32 || ShaderManager::ext_float16) { std::thread([this] { + BT_SetTerminate(); bake_uvs(); m_hm_shading->set_index(3); m_shade_mode = ShadeMode::Textured; diff --git a/src/util.cpp b/src/util.cpp index 50c64fa..36e2f74 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -706,6 +706,7 @@ void parallel_for(size_t nb_elements, std::function functor, boo { size_t start = i * batch_size; my_threads[i] = std::thread([functor, start, batch_size]() { + BT_SetTerminate(); for (size_t j = start; j < start + batch_size; j++) functor(j); });