Fix #112085: Not able to insert keys on subframes #112131
No reviewers
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#112131
Loading…
Reference in New Issue
No description provided.
Delete Branch "ChrisLend/blender:fix_subframe_keyframing"
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?
When subframes were enabled, and the time cursor was at a subframe position, the keying would still insert the key at the full frame.
This was because the value passed to the key insertion functions was just the full frame value and not the subframe part.
Fixing it by using
BKE_scene_frame_get()
which returns the floating point frame including the subframe part.I've added unit tests to ensure that inserting keys at subframe values doesn't cause issues.
I think a million frames is a bit much, realistically. Even at 60FPS that would be a 4.6 hour shot.
DNA_scene_types.h
has this though:so yeah, even though in practice it'll hardly happen, testing with that high frame count is actually good :)
As for the precision,
BEZT_BINARYSEARCH_THRESH = 0.01f
, which is currently what defines the practical resolution of subframes. Testing with less than 7 decimal places would be acceptable for sure.thanks that got me unstuck
I've now realized why the test failed. Floating point numbers don't have sufficient resolution at 1.000.000
I've used this calculator for this https://www.h-schmidt.net/FloatConverter/IEEE754.html
and also confirmed in blender. When you go to that frame and enable subframes, the steps the time cursor takes correspond to the floating point precision steps.
Now the question is what to do.
Soften up the test some more or have it fail correctly.
By the latter I mean insert 50 keys but only expect them to be at the floating point precision steps and also check the amount of keys is not larger than the steps available.
I tend to the latter but am open to suggestions
EDIT: pushed a change that fails correctly to better explain what I mean by that
WIP: Fix #112085: Not able to insert keys on subframesto Fix #112085: Not able to insert keys on subframesExcellent! Yes, I prefer this approach too.