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.
Member

Close open menus, show "waiting" mouse cursor, and show a loading
dialog when loading a new blend file, to better indicate that something
is happening.


When you select File / Open to load a blend file, it can seem like the program has hung. Quite often the menu will remain open and onscreen the entire time, like this:

Loading1.png

This patch closes that menu and shows a small dialog in the middle of the window, with the thumbnail of the blend file, to indicate that something is happening.

image

Close open menus, show "waiting" mouse cursor, and show a loading dialog when loading a new blend file, to better indicate that something is happening. --- When you select File / Open to load a blend file, it can seem like the program has **hung**. Quite often the menu will remain open and onscreen the entire time, like this: ![Loading1.png](/attachments/a0285380-0e78-4a88-8f34-426cf49f175a) This patch closes that menu and shows a small dialog in the middle of the window, with the thumbnail of the blend file, to indicate that something is happening. ![image](/attachments/3a811f4c-f34d-441e-9fce-7ad652c54562)
Brecht Van Lommel added this to the User Interface project 2023-02-13 09:08:50 +01:00
Harley Acheson force-pushed LoadingDialog from ae6e5418e3 to df7ec04932 2023-04-25 22:17:05 +02:00 Compare
Harley Acheson force-pushed LoadingDialog from df7ec04932 to e2221acb16 2023-05-17 21:38:14 +02:00 Compare
Contributor

@Harley
Looks neat !
Will the new design include a loading bar/percentage, and possibly a description of what is being loaded as well?
(...having a description might be helpful to find out at what stage a certain file crashes...)

@Harley Looks neat ! Will the new design include a loading bar/percentage, and possibly a description of what is being loaded as well? (...having a description might be helpful to find out at what stage a certain file crashes...)
Author
Member

@Adi.Sage - Will the new design include a loading bar/percentage, and possibly a description of what is being loaded as well?

Sadly, no.

Hard to describe well, but our current design does not allow a dialog to be active and working during that time. Basically we destroy everything to do with the old file and then create everything again based on the new one. This PR only "works" because this dialog is drawn just before everything is destroyed and just keeps being shown for a while because the interface is not drawn again until the new file is loaded.

> @Adi.Sage - Will the new design include a loading bar/percentage, and possibly a description of what is being loaded as well? Sadly, no. Hard to describe well, but our current design does not allow a dialog to be active and working during that time. Basically we destroy everything to do with the old file and then create everything again based on the new one. This PR only "works" because this dialog is drawn just before everything is destroyed and just keeps being shown for a while because the interface is not drawn again until the new file is loaded.
Contributor

@Harley
Got it. Thanks for clarifying.
Pretty impressive you could get this working given the constraints 😅 hope this gets through by 4.0!

@Harley Got it. Thanks for clarifying. Pretty impressive you could get this working given the constraints 😅 hope this gets through by 4.0!
Harley Acheson added 2 commits 2023-07-14 20:21:15 +02:00
Harley Acheson added 2 commits 2023-08-24 01:29:49 +02:00
Harley Acheson requested review from Pablo Vazquez 2023-08-24 01:30:12 +02:00
Author
Member

Approved in principle by the UI Module. @pablovazquez will check for visual tweaks. This was code-reviewed by Campbell while it was on Phab.

Approved in principle by the UI Module. @pablovazquez will check for visual tweaks. This was code-reviewed by Campbell while it was on Phab.
Member

First, love this! At the moment it really feels like Blender hungs when opening big files.

Approved in principle by the UI Module. @pablovazquez will check for visual tweaks.

Regarding design tweaks my first impression is that having the thumbnail on top, makes it look similar to the splash screen.

I think an horizontal layout may work better:
image

It'd still work without thumbnail:
image

These screenshots have a darkened background underneath the popup, to communicate the lack of access we have over it.

I also added the file size, as it might help understand the reason behind a lengthy load time.

A progress bar or detailed text on what's going on (loading objects, compiling shaders, depsgraph, etc) would be ideal, but I don't think it's easy at the moment so I skipped it.

First, love this! At the moment it really feels like Blender hungs when opening big files. > Approved in principle by the UI Module. @pablovazquez will check for visual tweaks. Regarding design tweaks my first impression is that having the thumbnail on top, makes it look similar to the splash screen. I think an horizontal layout may work better: ![image](/attachments/8fa2a5ff-9b4e-46f1-b8b7-0829ee6717d1) It'd still work without thumbnail: ![image](/attachments/93d80758-7410-4c54-bcca-aaed7befd784) These screenshots have a darkened background underneath the popup, to communicate the lack of access we have over it. I also added the file size, as it might help understand the reason behind a lengthy load time. A progress bar or detailed text on what's going on (loading objects, compiling shaders, depsgraph, etc) would be ideal, but I don't think it's easy at the moment so I skipped it.
331 KiB
321 KiB
Harley Acheson changed title from UI: File Loading Dialog to WIP: UI: File Loading Dialog 2023-08-30 04:07:46 +02:00
Harley Acheson changed title from WIP: UI: File Loading Dialog to WIP: UI: File Loading Dialog 2023-08-30 04:07:58 +02:00
Harley Acheson added 2 commits 2023-08-30 04:10:50 +02:00
Member

Ooh it's getting there!

I know it's WIP just sharing a quick video of it's current status for others to see:

Ooh it's getting there! I know it's WIP just sharing a quick video of it's current status for others to see: <video src="/attachments/627fd21b-c666-4cae-9732-e1092b5aff10" title="opening_file_indicator.mp4" controls loop></video>
Harley Acheson added 2 commits 2023-09-06 03:08:50 +02:00
Harley Acheson added 2 commits 2023-09-07 01:58:02 +02:00
Harley Acheson changed title from WIP: UI: File Loading Dialog to UI: File Loading Dialog 2023-09-07 02:01:11 +02:00
Author
Member

@pablovazquez

This might be closer to what you want. The preview's width is the same as your mockup, but most previews are square so most will be taller than the mockup.

It shows the text as you requested, including the formatted file size.

It does darken the screen, but only the portion between the TopBar and the StatusBar, just because of how these things are treated and where the custom drawing callbacks are called. If this isn't good enough I can keep looking into that.

@pablovazquez This might be closer to what you want. The preview's width is the same as your mockup, but most previews are square so most will be taller than the mockup. It shows the text as you requested, including the formatted file size. It does darken the screen, but only the portion between the TopBar and the StatusBar, just because of how these things are treated and where the custom drawing callbacks are called. If this isn't good enough I can keep looking into that.
Harley Acheson added 1 commit 2023-09-20 20:52:08 +02:00
Author
Member

Closing as this isn't a viable path. It worked in most cases just by exploiting limitations of our UI drawing while loading. Problems with this approach can be found here: #112636

Closing as this isn't a viable path. It worked in most cases just by exploiting limitations of our UI drawing while loading. Problems with this approach can be found here: https://projects.blender.org/blender/blender/pulls/112636
Harley Acheson closed this pull request 2024-01-26 18:18:18 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#104666
No description provided.