Fix: Animation Editor snapping not working when using rotate or scale #112088

Merged
Christoph Lendenfeld merged 1 commits from ChrisLend/blender:fix_ge_rotate_scale_handle_snap into main 2023-09-08 11:34:25 +02:00

This was introduced with #109015: Animation: Move Snapping to Scene

The issue manifested in two ways.

  • snapping did not work with rotate and scale
  • the scale and rotate value would increment in steps instead of fluidly

This was caused because the snapping code would force the mode to SCE_SNAP_TO_INCREMENT if the snapping wasn't enabled for the given transform mode.
By transform mode I mean this enum in the 3D viewport snap settings.
image

This mode is not supported in the Animation Editors though, causing the snapping switch to fall back to default which is to do no snapping.
My assumption is that this mode also causes the increments in the transform.

It would be good to support that in the future, but for now this is just a fix to get the 3.6 behavior back.

This was introduced with [#109015: Animation: Move Snapping to Scene](https://projects.blender.org/blender/blender/pulls/109015) The issue manifested in two ways. * snapping did not work with rotate and scale * the scale and rotate value would increment in steps instead of fluidly This was caused because the snapping code would force the mode to `SCE_SNAP_TO_INCREMENT` if the snapping wasn't enabled for the given transform mode. By transform mode I mean this enum in the 3D viewport snap settings. ![image](/attachments/177e2289-20c6-452f-bb3c-2deba9273c11) This mode is not supported in the Animation Editors though, causing the snapping `switch` to fall back to `default` which is to do no snapping. My assumption is that this mode also causes the increments in the transform. It would be good to support that in the future, but for now this is just a fix to get the 3.6 behavior back.
3.5 KiB
Christoph Lendenfeld added the
Module
Animation & Rigging
label 2023-09-07 17:26:51 +02:00
Christoph Lendenfeld added 1 commit 2023-09-07 17:27:04 +02:00
Christoph Lendenfeld requested review from Nathan Vegdahl 2023-09-07 17:27:22 +02:00
Christoph Lendenfeld changed title from Fix: Graph Editor snapping not working when using rotate or scale to Fix: Animation Editor snapping not working when using rotate or scale 2023-09-07 17:33:31 +02:00
Christoph Lendenfeld added this to the Animation & Rigging project 2023-09-08 09:30:42 +02:00
Nathan Vegdahl approved these changes 2023-09-08 10:49:23 +02:00
Nathan Vegdahl left a comment
Member

Works great in testing, and the code looks good. Thanks!

Works great in testing, and the code looks good. Thanks!
Christoph Lendenfeld merged commit a41da206cd into main 2023-09-08 11:34:25 +02:00
Christoph Lendenfeld deleted branch fix_ge_rotate_scale_handle_snap 2023-09-08 11:34:27 +02:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
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
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 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#112088
No description provided.