Animation: Shear operator for Graph Editor #111735

Merged
Christoph Lendenfeld merged 17 commits from ChrisLend/blender:shear_slider into main 2023-08-31 17:09:08 +02:00

This is a combination of two PRs from Ares Deveaux: #106521: Animation: shear left slider and #106522: Animation: shear right slider

This adds a new operator that allows shearing keys based on the position of the segment ends.
By pressing D while the operator is in modal you can switch if the operator takes the left or the right segment end as a reference.

This is a combination of two PRs from Ares Deveaux: [#106521: Animation: shear left slider](https://projects.blender.org/blender/blender/pulls/106521) and [#106522: Animation: shear right slider](https://projects.blender.org/blender/blender/pulls/106522) This adds a new operator that allows shearing keys based on the position of the segment ends. By pressing `D` while the operator is in modal you can switch if the operator takes the left or the right segment end as a reference. <video src="/attachments/d8ba0705-f0cc-40d6-bc15-65ad335333b2" title="Shear Demo" controls></video>
Christoph Lendenfeld added the
Module
Animation & Rigging
label 2023-08-31 12:30:43 +02:00
Christoph Lendenfeld added 15 commits 2023-08-31 12:30:57 +02:00
Christoph Lendenfeld requested review from Nathan Vegdahl 2023-08-31 12:32:36 +02:00
Nathan Vegdahl requested changes 2023-08-31 15:35:49 +02:00
Nathan Vegdahl left a comment
Member

The code looks good to me. Just some nits about naming and word usage.

The code looks good to me. Just some nits about naming and word usage.
@ -829,0 +853,4 @@
normalized_x = (right_key->vec[1][0] - fcu->bezt[i].vec[1][0]) / key_x_range;
}
const float lineal = key_y_range * normalized_x;
Member

Is lineal a typo? Or just a term I'm not familiar with?

Is `lineal` a typo? Or just a term I'm not familiar with?
Author
Member

I just kept what ares had. In german this means ruler, but I am not sure that was the original intent

changed to y_delta

I just kept what ares had. In german this means ruler, but I am not sure that was the original intent changed to `y_delta`
@ -1293,0 +1448,4 @@
-FLT_MAX,
FLT_MAX,
"Curve Bend",
"Control the bend of the curve",
Member

Shear is a linear operation, so talking about curves and bending feels misleading to me. When I first read this I honestly thought, "Wait, is there a third parameter that adds curvature on top of the shear?"

Maybe just call this parameter "Shear", and document it as "The amount of shear". I realize that's kind of stupid and redundant, and doesn't really explain things further to people who don't know what shear is. But I don't know if there's a succinct way to explain shear with just words. And it's relatively easy for people to look up if they don't know what it is, which will then provide pictures that do explain it succinctly.

Shear is a linear operation, so talking about curves and bending feels misleading to me. When I first read this I honestly thought, "Wait, is there a third parameter that adds curvature on top of the shear?" Maybe just call this parameter "Shear", and document it as "The amount of shear". I realize that's kind of stupid and redundant, and doesn't really explain things further to people who don't know what shear is. But I don't know if there's a succinct way to explain shear with just words. And it's relatively easy for people to look up if they don't know what it is, which will then provide pictures that do explain it succinctly.
Author
Member

good catch. This slipped by me and seems like a copy paste issue. The blend to ease operator has the same description

good catch. This slipped by me and seems like a copy paste issue. The blend to ease operator has the same description
Christoph Lendenfeld added 2 commits 2023-08-31 15:58:44 +02:00
Nathan Vegdahl approved these changes 2023-08-31 16:18:56 +02:00
Nathan Vegdahl left a comment
Member

Looks good to me!

Looks good to me!
Christoph Lendenfeld merged commit 9d0aed6589 into main 2023-08-31 17:09:08 +02:00
Christoph Lendenfeld deleted branch shear_slider 2023-08-31 17:09:10 +02:00
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 project
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#111735
No description provided.