UI: Improved Operator Confirmations #104670

Merged
Harley Acheson merged 23 commits from Harley/blender:ConfirmDialogs into main 2024-01-04 18:42:34 +01:00
Member

Allow our current simple confirmations to be customized and extended
with callbacks, allowing different behaviors, different icons, and
showing more information.


Note that this PR does not make any changes to any existing confirmations and dialogs. It only allows us to later improve them through a simple means. Changes to individual dialogs will be proposed in separate PRs.

So the following are things that this PR allows us to do, but does not do with this code change:

Some operations have, or can optionally enabled, confirmations. For example when you delete an object by pressing "X" (but not when using Delete) you will get a confirmation that you must answer before the operator will continue. Right now that confirmation is very rudimentary, always with a little "?" icon, showing only the text "OK?", and a single button with the name of the operator.

This PR allows us to easily create custom confirmations through an optional operator callback that allow us to override the text, title, icon, button text, how it cancels, where it appears, etc.

File / Defaults / Save Startup File:

Confirm3.png

File / Defaults / Load Factory Settings:

image

Edit / Preferences / Load Factory Preferences. Current on top, patch bottom:

Confirm5.png

This patch also changes File / Cleanup / Unused Data-blocks, File / External Data / Unpack Linked Libraries, File / External Data / Pack Resources

Users gain an obvious way to cancel out, looks more industry standard, is auto-sizing, has clearer action verbs, and is customizable.

Note that the dialogs changed here are to serve as examples of what this code can do. if approved this would be merged without any dialogs changed. Then each proposed dialog change would be submitted as separate PRs.

Allow our current simple confirmations to be customized and extended with callbacks, allowing different behaviors, different icons, and showing more information. --- Note that this PR does **not make any change**s to any existing confirmations and dialogs. It only allows us to later improve them through a simple means. Changes to individual dialogs will be proposed in separate PRs. So the following are things that this PR _allows us to do_, but does not do with this code change: Some operations have, or can optionally enabled, confirmations. For example when you delete an object by pressing "X" (but not when using Delete) you will get a confirmation that you must answer before the operator will continue. Right now that confirmation is very rudimentary, always with a little "?" icon, showing only the text "OK?", and a single button with the name of the operator. This PR allows us to easily create custom confirmations through an optional operator callback that allow us to override the text, title, icon, button text, how it cancels, where it appears, etc. File / Defaults / Save Startup File: ![Confirm3.png](/attachments/e0b427f9-a8c2-4c00-96ce-f0c6e094cfbe) File / Defaults / Load Factory Settings: ![image](/attachments/80366870-7296-44ad-8716-0df0a57439c6) Edit / Preferences / Load Factory Preferences. Current on top, patch bottom: ![Confirm5.png](/attachments/a17817bc-6b8d-4340-b97d-42fb83e3c694) This patch also changes `File / Cleanup / Unused Data-blocks`, `File / External Data / Unpack Linked Libraries`, `File / External Data / Pack Resources` Users gain an obvious way to cancel out, looks more industry standard, is auto-sizing, has clearer action verbs, and is customizable. Note that the dialogs changed here are to serve as examples of what this code can do. if approved this would be merged without any dialogs changed. Then each proposed dialog change would be submitted as separate PRs.
Brecht Van Lommel added this to the User Interface project 2023-02-13 09:07:18 +01:00
Author
Member

My gut feeling with this one is that I won't be able to sell it while it changes the look of the current "OK?" confirms.

I could probably alter this so that it leaves default confirms completely as-is, while allowing all the other more complex ones. Basically "delete selected objects" would be left unchanged but we'd have nicer "Load Factory Preferences", etc. Seems like an easier sell.

My gut feeling with this one is that I won't be able to sell it while it changes the look of the current "OK?" confirms. I could probably alter this so that it leaves default confirms completely as-is, while allowing all the other more complex ones. Basically "delete selected objects" would be left unchanged but we'd have nicer "Load Factory Preferences", etc. Seems like an easier sell.
Harley Acheson force-pushed ConfirmDialogs from d040a8a4c5 to c121520fe4 2023-03-06 02:55:05 +01:00 Compare
Harley Acheson force-pushed ConfirmDialogs from c121520fe4 to aa8cf9499e 2023-04-01 19:37:29 +02:00 Compare
Harley Acheson force-pushed ConfirmDialogs from 01ccc01291 to 8495d2494d 2023-04-03 22:33:53 +02:00 Compare
Harley Acheson changed title from WIP: UI: Improved Operator Confirmations to UI: Improved Operator Confirmations 2023-04-03 22:34:47 +02:00
Harley Acheson force-pushed ConfirmDialogs from 8495d2494d to 88a12eec17 2023-06-28 22:38:35 +02:00 Compare
Harley Acheson added 2 commits 2023-07-19 02:34:21 +02:00
Harley Acheson added 1 commit 2023-07-19 04:03:17 +02:00
Harley Acheson added 4 commits 2023-07-27 06:53:52 +02:00
Dalai Felinto requested review from Pablo Vazquez 2023-08-01 18:02:00 +02:00
Harley Acheson added 1 commit 2023-08-24 02:57:47 +02:00
Harley Acheson requested review from Campbell Barton 2023-08-24 02:59:14 +02:00
Author
Member

The code to review here is everything BUT the actual dialog changes. Those would be in separate PRs after the main functionality is merged.

The code to review here is everything BUT the actual dialog changes. Those would be in separate PRs after the main functionality is merged.
Harley Acheson added 2 commits 2023-09-08 22:29:05 +02:00
Harley Acheson added 1 commit 2023-09-08 22:46:18 +02:00
Harley Acheson added 1 commit 2023-10-09 23:53:31 +02:00
Harley Acheson added 1 commit 2023-11-12 18:10:10 +01:00
Harley Acheson added 1 commit 2023-12-20 02:06:57 +01:00
Harley Acheson added 1 commit 2023-12-20 02:13:59 +01:00
Harley Acheson added 1 commit 2023-12-30 21:34:46 +01:00
Harley Acheson added 1 commit 2024-01-04 00:16:29 +01:00
Harley Acheson added 2 commits 2024-01-04 00:50:16 +01:00
Harley Acheson added 1 commit 2024-01-04 00:52:52 +01:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
4aa860d514
Unintentional formatting change
Author
Member

@blender-bot build

@blender-bot build
Harley Acheson added 1 commit 2024-01-04 02:10:40 +01:00
Harley Acheson added 1 commit 2024-01-04 02:14:40 +01:00
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
25fc92fedb
Removing one extra change from main.
Author
Member

@blender-bot build

@blender-bot build
Harley Acheson merged commit f40d4e0bda into main 2024-01-04 18:42:34 +01:00
Harley Acheson deleted branch ConfirmDialogs 2024-01-04 18:42:36 +01:00
Sign in to join this conversation.
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
1 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#104670
No description provided.