Anim: Insert keyframes without keying sets #113504
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#113504
Loading…
Reference in New Issue
No description provided.
Delete Branch "ChrisLend/blender:keying_sets_rework"
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?
Part of #113278: Anim: Keyframing Rework
When animators want to key something in the viewport, the code needs to know which properties should be keyed of that selected thing. So far that was done with keying sets, and a pop-up that let's you choose the keying set to use. You can get rid of the popup by choosing a keying set ahead of time. But that is also not always desirable.
That pop-up is quite confusing and gives way too many options. To simplify this process this PR adds a User Preference option to choose one or more of:
Now whenever the
I
key is pressed in the viewport, and no keying set is enabled, it reads the preferences for which channels to insert.User Facing changes
Code side changes
There is now a code path for inserting keyframes, that completely bypasses the keying set system.
In a nutshell, the flow looks like this:
operator
->insert_key_action
- >insert_vert_fcurve
The idea is that with the animation 2025 project, the operator would call
insert_key_animation
instead and the replacement would be quite seamless.I had to remove the
type
enum property on theANIM_OT_keyframe_insert
operator. This is a breaking change of the python api, and I am not sure this is a good idea for 4.1The reason why I did it anyway is that I don't think this enum was used much from python since the enum order can change if you have custom keying sets. I would love feedback on this though. Whatever we do, there needs to be a way to tell blender to ignore the enum which I am not sure how to do properly.
Future plans
Rework the keying sets to hook into this new code path instead of going their own ways. They both eventually call
insert_vert_fcurve
, but the functions used for keying sets have so many arguments it was not feasable to do it with this PR.TODO
convertscene_frame
tonla_frame
read active keyingset from scene instead of presenting a popupmake work for bonescorrectly assign fcurve groupsmake a meny entry "Insert key with keying set"tag depsgraph for an update when an fcurve has been createdCycle aware keying support when creating FCurvesproperly pass keyframe flagsUnit testsWIP: ANIM: Insert keyframes without keying setsto WIP: Anim: Insert keyframes without keying sets@blender-bot package
Package build started. Download here when ready.
WIP: Anim: Insert keyframes without keying setsto Anim: Insert keyframes without keying setsI tested it today and I already love it.
Over-all looks good to me. Just some nits. I also haven't had a chance to test it yet, so still need to do that.
@ -168,0 +171,4 @@
/**
* Insert keys for the given rna_path in the given action. The length of the values Span is
* expected to be the size of the property array.
* \param frame is expected to be in NLA space.
Really glad this note on frame parameters is here. However, what does NLA space mean in this case? Local time of the action? Time on the NLA track? I think this could be rephrased or expanded on to be clearer.
@ -168,0 +173,4 @@
* expected to be the size of the property array.
* \param frame is expected to be in NLA space.
*/
int insert_key_action(Main *bmain,
What is the integer return value? Let's document that too, because at least to me (having not seen the function body yet as I work my way through the PR) it's not at all obvious.
@ -341,0 +505,4 @@
Scene *scene = CTX_data_scene(C);
const float scene_frame = BKE_scene_frame_get(scene);
/* Passing autokey mode as true because that is needed to get the cycle aware keying flag. */
Maybe add a TODO here to investigate why that's the case? Because that seems pretty odd, and is perhaps a sign of something else that also needs some spring cleaning.
would the TODO make more sense if I added it in the
ANIM_get_keyframing_flags
function itself?by adding it below the current comment its a bit far away from where the actual issue is, and might get missed when the function is refactored/
Oh! Yeah, that would make a lot more sense. Good call.
@ -343,3 +548,3 @@
ot->idname = "ANIM_OT_keyframe_insert";
ot->description =
"Insert keyframes on the current frame for all properties in the specified Keying Set";
"Insert keyframes on the current frame using the either the active keying set, or the user "
Typo: "using the either the" -> "using either the"
Just tested it out, and it appears to work great!
Looks good to me!