Commit Graph

26 Commits

Author SHA1 Message Date
Clément Foucault
6b0f57facf Fix #142285: 3D cursor placement ignores unselectable objects
This was caused by 3dfec1ff73
which introduce the new behavior. This was to fix workflows
using a lot of semi-transparent objects which made nagivation
difficult.

This patch first roll back to the previous behavior: The
unselectable object will affect depth-aware operators.

This patch introduces a new visibility property to remove
the influence of objects in all depth picking operations
and selection operations. However the object is still
selectable through non-drawing selection operators
(e.g. select by material) and through the outliner.
This is to adress the aforementionned navigation issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/146706
2025-10-16 19:17:18 +02:00
hogan.mastanduno
dde9d21b91 OpenXR: VR Advanced Locomotion Phase 1
Includes the following changes to the existing Locomotion system for VR Scene Inspection:
 * new VR Navigation Preferences and VR Session Settings
 * changes to XR raycast logic and its visualization
 * new XR vignette that appears when moving
 * snap turning

Pull Request: https://projects.blender.org/blender/blender/pulls/144241
2025-10-01 22:16:12 +02:00
Nika Kutsniashvili
1067112c11 UI: Theme: Remove "Active Spline" theme property
In 3D Viewport theme settings there is "Active Spline" property, which behaves weirdly.
Color of that property is multiplied to color of curve handles. Even though it says active,
it's multiplied in selected and unselected states, for all curves all the time.

That doesn't make much sense, has no real value, and ends up only causing confusion.
Having this property on anything but pure black means that whatever colors you choose
for curve handles in Preferences isn't actually what you're getting them. If color is set to
high-saturation color it completely washes away all colors and makes it difficult to differentiate
between handle types.

I think there is no reason for this property to exist, so this PR just removes that property.

Pull Request: https://projects.blender.org/blender/blender/pulls/145360
2025-09-29 12:27:16 +02:00
Nika Kutsniashvili
28b97afda2 UI: Theme: Generalize geometry attribute properties
This PR generalizes properties for geometry (currently mesh only) attributes
found in 3D Viewport theme, namely:

- Combine "Edge Bevel" and "Vertex Bevel" into one "Bevel" property.
- Combine "Freestyle Edge Mark" and "Freestyle Face Mark" into one "Freestyle" property.
- Remove word "Edge" from Crease, Sharp, and Seam properties, to match others.
- Group all of the above together in the UI.

This is a breaking change (that will be handled with others in migration),
but doesn't introduce any visual changes in the default theme (and almost any theme).

Pull Request: https://projects.blender.org/blender/blender/pulls/146732
2025-09-25 14:02:46 +02:00
Nika Kutsniashvili
e0392599f8 UI: Theme: Remove face dot color property
Mesh faces have a separate theme color for selected dots (1px dot in the center of the face),
in both the 3D Viewport and the Image Editor.

I don't think there is any justification for why that 1 pixel has to be a different color from rest
of the active face. Even if result isn't satisfying, we should be tweaking Face Selected color
for this purpose. 1 pixel doesn't deserve its own theme setting.

This PR removes property from both editors, and instead uses "Face Selected" color with alpha
hardcoded to 1 (removed properties didn't have alpha). Also note that dot is still visible in 3D viewport
because Face Selected color is different from Face Mode Selected color, which is used for faces
when dots are drawn.

There are no visual changes in default themes.

Pull Request: https://projects.blender.org/blender/blender/pulls/145364
2025-09-24 19:04:28 +02:00
Clément Foucault
ff468e44ee Fix #144213: Overlay: Transparency ordering issue in texture paint
Caused by missing depth of in front objects in in-front buffer.
Forcing a depth prepass fixes the issue.
2025-09-08 12:55:16 +02:00
Nika Kutsniashvili
15567f597d UI: Remove unused theme properties
There are many accumulated unused properties in theme. Generally, it's a mess,
lot of copy-paste errors and leftovers between editors, shared functions with no
actual use, etc. Some were just added and never used, like Pattern and Layout nodes,
which were meant to be used with Texture Nodes I believe, but it never happened.

Overall 19 properties removed:

- 3D Viewport: Edge UV Face Select
- 3D Viewport: Last Selected Point

- Dope Sheet/Timeline: Value Sliders
- Dope Sheet/Timeline: View Sliders
- Nonlinear Animation: View Sliders
- Video Sequencer: Window Sliders
- Graph Editor/Drivers: Window Sliders

- Graph Editor/Drivers: Vertex Bevel
- Graph Editor/Drivers: Vertex Group Unreferenced
- Image/UV Editor: Vertex Bevel
- Image/UV Editor: Vertex Group Unreferenced

- Image/UV Editor: Freestyle Face Mask
- Image/UV Editor: Face Retopology
- Image/UV Editor: Face Orientation Front
- Image/UV Editor: Face Orientation Back

- Node Editors: Selected Text
- Node Editors: Pattern Node
- Node Editors: Layout Node

- Video Sequencer: Draw Action

---

Details:
- Made Vertex Bevel and Vertex Group Unreferenced colors in `rna_def_userdef_theme_spaces_vertex`
optional, so that they don't appear in Graph Editor and UV Editor theme properties, where they're unused.
- Same thing in `rna_def_userdef_theme_spaces_face` for face attributes (Freestyle Mark, Retopology),
so that they don't appear in UV Editor, where they're unused. Also did same for face orientation colors,
but used different argument for them, since they could be used in future (remember seeing PR for this).

Pull Request: https://projects.blender.org/blender/blender/pulls/143782
2025-08-17 15:39:39 +02:00
Germano Cavalcante
cb51fc5471 Fix #141741: Combed particles are affected by occlusion of other particles
Caused by 7688677e29, which replaced `DRW_draw_depth_object` with
`DRW_draw_depth_loop`.

`DRW_draw_depth_object` simply rendered the object without actually
using the DRW manager capabilities.

Now, with `DRW_draw_depth_loop`, the depth is rendered based on what
the engine sees with overlays disabled, which doesn't hide the
particles.

The solution to this issue is to skip particle rendering in the overlay
engine in `DRW_draw_depth_loop`.

Co-authored-by: Miguel Pozo <pragma37@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/141981
2025-07-24 16:24:19 +02:00
Clément Foucault
32d64d35bb Refactor: GPU: Texture: Replace eGPUTextureFormat by TextureFormat
This offers better semantic and safety of the API.

Part of #130632

Pull Request: https://projects.blender.org/blender/blender/pulls/142818
2025-07-22 14:58:54 +02:00
Sybren A. Stüvel
282a99d99f Merge remote-tracking branch 'origin/blender-v4.5-release' 2025-07-03 12:07:00 +02:00
Sybren A. Stüvel
d08c4e8cc9 Fix: Overlay: Invalid RGB order in overlay theme colors
Fix an accidental swap of the green & blue channel when drawing theme-
colored elements in the overlay engine.

Thanks @fclem for finding the issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/141382
2025-07-03 11:57:33 +02:00
Clément Foucault
1a5f29cb07 Overlay: Move text cache managment to the Overlay::Instance
This avoid legacy code inside the DRWContext.

Note that this change the draw order w.r.t. gizmos. Now the
gizmos will hide the text.

Moreover, streamline the condition for enabling text drawing
in order to fix #78971.
2025-06-25 13:05:06 +02:00
Jeroen Bakker
a5e30aaa9e Refactor: GPU: Use Depth32F
Blender uses depth24 for legacy reasons. All backends that we support
have support for depth32f.

This PR updates all usages of depth24 with depth32f.

- depth24 are not supported on AMD/Intel/Vulkan and Metal. There depth32f
  was already used to work around this limitation.
- This allows us to implement reverse depth in workbench, overlay and
grease pencil in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/140531
2025-06-19 13:30:50 +02:00
Clément Foucault
4fe75da973 EEVEE: Remove all remaining reference of EEVEE next
This changes the engine identifier back to `BLENDER_EEVEE`.

We keep the `BLENDER_EEVEE_NEXT` identifier around for
versioning reasons (have to detect when it is the active
engine of a older file).

This also rename a bunch of pannels that were using `next`
in their name.

This is a breaking change for Addons compatibility.

Pull Request: https://projects.blender.org/blender/blender/pulls/140282
2025-06-13 12:36:14 +02:00
Miguel Pozo
2acb65a7d5 Draw: Remove direct use of duplis from engine code
Required for grouping multiple `Object`s into a single `ObjectRef`.
Part of https://projects.blender.org/blender/blender/issues/130291#issuecomment-1586807

Pull Request: https://projects.blender.org/blender/blender/pulls/139855
2025-06-09 19:10:12 +02:00
Clément Foucault
388fcdb934 Cleanup: Overlay: Rename edit_text.hh to text.hh for consistency 2025-05-08 15:12:26 +02:00
Miguel Pozo
e231adc371 Revert "Overlay: Skip passes not needed"
This reverts commit c0d6675c84.
The DEG_id_type_any_exists function only takes the original type into
account.

Fix #138548
2025-05-07 17:05:48 +02:00
sentharn
69610383b9 Fix #138301: Rename GLSL "select" for Intel GPUs
The GLSL processor appears to dislike a member named "select" when a function named "select" exists.

The member has been renamed to object_select to avoid collisions.

Pull Request: https://projects.blender.org/blender/blender/pulls/138466
2025-05-06 19:42:09 +02:00
Miguel Pozo
c0d6675c84 Overlay: Skip passes not needed
Avoid initializing passes (and requesting their shaders) unless they're
actually needed.
Reduces the number of compiled Overlay shaders at startup
from 70 to 22.
Improves startup times.

Pull Request: https://projects.blender.org/blender/blender/pulls/138457
2025-05-06 16:09:12 +02:00
Miguel Pozo
d3f3dc4d72 Fix: Overlay: Material Preview when !bl_use_eevee_viewport 2025-04-30 20:46:00 +02:00
Clément Foucault
82dd9f68a4 Fix: Overlay: Compilation error on OpenGL
Caused by reserved `active` keyword in GLSL.
2025-04-30 12:44:00 +02:00
Clément Foucault
7714998537 Overlay: Remove macros for globals uniform buffer access
Pull Request: https://projects.blender.org/blender/blender/pulls/138068
2025-04-30 09:55:52 +02:00
Clément Foucault
cac80a9e3c Cleanup: Overlay: Rename GlobalsUboStorage to UniformData 2025-04-30 09:55:48 +02:00
Clément Foucault
27a8c00157 Overlay: Split theme colors and sizes into different structs
Centralize processing of each and allow
more semanticaly correct references.
2025-04-30 09:55:48 +02:00
Clément Foucault
954f7b0965 Fix #138048: Overlay: Transparent meshes hide overlays in Cycles
This happened only in material preview.

This is because the overlay engine was not considering material
preview as using EEVEE.
2025-04-29 16:06:53 +02:00
Clément Foucault
5bd572d4fd Cleanup: Overlay: Remove _next in overlay filename
These are not needed anymore since the legacy codebase
is gone.
2025-04-16 20:51:24 +02:00