Anim: Graph Editor Scale From Neighbor #112387
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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 project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#112387
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ChrisLend/blender:ge_scale_from_neighbor"
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?
Combination of two operators by Ares Deveaux
#106524: Animation: scale left slider
and
#106523: Animation: scale right slider
Introduces a new operator "Scale from Neighbor" that scales selected keyframe segments from either the left or right keyframe neighbor.
Pressing "D" during modal operation will switch from which end of the segment the scaling happens.
![image](/blender/blender/attachments/2be353d8-2922-4c5c-b477-a40905dfc08a)
This is useful to make a section of animation closer to a pose on either side.
WIP: Animation: Graph Editor Scale From Neighborto Animation: Graph Editor Scale From NeighborAnimation: Graph Editor Scale From Neighborto Anim: Graph Editor Scale From NeighborWould it be possible to change the status bar text from
[D] Toggle Anchor Key
to be more context-aware? Then it could be[D] Anchor to Left Key
(orRight Key
), making it more specific to what's going to happen.@ -954,0 +957,4 @@
const FCurveSegmentAnchor anchor)
{
const BezTriple *reference_key;
if (anchor == FCurveSegmentAnchor::LEFT) {
I'd make this a
switch
because it's going over the items of an enum. Without adefault
, it makes it clear that these are indeed the only two values in the enum.made this and other occurrences a
switch
@ -2283,0 +2366,4 @@
switch (event->type) {
case EVT_DKEY: {
FCurveSegmentAnchor anchor = FCurveSegmentAnchor(RNA_enum_get(op->ptr, "anchor"));
if (anchor == FCurveSegmentAnchor::LEFT) {
This might actually be implementable as an
FCurveSegmentAnchor FCurveSegmentAnchor::opposite() const
function?I had a quick google search and apparently you cannot add methods to an enum class.
Did I miss something?
C++ is stupid. I think I've done too much Python & Go and got used to a more sane type system ;-)
https://stackoverflow.com/a/53284026/875379 could work, but I think it's overkill for the one use case.
@ -2283,0 +2379,4 @@
default:
return graph_slider_modal(C, op, event);
break;
No
break
afterreturn
.@ -2283,0 +2389,4 @@
const int invoke_result = graph_slider_invoke(C, op, event);
if (invoke_result == OPERATOR_CANCELLED) {
return invoke_result;
When you know the value that's being returned, because of the surrounding logic, I usually prefer simply returning that value. That way it's instantly clear from the
return
statement itself what it returns, without having to actually mentally parse the preceeding code. So in this case justreturn OPERATOR_CANCELLED;
👍