UI: Added Edge Width option in preferences for 3DView and UV/Image Editor #104741

Merged
Clément Foucault merged 4 commits from Xylvier/blender:xylvier-edge-width-patch into main 2023-02-27 20:02:49 +01:00
Contributor

Previously D16255
There is no option to adjust the edge_width like there is in the preferences for vertex_size and face_dot_size.

I only added the option for 3DView and UV/Image Editor, and limited both to a max size of 5 pixel, since the edges do not look very nice with too high values.
In the UV Editor only, there are always black outlines on the edges, I could not find a way to reduce the increasing thickness of these black outlines.

The default edge_width of 1 pixel:

shows the marked new attribute with a value of 1 in the settings for the UV/Imageeditor

Here the edge_width with a falue of 3:

shows the marked new attribute with a value of 3 in the settings for the UV/Imageeditor

And here the visible increase of the dark border of the edges and their overlap (even at the maxed size of 5):

shows the marked new attribute with a value of 5 in the settings for the UV/Imageeditor and points out the thicker border in the left side UV Editor

Lastly for the 3DView the max edge_width of 5 looks like this:

shows the marked new attribute with a value of 5 for the settings for the 3DView and it's resulting wider lines in the right side visible 3DView

Previously [D16255](https://developer.blender.org/D16255) There is no option to adjust the edge_width like there is in the preferences for vertex_size and face_dot_size. I only added the option for 3DView and UV/Image Editor, and limited both to a max size of 5 pixel, since the edges do not look very nice with too high values. In the UV Editor only, there are always black outlines on the edges, I could not find a way to reduce the increasing thickness of these black outlines. The default edge_width of 1 pixel: ![shows the marked new attribute with a value of 1 in the settings for the UV/Imageeditor](/attachments/f48fc1e5-2b49-4337-bd86-f2ad4aca42c3) Here the edge_width with a falue of 3: ![shows the marked new attribute with a value of 3 in the settings for the UV/Imageeditor](/attachments/d0b0b1ea-5967-46b2-80a2-ccae18933638) And here the visible increase of the dark border of the edges and their overlap (even at the maxed size of 5): ![shows the marked new attribute with a value of 5 in the settings for the UV/Imageeditor and points out the thicker border in the left side UV Editor](/attachments/1590965f-af2a-49d0-a11e-1afecaabf940) Lastly for the 3DView the max edge_width of 5 looks like this: ![shows the marked new attribute with a value of 5 for the settings for the 3DView and it's resulting wider lines in the right side visible 3DView](/attachments/fcd35341-97a5-4db6-8bbf-c5ce5333e5aa)
Patrick Busch added 1 commit 2023-02-14 13:44:47 +01:00
8b56df25c0 UI: Added Edge Width option in preferences for 3DView and UV/Image Editor
There was no option to adjust the edge_width like there is in the preferences for vertex_size and face_dot_size.

I only added the option for 3DView and UV/Image Editor, and limited both to a max size of 5 pixel, since the edges do not look very nice with too high values.
In the UV Editor only, there are always black outlines on the edges, I could not find a way to reduce the increasing thickness of these black outlines.

The default edge_width of 1 pixel.
Clément Foucault requested review from Clément Foucault 2023-02-16 17:23:11 +01:00
Clément Foucault added this to the EEVEE & Viewport project 2023-02-16 17:23:17 +01:00
Clément Foucault requested changes 2023-02-27 09:58:57 +01:00
@ -178,2 +178,2 @@
gb->size_edge = U.pixelsize * (1.0f / 2.0f); /* TODO: Theme. */
gb->size_edge_fix = U.pixelsize * (0.5f + 2.0f * (2.0f * (gb->size_edge * (float)M_SQRT1_2)));
gb->size_edge = U.pixelsize *
max_ff(0.5f, UI_GetThemeValuef(TH_EDGE_WIDTH) * (float)M_SQRT2 / 4.0f);

I don't understand this value. It looks like it was copied from gb->size_vertex. For point size it make sense because there was a square dot to circle dot surface conversion (from the 2.8 days).

To me, the right value should be:

U.pixelsize * max_ff(1.0f, UI_GetThemeValuef(TH_EDGE_WIDTH)) / 2.0f;
I don't understand this value. It looks like it was copied from `gb->size_vertex`. For point size it make sense because there was a square dot to circle dot surface conversion (from the 2.8 days). To me, the right value should be: ``` U.pixelsize * max_ff(1.0f, UI_GetThemeValuef(TH_EDGE_WIDTH)) / 2.0f;
fclem marked this conversation as resolved
@ -336,6 +336,7 @@ typedef enum ThemeColorID {
TH_EDGE_BEVEL,
TH_VERTEX_BEVEL,
TH_EDGE_WIDTH,

This should be move right after TH_VERTEX_SIZE.

This should be move right after `TH_VERTEX_SIZE`.
Patrick Busch added 1 commit 2023-02-27 17:51:04 +01:00
abd96598de Moved "TH_EDGE_WIDTH" behind "TH_VERTEX_SIZE".
As requested, I moved "TH_EDGE_WIDTH" to right behind "TH_VERTEX_SIZE".
Patrick Busch added 1 commit 2023-02-27 18:24:34 +01:00
2655d5546b Corrected the value for "gb->size_edge"
Originally I used the "gb->size_vertex" as an example, yes.
Adjusted to and tested with the suggested value and it's working fine.
Patrick Busch requested review from Clément Foucault 2023-02-27 18:30:30 +01:00
Clément Foucault approved these changes 2023-02-27 19:54:32 +01:00
Clément Foucault changed title from WIP: UI: Added Edge Width option in preferences for 3DView and UV/Image Editor to UI: Added Edge Width option in preferences for 3DView and UV/Image Editor 2023-02-27 19:54:49 +01:00
Clément Foucault added 1 commit 2023-02-27 19:55:53 +01:00
Clément Foucault merged commit 5ea41a9942 into main 2023-02-27 20:02:49 +01:00
Member

Thanks for the implementation, this is great addition. Is it possible to remove the 5 pixel limit you added? If not, can you please increase the limit? Bear in mind not everyone is using the same kind of dpi and resolution and what you think ugly might not be so bad for someone else.

thanks

Thanks for the implementation, this is great addition. Is it possible to remove the 5 pixel limit you added? If not, can you please increase the limit? Bear in mind not everyone is using the same kind of dpi and resolution and what you think ugly might not be so bad for someone else. thanks
Author
Contributor

@kursadk I made a new PR 105544, as this one is already merged.
@fclem I requested the review from you again, I hope you don't mind.

@kursadk I made a new [PR 105544](https://projects.blender.org/blender/blender/pulls/105544), as this one is already merged. @fclem I requested the review from you again, I hope you don't mind.
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 Assignees
3 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#104741
No description provided.