UI: File Loading Waiting Feedback #112636

Merged
Harley Acheson merged 1 commits from Harley/blender:LoadingWait into main 2023-09-20 20:15:46 +02:00
Member

When loading a blend file remove any open menus and show a "waiting"
mouse cursor during the process.


This is just the parts of #104666 not involving a loading dialog. These parts were previously reviewed by Campbell here: https://archive.blender.org/developer/D10484.

Making this a separate PR allows use to delay the loading dialog if needed but still have the other niceties.

When loading a blend file remove any open menus and show a "waiting" mouse cursor during the process. --- This is just the parts of #104666 **not** involving a loading dialog. These parts were previously reviewed by Campbell here: https://archive.blender.org/developer/D10484. Making this a separate PR allows use to delay the loading dialog if needed but still have the other niceties.
Harley Acheson added 1 commit 2023-09-20 19:38:03 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
64105ccfc6
UI: File Loading Waiting Feedback
When loading a blend file remove any open menus and show a "waiting"
mouse cursor during the process.
Harley Acheson added this to the User Interface project 2023-09-20 19:39:32 +02:00
Author
Member

@blender-bot build

@blender-bot build
Harley Acheson merged commit 9173c142d6 into main 2023-09-20 20:15:46 +02:00
Harley Acheson deleted branch LoadingWait 2023-09-20 20:15:48 +02:00

Redrawing on save caused problems in the past, did you check: #92704, #97627?

Some possible issues:

  • WM_redraw_windows runs after BKE_CB_EVT_LOAD_PRE, any manipulation will be shown in the redraw or may cause data that hasn't been evaluated by the depsgraph to be drawn.
  • WM_redraw_windows runs before BKE_CB_EVT_LOAD_POST_FAIL runs, meaning some manipulation might not be taken into account.
  • WM_redraw_windows runs before tool-system initialization WM_toolsystem_init.

Redrawing is typically run from the event loop, calling from outside the event loop has caused problems in the past.

Other issues related to redrawing:

  • Python scripts may be loading blend files as a batch operation without the expectation of redrawing.
  • The depsgraph may not have updated data, so the data needed for drawing may not be available.

Also, why is redraw drawing done at the end of file loading? This is going to redraw anyway and shouldn't be needed.

Redrawing on save caused problems in the past, did you check: #92704, #97627? Some possible issues: - WM_redraw_windows runs after BKE_CB_EVT_LOAD_PRE, any manipulation will be shown in the redraw or may cause data that hasn't been evaluated by the depsgraph to be drawn. - WM_redraw_windows runs before BKE_CB_EVT_LOAD_POST_FAIL runs, meaning some manipulation might not be taken into account. - WM_redraw_windows runs before tool-system initialization `WM_toolsystem_init`. Redrawing is typically run from the event loop, calling from outside the event loop has caused problems in the past. Other issues related to redrawing: - Python scripts may be loading blend files as a batch operation without the expectation of redrawing. - The depsgraph may not have updated data, so the data needed for drawing may not be available. Also, why is redraw drawing done at the end of file loading? This is going to redraw anyway and shouldn't be needed.
Author
Member

Hmmm... was fairly certain we had dealt with this earlier with code provided by you:
https://archive.blender.org/developer/differential/0010/0010484/#295567

Will take a look tomorrow, and can always revert.

Hmmm... was fairly certain we had dealt with this earlier with code provided by you: https://archive.blender.org/developer/differential/0010/0010484/#295567 Will take a look tomorrow, and can always revert.

I don't think this implementation is safe enough. Even if we don't find immediate issues, redrawing at these points in the code seems too risky to me. I would expect this to redraw before file loading, in the operator invoke function before it has really done anything.

It could only re-blit existing framebuffers and not go into drawing code, so that no scene data is accessed. That's also how I think a progress bar should work during file loading or other slow operators. That would require an argument to wm_draw_update to skip actual region, cursor, overlay drawing .

Even that would require looking into the code to verify that it's not possible for the window/screen to be in some invalid state due to previously run operators and notifiers that have not been handled yet. And the case of Python code doing batch operations without redraws would also need to be detected.

I don't think this implementation is safe enough. Even if we don't find immediate issues, redrawing at these points in the code seems too risky to me. I would expect this to redraw before file loading, in the operator invoke function before it has really done anything. It could only re-blit existing framebuffers and not go into drawing code, so that no scene data is accessed. That's also how I think a progress bar should work during file loading or other slow operators. That would require an argument to `wm_draw_update` to skip actual region, cursor, overlay drawing . Even that would require looking into the code to verify that it's not possible for the window/screen to be in some invalid state due to previously run operators and notifiers that have not been handled yet. And the case of Python code doing batch operations without redraws would also need to be detected.
Author
Member

Will revert and give this more thought.

Will revert and give this more thought.
Author
Member

Reverted in e7df63ca72

Reverted in e7df63ca72
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#112636
No description provided.