Overlay Next: Refactor #107734
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#107734
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "pragma37/blender:pull-overlay-next-refactor"
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?
Refactor of #107045, replacing templates with construction time booleans.
Additionally:
overlay_next
prefix for files.GPUShader
andGPUBatch
withunique_ptr
.There is still quite a lot of TODOs in the code. Some are rather low hanging fruits that would improve code quality (like in overlay_next_instance.cc).
But the core of the code is good to go.
Will test it on Metal too.
@ -0,0 +29,4 @@
background_type = BG_SOLID;
color_override[3] = 1.0f;
}
/*
Why is this commented?
I think it's because the space type is not stored anywhere yet.
You probably just forgot to add the TODO.
Just for reference, I haven't looked into most of the code yet.
This is 99% your patch, just without the templates (so you could provide feedback) and some minimal changes.
@ -0,0 +1,267 @@
/* SPDX-License-Identifier: GPL-2.0-or-later
What is the reasonning on combining all the headers inside this one? The goal of split headers is also to ease code searchability / readability.
Initially, when I moved the implementations to their on cc files I moved all declarations to the same header (Workbench Next style).
I personally find it more readable to have all the declarations together, especially if you're looking at the code for the first time.
Then when we moved almost everything back to headers only the shared classes stayed in the private header.
@ -0,0 +24,4 @@
namespace blender::draw::select {
enum class eSelectionType { DISABLED = 0, ENABLED = 1 };
remove
e
prefixWhat's the rule here?
All the enums (at least most of them?) in the code base have the
e
prefix.There was a decision (or discussion, I cannot find it at the moment) not so long ago to not use that prefix as it isn't clear and enums are usually called
Types
or something else that indicates they are enums.This hasn't been applied to the whole codebase that's why most of them remains.
Ok, good to know!
@ -0,0 +22,4 @@
state.depsgraph = ctx->depsgraph;
state.view_layer = ctx->view_layer;
state.scene = ctx->scene;
state.v3d = ctx->v3d;
The overlay instance can be called for 2D views. This is something that we might want to revisit at some point but that would not be a huge refactor to do. So I would just suggest to check for
state.v3d != nullptr
andstate.rv3d != nullptr
for anything that need to access them.