Custom editor modes proposal #97234
Labels
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
9 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#97234
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
Currently a mode and it's internal data structures are closely related,
which has been fine for most general use cases however can limit extending Blender for more specific work-flows.
There are two projects which prompted investigation into this task.
Both these projects are an example where a new mode makes sense from the user perspective,
but the internal data being stored can be shared between multiple "modes".
This proposal suggests a way we can support modes such as "Vertex Paint" or "Retopology" mode,
while internally sculpt or edit-mode data may be used.
The advantage of this is we avoid having a lot of hard coded checks in the code,
as well as the potential for add-ons to define their own modes & work-flows.
Proposed Solution
Add support for C/C++ & Python code to register custom modes, allowing add-ons and app-templates to make use of this.
Expose these modes in the UI (mode-selector and possibly pie-menu TBD.
Validate the design with proto-type modes, gather feedback from developers and script authors.
Components
Here are the main components that a custom-mode is comprised of.
Customizable: the following elements should be (optionally) customizable:
Operators.
Gizmos.
Panels.
Region Drawing Callbacks.
Static: There is currently no intention to make these areas customizable.
Drawing (entirely replacing view-port drawing for example).
Although it may be useful to have drawing options to fit the needs of modes such as retopology.
Animation/Depsgraph/Notifications.
Undo system.
NOTE: this doesn't prevent additional customization from being supported later on.
Scope
The main use case for customizing modes will be custom object modes.
however there is no reason the design needs to enforce this limitation.
This can be written in a way that a custom-mode can be reference a space-type as well,
so in the future it's possible to have custom image/UV/sequencer ... or other modes.
Customizing Components
Modes can be registered similar to rendering engines, operators etc.
This is just a rough outliner of how this could work.
Internal Details
To avoid increasing complexity the
Object.mode
andContext.mode
will be left as is.An additional custom/derived mode will be available for code that needs to check the mode to draw the UI handle key-maps
etc.
Challenges / Pain Points
Open Topics
These topics are our of scope for this proposal or can be postponed.
Added subscriber: @ideasman42
Custom modes ()to Custom editor modes proposalChanged status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @TheRedWaxPolice
Added subscriber: @Limarest
Sound useful. It would also let the users customize existing modes. For example, making a custom sculpt mode where only a few brushes are present
Added subscriber: @ga0338751
Added subscriber: @GeorgiaPacific
Added subscriber: @fsiddi
@Limarest yes, you could create a custom-mode that only replaces one of the customizable components (so yes, you could only replace the toolbar .... or keymap/menus ... etc).
Added subscriber: @hzuika
Added subscriber: @RedMser
Added subscriber: @kevindietrich