WIP: Anim: Implement keyframing functionality for the Animation data-block #119669
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#119669
Loading…
Reference in New Issue
No description provided.
Delete Branch "ChrisLend/blender:baklava_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?
WIP because #118677: Baklava: minimal data model needs to land first.
This PR modifies the keyframing operators to work with the new Animation data-block.
Most of my changes are in
animrig/intern/keyframing.cc
.Known issues
Layer
andStrip
@ -997,0 +1016,4 @@
prop);
Vector<float> rna_values = get_keyframe_values(&ptr, prop, visual_keyframing);
int property_array_index = 0;
for (float value : rna_values) {
Here you could have
This will remove the need to keep track of the array index explicitly, and I think the code will be a bit simpler for it.
the code is now in a different place, but I still used that logic. Thanks
I think this is a good start. I'm still pondering a bit over the order in which things are done. Currently in this PR:
It might be interesting to split up that last part, especially since at some point we'll want to pin certain properties to certain layers. How would you feel about this?
EvaluationResult
could be reused for this?KeyframeStrip
to put keys into.And maybe step 3 could be optimised by first getting the
ChannelBag
for theBinding
, and then inserting into that.@ -997,0 +1019,4 @@
for (float value : rna_values) {
/* TODO: convert scene frame to strip time. */
const float2 time_value = {scene_frame, value};
strip.as<KeyframeStrip>().keyframe_insert(
This code assumes that the strip is a
KeyframeStrip
. Better to just pass thestrip
parameter as such, and leave the wrapping / assumptions / error handling to the caller.@ -997,0 +1069,4 @@
}
Layer *layer;
if (anim.layers().size() == 0) {
There's now double code to ensure a layer exists, which means duplication of the default layer name logic as well. Better to move this into some
KeyframeStrip &keystrip = animrig::simplifications::ensure_layer_with_keyframe_strip(anim)
function.where is the duplication of that code? Is that somewhere in your code?
@ -1007,0 +1104,4 @@
return;
}
if (adt->animation != nullptr || adt->action == nullptr) {
I think it's fine to write more "boolean" style checks for these, like
if (adt->animation || !adt->action)
.I used to be of "the other camp", but thinking about things like smart pointers have swayed me in the other direction.
I've moved the path resolution and evaluation up to
insert_key_anim
. Good point moving that up because we will need to do NLA like decomposition so we can't resolve the values on strip level.About using
EvaluationResult
, This doesn't seem to store a time value. How would I use that. I've made a structKeyInsertData
for nowAt @ChrisLend 's suggestion, I've continued this in a separate PR (#120428) by just applying the diff of his combined commits against main.
Pull request closed