UI: Button to Save Custom Themes #119491

Merged
Harley Acheson merged 1 commits from Harley/blender:SaveThemeButton into main 2024-03-27 01:12:01 +01:00
Member

Add a new "Save" to the Themes list in Preferences to save (overwrite)
custom themes. The operator has a poll function to disable for built-in
themes. Shows a confirmation when overwriting.


Offered as an alternative to #111506

New themes can be easily created in Blender: Edit / Preferences / Themes, Presets, "+" button. This prompts for a name and then creates a new theme with the current settings in your profile.

However...

How do you update that theme file after you make changes? Very unintuitively, you click on that "+" again, enter the name of your theme (exactly), then click "OK". In a nutshell you create a new theme with the same name and therefore overwrite the old file with the new settings.

This PR allows you to just click a "Save" button.

Disabled for built-in themes:

image

Enabled for custom themes:

image

Confirmation:

image

Not exactly sure what order these buttons should be in.

Add a new "Save" to the Themes list in Preferences to save (overwrite) custom themes. The operator has a poll function to disable for built-in themes. Shows a confirmation when overwriting. --- Offered as an alternative to #111506 New themes can be easily created in Blender: Edit / Preferences / Themes, Presets, "+" button. This prompts for a name and then creates a new theme with the current settings in your profile. However... How do you update that theme file after you make changes? Very unintuitively, you click on that "+" again, enter the name of your theme (exactly), then click "OK". In a nutshell you create a _new_ theme with the _same name_ and therefore overwrite the old file with the new settings. This PR allows you to just click a "Save" button. Disabled for built-in themes: ![image](/attachments/421e15d7-879c-4b72-974d-69cf631eef39) Enabled for custom themes: ![image](/attachments/2c81b080-1099-4970-acff-bb6f76a92ed8) Confirmation: ![image](/attachments/0b696a99-fc4a-4083-bcc1-f6bbff91807b) Not exactly sure what order these buttons should be in.
Harley Acheson added 1 commit 2024-03-15 00:43:53 +01:00
84863f8429 UI: Button to Save Custom Themes
Add a new "Save" to the Themes list in Preferences to save (overwrite)
custom themes. The operator has a poll function to disable for built-in
themes. Shows a confirmation when overwriting.
Harley Acheson added this to the User Interface project 2024-03-15 00:44:30 +01:00
Author
Member

@Rawalanche

Do you mind taking a look at this?

@Rawalanche Do you mind taking a look at this?
Contributor

@Rawalanche

Do you mind taking a look at this?

Yes, perfect. I wanted to finish mine, but unfortunately I had to get back to my daily job and then didn't notice Julian's comment. I am thankful you took it over.

> @Rawalanche > > Do you mind taking a look at this? Yes, perfect. I wanted to finish mine, but unfortunately I had to get back to my daily job and then didn't notice Julian's comment. I am thankful you took it over.
Author
Member

@Rawalanche - I wanted to finish mine...

No worries at all. I had wanted to look at this issue after changing the confirmations.

Not asking you to test this PR if you don't have time. But mostly wanting to make sure I was addressing the issues correctly and am not misunderstanding anything about the problem or your solution.

I am assuming this current lack of a "save" also applies to the keymap editor?

@Rawalanche - I wanted to finish mine... No worries at all. I had wanted to look at this issue after changing the confirmations. Not asking you to test this PR if you don't have time. But mostly wanting to make sure I was addressing the issues correctly and am not misunderstanding anything about the problem or your solution. I am assuming this current lack of a "save" also applies to the keymap editor?
Contributor

@Rawalanche - I wanted to finish mine...

No worries at all. I had wanted to look at this issue after changing the confirmations.

Not asking you to test this PR if you don't have time. But mostly wanting to make sure I was addressing the issues correctly and am not misunderstanding anything about the problem or your solution.

I am assuming this current lack of a "save" also applies to the keymap editor?

I haven't built blender for a few months, before SVN deprecation even, but luckily this is Python only, so I can try to just edit the python files in the release to check it out.

As for the keymap editor, yes, the exactly same problem. Only way to save modified keymap is to use add keymap button and type the exact same name, so save button would be appropriate there as well.

I think there may be few other places where preset management exist and save button is missing, but I can't think of any from the top of my mind.

> @Rawalanche - I wanted to finish mine... > > No worries at all. I had wanted to look at this issue after changing the confirmations. > > Not asking you to test this PR if you don't have time. But mostly wanting to make sure I was addressing the issues correctly and am not misunderstanding anything about the problem or your solution. > > I am assuming this current lack of a "save" also applies to the keymap editor? > I haven't built blender for a few months, before SVN deprecation even, but luckily this is Python only, so I can try to just edit the python files in the release to check it out. As for the keymap editor, yes, the exactly same problem. Only way to save modified keymap is to use add keymap button and type the exact same name, so save button would be appropriate there as well. I think there may be few other places where preset management exist and save button is missing, but I can't think of any from the top of my mind.
Harley Acheson requested review from Pablo Vazquez 2024-03-18 22:29:34 +01:00
Harley Acheson merged commit ee38a7b723 into main 2024-03-27 01:12:01 +01:00
Harley Acheson deleted branch SaveThemeButton 2024-03-27 01:12:03 +01:00
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
2 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#119491
No description provided.