Refactor High level UI code into its own module #85484

Open
opened 2021-02-09 06:08:14 +01:00 by Aaron Carlisle · 4 comments
Member

As part of #75724, many UI layouts are now coded inside large modules (nodes, modifiers, etc).
This has the disadvantage of these modules depending on /editors for simple high-level button code.

An example of this can be seen in cfa48c84d0

A possible solution to this is moving some high-level UI code from editors in its own UI module.

Candidates for such a change are:

UI_icons.h
UI_interface_icons.h
UI_interface.h
UI_resources.h
UI_view2d.h
... possible others

Some files editor code should be moved to UI_:

ED_screen.h --> UI_screen.h
ED_gizmo_library.h --> UI_gizmo_library.h
ED_gizmo_utils.h --> UI_gizmo_utils.h

This task is first meant to gauge if this is something we should do. After then we can move more into the how.

As part of #75724, many UI layouts are now coded inside large modules (nodes, modifiers, etc). This has the disadvantage of these modules depending on `/editors` for simple high-level button code. An example of this can be seen in cfa48c84d0 A possible solution to this is moving some high-level UI code from editors in its own UI module. Candidates for such a change are: ``` UI_icons.h UI_interface_icons.h UI_interface.h UI_resources.h UI_view2d.h ... possible others ``` Some files editor code should be moved to `UI_`: ``` ED_screen.h --> UI_screen.h ED_gizmo_library.h --> UI_gizmo_library.h ED_gizmo_utils.h --> UI_gizmo_utils.h ``` This task is first meant to gauge if this is something we should do. After then we can move more into the how.
Author
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

I like this idea. Something to note is that only a small amount of the definitions in UI_resources.h and UI_interface.h is needed for the more distributed button code. For example, I think the modifiers panel drawing and node drawing should only need the uiLayout set of functions, and the icon types from UI_resources.h.

I like this idea. Something to note is that only a small amount of the definitions in `UI_resources.h` and `UI_interface.h` is needed for the more distributed button code. For example, I think the modifiers panel drawing and node drawing should only need the `uiLayout` set of functions, and the icon types from `UI_resources.h`.
Philipp Oeser removed the
Interest
User Interface
label 2023-02-10 09:23: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
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#85484
No description provided.