Animation: shear left slider #106521
Closed
AresDeveaux
wants to merge 9 commits from
When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
AresDeveaux/blender:shear_left_slider
into main
pull from: AresDeveaux/blender:shear_left_slider
merge into: blender:main
blender:blender-v4.0-release
blender:main
blender:temp-sculpt-dyntopo
blender:temp-sculpt-brush-channel
blender:blender-v3.6-release
blender:universal-scene-description
blender:blender-v3.3-release
blender:asset-browser-frontend-split
blender:brush-assets-project
blender:asset-shelf
blender:anim/armature-drawing-refactor-3
blender:temp-sculpt-dyntopo-hive-alloc
blender:tmp-usd-python-mtl
blender:tmp-usd-3.6
blender:blender-v3.5-release
blender:blender-projects-basics
blender:blender-v2.93-release
blender:temp-sculpt-attr-api
blender:realtime-clock
blender:sculpt-dev
blender:gpencil-next
blender:bevelv2
blender:microfacet_hair
blender:xr-dev
blender:principled-v2
When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Reviewers
Request review
No reviewers
Labels
Clear labels
This issue affects/is about backward or forward compatibility
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
Apply labels
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
This issue affects/is about backward or forward 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
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
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
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 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
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
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Set Project
Clear projects
No project
Assignees
Assign users
Clear assignees
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#106521
Reference in New Issue
There is no content yet.
Delete Branch "AresDeveaux/blender:shear_left_slider"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
New operator for the slider tool in the Graph Editor.
It affects the value of selected keys linearly keeping the same relationship between them using the left key as anchor. The purpose is to keep the animation on the selected keys but matching the neigboring poses.
The tool I have used that inspired this slider is a lattice in the graph editor. So, imagine you have a simple lattice without subdivision affecting the selected keys (a bounding box), and then push the right side of the lattice up or down.
It uses the structure already created by @ChrisLend. The main functionality change is in 'keyframes_general.c', the rest for the most part just follows what he did.
WIP: Animation&Rigging: shear_left_sliderto Animation: shear left sliderI see nothing wrong with it except a small typo :)
adding sybren as a reviewer for the final check
@ -1063,0 +1163,4 @@
ot->name = "Shear Left Keyframes";
ot->idname = "GRAPH_OT_shear_left";
ot->description =
"Affects the value of the keys linealy keeping the same \n\
I assume you mean "linearly"?
I see you approved it, did you change the typo? don't know if I should publish the error correction and ask for a new review.
Well, I pushed the typo correction just in case.
I didn't change anything, but if the changes are so super tiny, the way it is usually handled is that the reviewer accepts it with the note it should be changed. And right after the change it can be commited because it's already accepted :)
In this case wait for Sybren to look over it though
What are the future plans for this operator? Would it ever need to be able to sheer the other side as well?
Would it make sense to turn this into a bidirectional slider? That way the slider itself also goes from -100% to +100%, with a neutral 0% starting point (instead of 50%).
I'm also not 100% convinced by the "sheer left", but that might be a personal thing. Since it's the right-hand side of the selection area that is affected the most, wouldn't this be more of a "sheer right"?
I changed it to bidirectional and it worked. I need to revisit other sliders because I did this on some but didn't do what I was expecting. Must be something wrong I did.
That is my instinct too, but every tool on the slider uses
left
orright
based on where the reference point is. For exampleScale left
feels the same as this one, scale toward the right side of the selected keys because uses the left neighboring pose as a reference. The naming convention came from how it is in similar tools in the industry but let me know if I should change it.I think this should be discussed in the A&R meeting, there is no clear right or wrong to it
It should expand the slider's range from
[0, 1]
to[-1, 1]
, nothing more. Of course the code has to change as well, since the 'neutral' point changes from0.5
to0.0
and the range of the sider becomes twice a large.I've put it on the module meeting agenda as @ChrisLend suggested 👍
Also, if there is going to be a "shear right" operator as well, I think the code would need some changes to avoid future code duplication. Some of the functions would need to be renamed to no longer have
left
in their name (likeshear_left_fcurve_segment
). The operator can get an extra parameter to indicate the left/right side (probably a two-value enum is best), which is then passed down to the shearing functions.@AresDeveaux would you need/want some help with this restructuring?
small thing about the factor soft minimum
no need to re-review from my side after that change
@ -1063,0 +1184,4 @@
FLT_MAX,
"Curve Bend",
"Control the bend of the curve",
0.0f,
tiny thing I noticed, the soft minimum should be -1 if the slider has a range of -1/1
hey @dr.sybren , I think I might need some help with that. The function modification is something I could do, but I'm not sure I know how to add a parameter to an operator in Blender.
The same will need to be done with "Scale left", 'Scale right" and "Scale average" then.
You can check the
Graph_OT_decimate
operator for an example on how an enum property is added.line 528 in
graph_slider_ops.c
Landed in #111735: Animation: Shear operator for Graph Editor
Reviewers
Pull request closed