Fix #111804: Remove padding between node sockets when hidden #111981

Merged
Lukas Tönne merged 4 commits from LukasTonne/blender:fix-node-layout-padding into main 2023-09-06 10:34:25 +02:00
Member

Node drawing was adding some extra padding for each socket even when it
isn't visible. This patch makes the padding conditional on whether the
socket is visible and only when there is preceding items that require a
spacer.

Screenshot_20230905_162302

Node drawing was adding some extra padding for each socket even when it isn't visible. This patch makes the padding conditional on whether the socket is visible and only when there is preceding items that require a spacer. ![Screenshot_20230905_162302](/attachments/da52983a-a053-44c8-9d5c-859f89a652a1)
Lukas Tönne added 2 commits 2023-09-05 16:22:18 +02:00
Lukas Tönne requested review from Jacques Lucke 2023-09-05 16:23:32 +02:00
Lukas Tönne added this to the Nodes & Physics project 2023-09-05 16:23:36 +02:00
Jacques Lucke approved these changes 2023-09-05 16:30:20 +02:00
@ -486,2 +485,3 @@
const nodes::NodeDeclaration &decl = *node.declaration();
const bool has_buttons = node_update_basis_buttons(C, ntree, node, block, locy);
/* Checked at various places to avoid adding duplicate spacers without anything in between. */
bool need_spacer = true;
Member

need_spacer_after_item

`need_spacer_after_item`
LukasTonne marked this conversation as resolved
@ -488,0 +487,4 @@
bool need_spacer = true;
/* Space at the top. */
if (need_spacer) {
Member

Probably shouldn't check it here, because it's always true.

Probably shouldn't check it here, because it's always true.
LukasTonne marked this conversation as resolved
Lukas Tönne added 2 commits 2023-09-06 10:28:18 +02:00
Lukas Tönne merged commit ba8d165d3b into main 2023-09-06 10:34:25 +02:00
Lukas Tönne deleted branch fix-node-layout-padding 2023-09-06 10:34:26 +02:00
Sign in to join this conversation.
No reviewers
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 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#111981
No description provided.