Anim: Add basic autokey tests #115064

Merged
Christoph Lendenfeld merged 4 commits from ChrisLend/blender:add_autokeying_unit_tests into main 2023-11-21 16:08:24 +01:00

Add basic unit tests for the auto keying system.

Part of #113278: Anim: Keyframing Rework

Add basic unit tests for the auto keying system. Part of [#113278: Anim: Keyframing Rework](https://projects.blender.org/blender/blender/issues/113278)
Christoph Lendenfeld added the
Module
Animation & Rigging
label 2023-11-17 18:09:57 +01:00
Christoph Lendenfeld added 1 commit 2023-11-17 18:10:10 +01:00
Christoph Lendenfeld requested review from Nathan Vegdahl 2023-11-17 18:15:18 +01:00
Nathan Vegdahl approved these changes 2023-11-21 14:23:20 +01:00
Nathan Vegdahl left a comment
Member

Looks good to me! Just one thing you could change if you feel like taking the time, but I don't think it's especially important.

Looks good to me! Just one thing you could change if you feel like taking the time, but I don't think it's especially important.
@ -203,0 +247,4 @@
bpy.ops.transform.translate(value=(1, 0, 0))
action = keyed_object.animation_data.action
self.assertTrue(_fcurve_paths_match(action.fcurves, ["location"]))
Member

Not critical, but if you want to take the time: this checks that keys weren't added for rotation and scale, but it doesn't check that a new key was added by autokey for the location channel, since the location channel already existed from manually creating a key.

That's probably okay, since that's basically already tested by test_autokey_basic above. But just to ensure nothing funky happens because of locking the other channels, it might be worth e.g. changing the current frame between the manual keying and the transform, and then checking that indeed two keys were created on location.

Not critical, but if you want to take the time: this checks that keys *weren't* added for rotation and scale, but it doesn't check that a new key *was* added by autokey for the location channel, since the location channel already existed from manually creating a key. That's probably okay, since that's basically already tested by `test_autokey_basic` above. But just to ensure nothing funky happens because of locking the other channels, it might be worth e.g. changing the current frame between the manual keying and the transform, and then checking that indeed two keys were created on location.
Author
Member

good idea, changed it :)

good idea, changed it :)
Christoph Lendenfeld added 3 commits 2023-11-21 16:07:14 +01:00
Christoph Lendenfeld merged commit 09e93ecc23 into main 2023-11-21 16:08:24 +01:00
Christoph Lendenfeld deleted branch add_autokeying_unit_tests 2023-11-21 16:08:26 +01: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#115064
No description provided.