Fix #117780: Allow Embossing With Horizontal Layouts #118304
No reviewers
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#118304
Loading…
Reference in New Issue
No description provided.
Delete Branch "Harley/blender:Fix117780"
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?
Although it is nice to skip embossing for middle buttons in aligned
rows, this only applies to vertically-aligned buttons. Horizontal ones
need to keep their embossing, if enabled.
Thanks for working on this!
I get the idea of using the height to width ratio as a heuristic, but this doesn't seem to work too well. For me it doesn't fix the issue in all cases and it also undoes some of the nice fixes from your previous patch, like reintroducing the emboss inside of stacks:
I've tinkered a bit and I think we can estimate whether a button should get an emboss by checking if it's bottom edge is close to the bottom edge of it's block. At least it works pretty well in my test case (EDIT: I actually found that this doesn't work in a lot of panels. There can be several aligned groups of buttons in the same block. So the assumption that the block's bottom edge is close to the bottom edge of the lowest aligned button doesn't hold true in general.)
These are the changes on top of your patch in case you think we could go this route (I hope the attached diff applies for you, since I'm not up to date with current main branch):
Diff
I've attached my test file, as well. I'm on a small laptop screen and some of the issues rely on the editor being rather narrow, so you might need to change the window size a bit to reproduce the result from my screenshot.
Hmm, seems like I missed a few cases in my testing, where the approach in my previous doesn't work.
There can be several aligned groups of buttons in the same block. So the assumption that the block's bottom edge is close to the bottom edge of the lowest aligned button doesn't hold true in general and this happens a lot in panels:
Some of these cases can be fixed by also checking the corner rounding of the bottom corners like in your original fix, but that still misses a few cases.
I wonder if we could just use the button's
drawflag
, like in the diff below. After all that's already how the buttons are propperly stitched together, so it seems more reliable and less roundabout.Diff
This does seem pretty promising, but there might be more cases I've missed...
So far the only thing that misses is in the Properties Tabs. In your capture you can see a red dot on the middle ones. So I added some checks for that in your version and updated this PR.
Somehow I managed to accidentally rebase this for main though. Oh well, not a problem right now.
Yeah, looks much better without those!
I couldn't find a case where this fails when going through all the default workspaces, so I think this is good to go.
30c5195fff
to73f83a7d27
@blender-bot build
@blender-bot build