UI: File Loading Dialog #104666

Closed
Harley Acheson wants to merge 12 commits from Harley/blender:LoadingDialog into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 6 additions and 6 deletions
Showing only changes of commit 80b548a2cc - Show all commits

View File

@ -856,13 +856,13 @@ static uiBlock *wm_block_create_loading(bContext *C, ARegion *region, void *arg)
if (!ibuf) {
/* Not in cache, so extract from the blend file itself. */
BlendThumbnail *data = BLO_thumbnail_from_file(filepath);
ibuf = data ? BKE_main_thumbnail_to_imbuf(NULL, data) : NULL;
ibuf = data ? BKE_main_thumbnail_to_imbuf(nullptr, data) : nullptr;
if (data) {
MEM_freeN(data);
}
}
const uchar *color = NULL;
const uchar *color = nullptr;
if (!ibuf) {
/* No thumbnails found, so just use Blender logo. */
@ -1073,19 +1073,19 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports)
if (!G.background) {
wmWindowManager *wm = CTX_wm_manager(C);
wmWindow *win = CTX_wm_window(C);
bool win_was_null = (win == NULL);
bool win_was_null = (win == nullptr);
if (win_was_null) {
win = static_cast<wmWindow *>(wm->windows.first);
CTX_wm_window_set(C, win);
}
if (win != NULL) {
UI_popup_block_invoke(C, wm_block_create_loading, (void *)filepath, NULL);
if (win != nullptr) {
UI_popup_block_invoke(C, wm_block_create_loading, (void *)filepath, nullptr);
/* Redraw to remove any open menus and show loading block. */
WM_redraw_windows(C);
if (win_was_null) {
CTX_wm_window_set(C, NULL);
CTX_wm_window_set(C, nullptr);
}
}
}