Fix #114861: Add NLA region padding if markers are present. #115213

Merged
Nate Rupsis merged 4 commits from nrupsis/blender:114861-nla-markers-stuck into main 2023-11-22 21:01:27 +01:00
Member

With the changes in #109473, the bottom strip is now hidden if markers are present.

This fix adds region padding to the NLA if markers are present.

Before:
image

After:
image

With the changes in #109473, the bottom strip is now hidden if markers are present. This fix adds region padding to the NLA if markers are present. Before: ![image](/attachments/76719154-edc2-43cc-8ba0-1d13ba134395) After: ![image](/attachments/9873c9fc-a4e2-40d0-bdd5-2552f953b36e)
Nate Rupsis added the
Module
Animation & Rigging
label 2023-11-20 23:05:41 +01:00
Nate Rupsis added 1 commit 2023-11-20 23:05:53 +01:00
Nate Rupsis requested review from Harley Acheson 2023-11-20 23:08:01 +01:00
Nate Rupsis requested review from Christoph Lendenfeld 2023-11-20 23:08:02 +01:00
Nate Rupsis requested review from Nathan Vegdahl 2023-11-20 23:08:12 +01:00
Christoph Lendenfeld approved these changes 2023-11-21 10:29:25 +01:00
Christoph Lendenfeld left a comment
Member

lgtm

lgtm
Nathan Vegdahl approved these changes 2023-11-21 13:50:37 +01:00
Nathan Vegdahl left a comment
Member

Looks good to me.

Looks good to me.
Hans Goudey changed title from FIX #114861: Add NLA region padding if markers are present. to Fix #114861: Add NLA region padding if markers are present. 2023-11-21 18:35:19 +01:00
Member

Sorry if a little picky, but the use of UI_ICON_SIZE is just a bit too unrelated to the sizes here. It is just coincidence that UI_ICON_SIZE (16 pixels at 1X scale) is close to the actual minimum change of 15.

I'd change that to the following so that the marker area size and the row height can change in the future:

v2d->tot.ymin -= (UI_MARKER_MARGIN_Y - NLACHANNEL_STEP(snla));

But note that because of some rounding the above can sometimes give you a pixel more than you actually need, but that shouldn't matter; as long as it isn't less than you need.

Sorry if a little picky, but the use of UI_ICON_SIZE is just a bit too unrelated to the sizes here. It is just coincidence that UI_ICON_SIZE (16 pixels at 1X scale) is close to the actual minimum change of 15. I'd change that to the following so that the marker area size and the row height can change in the future: ``` v2d->tot.ymin -= (UI_MARKER_MARGIN_Y - NLACHANNEL_STEP(snla)); ``` But note that because of some rounding the above can sometimes give you a pixel more than you actually need, but that shouldn't matter; as long as it isn't less than you need.
Nate Rupsis added 3 commits 2023-11-22 00:43:30 +01:00
Harley Acheson approved these changes 2023-11-22 03:09:45 +01:00
Harley Acheson left a comment
Member

Awesome!

Awesome!
Nate Rupsis merged commit 18ec3679f6 into main 2023-11-22 21:01:27 +01:00
Nate Rupsis deleted branch 114861-nla-markers-stuck 2023-11-22 21:01:29 +01:00
Sign in to join this conversation.
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
4 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#115213
No description provided.