Anim: implement 3D viewport keyframing functionality for layered actions #121661

Merged
Nathan Vegdahl merged 76 commits from nathanvegdahl/blender:baklava_3d_viewport_keyframing into main 2024-06-07 13:26:30 +02:00

76 Commits

Author SHA1 Message Date
9876ce6f2a Use more unique test values
All checks were successful
buildbot/vexp-code-patch-lint Build done.
buildbot/vexp-code-patch-linux-x86_64 Build done.
buildbot/vexp-code-patch-darwin-arm64 Build done.
buildbot/vexp-code-patch-darwin-x86_64 Build done.
buildbot/vexp-code-patch-windows-amd64 Build done.
buildbot/vexp-code-patch-coordinator Build done.
2024-06-07 12:36:00 +02:00
38c50d148d Merge branch 'main' into baklava_3d_viewport_keyframing 2024-06-07 12:17:01 +02:00
aac5783a0f Use EXPECT_STREQ() for string equality tests 2024-06-07 12:15:57 +02:00
b513f29006 Remove accidental meaningless code changes 2024-06-07 11:59:32 +02:00
f7f5072ff8 Remove test for object with existing binding name but no assigned action
All checks were successful
buildbot/vexp-code-patch-darwin-x86_64 Build done.
buildbot/vexp-code-patch-windows-amd64 Build done.
buildbot/vexp-code-patch-coordinator Build done.
It was failing due to code unrelated to this PR, and will be addressed
in a futrue PR.
2024-06-06 16:47:38 +02:00
3b499114c2 Add test for keying existing legacy actions 2024-06-06 16:40:11 +02:00
5405bce9a6 Add test for objects with a binding name but no assigned action
Currently failing.  Will fix in a future commit.
2024-06-06 16:24:52 +02:00
88bff25780 Add missing checks to existing test cases 2024-06-06 16:06:54 +02:00
33d80559ba Use Action::assign_id() 2024-06-06 15:52:45 +02:00
dd01cb328c Use empty_display_size instead of rotation_mode 2024-06-06 15:47:37 +02:00
d3e929099b Merge branch 'main' into baklava_3d_viewport_keyframing 2024-06-06 15:39:02 +02:00
11fc195e96 Change name of legacy action tests to reflect being for legacy actions 2024-06-04 18:09:01 +02:00
bc24d01bbc Add multi-ID keyframing test 2024-06-04 18:05:27 +02:00
c18bff50ef Add initial unit tests 2024-06-04 17:52:30 +02:00
12f33011c4 Merge branch 'main' into baklava_3d_viewport_keyframing 2024-06-04 16:08:11 +02:00
c3613e63b8 Use Action::binding_add_for_id() to add bindings for IDs
So obvious in retrospect!
2024-06-03 19:12:57 +02:00
effe792e11 Improve code comment 2024-06-03 19:11:48 +02:00
f4e97094b0 Remove currently extraneous Layer functions
Just encode the current assumptions directly, rather than trying to
predict the API's future.

Also improve a few related comments.
2024-06-03 19:01:49 +02:00
dad099d43c Merge branch 'main' into baklava_3d_viewport_keyframing 2024-06-03 18:34:45 +02:00
d157e3f5e3 Make the semantics of default layer creation when keying more obvious 2024-05-31 14:42:38 +02:00
c1d26c2a33 Add asserts to strip keyframing method 2024-05-31 13:44:26 +02:00
bbf63f5a45 Set up localization for default animation layer name 2024-05-31 12:45:14 +02:00
661e16042a Merge branch 'main' into baklava_3d_viewport_keyframing 2024-05-31 12:44:05 +02:00
a9489e12df Address some review comments 2024-05-31 12:35:57 +02:00
701e51169a Use RNAPath index for keying if present 2024-05-30 15:58:52 +02:00
5aaa990684 Merge branch 'main' into baklava_3d_viewport_keyframing 2024-05-30 15:47:13 +02:00
6e364aba65 Change meaning of "NO_VALID_LAYER/STRIP/BINDING" to be per ID
As opposed to per key, which is more challenging to report, and
probably not meaningfully more useful to the user in those cases
anyway.
2024-05-21 15:12:33 +02:00
2b53487e42 Change some null checks to asserts. 2024-05-21 14:53:56 +02:00
f8a3ea3013 Merge branch 'main' into baklava_3d_viewport_keyframing 2024-05-21 14:34:45 +02:00
c8a9a7fa98 Merge branch 'main' into baklava_3d_viewport_keyframing 2024-05-16 17:15:30 +02:00
d9b0c82707 Make insert_key_layered_action() static 2024-05-16 15:39:29 +02:00
7913b6c00c Swap argument order for consistency with existing functions
Not sure if this is the best/most logical order, but it least it
keeps things predictable.
2024-05-16 15:01:13 +02:00
05f2575e26 Switch to * instead of .value() to access value of std::optional 2024-05-16 14:24:01 +02:00
64b7eeb5f3 Move handling of getting layer for keyframing to Action
Also move ensuring a default layer with infinite strip to its own method
on Action as well.
2024-05-16 14:16:38 +02:00
fd1812ee95 Merge branch 'main' into baklava_3d_viewport_keyframing 2024-05-16 11:31:54 +02:00
8cf09f3285 Break out finding the right strip on a layer into separate methods 2024-05-14 17:48:42 +02:00
69cc9303d7 Move loop-invariant const variable outside of the loop 2024-05-14 16:47:20 +02:00
f50ed4a62e Ensure optional has a value before using 2024-05-14 16:43:23 +02:00
1f4e09fd22 Use assert rather than error propagation
Another place where the non-null check failing would indicate a bug.
2024-05-14 16:35:28 +02:00
2ef1ef591d Print to stdout when key insertion fails due to unresolved RNA path 2024-05-14 16:26:05 +02:00
56f886caf3 Use assert rather than error propagation
This particular case shouldn't be able to happen, so if we reach it
it's a bug.
2024-05-14 16:18:32 +02:00
f9476d438e can_create_fcurve() -> key_insertion_may_create_fcurve()
And also a better doc comment for it.
2024-05-14 14:47:50 +02:00
691bab3cca Get working again after binding_for_id() was removed 2024-05-14 14:40:32 +02:00
158a8aeb40 Don't split error messages by singular/plural 2024-05-14 13:02:46 +02:00
95501d83f1 Merge branch 'main' into baklava_3d_viewport_keyframing 2024-05-14 13:00:35 +02:00
f2aba6b077 Better variable name 2024-05-14 11:40:47 +02:00
128e158672 Improve comment 2024-05-14 11:36:47 +02:00
576b1f14d9 Revert accidental spelling change 2024-05-14 11:33:45 +02:00
85e2ebdc73 Add/remove const 2024-05-14 11:14:45 +02:00
2d3afbcf1f Better doc comment phrasing 2024-05-14 11:13:11 +02:00
cc27c7d09f Fix silly typo 2024-05-13 18:26:27 +02:00
200b92e7cc Merge branch 'main' into baklava_3d_viewport_keyframing 2024-05-13 18:24:05 +02:00
9c2d467408 Merge branch 'main' into baklava_3d_viewport_keyframing 2024-05-10 17:53:02 +02:00
03c9e762c7 Merge branch 'main' into baklava_keyframing 2024-05-07 11:48:17 +02:00
277b26af30 Merge branch 'main' into baklava_keyframing 2024-05-06 15:59:53 +02:00
a901fd9675 More accurate test case failure string 2024-05-06 15:55:27 +02:00
d626e30f2c Rename GENERIC_FAILURE to UNKNOWN_FAILURE
This helps make it feel a little worse to use, which is good because
we want to remove it in the future (as explained in the comment).
2024-05-06 15:52:40 +02:00
f887cf52c4 Move TODO comment to right place 2024-05-02 17:39:52 +02:00
733a8d2632 Misc cleanup
Some checks failed
buildbot/vexp-code-patch-lint Build done.
buildbot/vexp-code-patch-linux-x86_64 Build done.
buildbot/vexp-code-patch-darwin-x86_64 Build done.
buildbot/vexp-code-patch-darwin-arm64 Build done.
buildbot/vexp-code-patch-windows-amd64 Build done.
buildbot/vexp-code-patch-coordinator Build done.
2024-05-02 15:25:07 +02:00
f008ce58a2 Merge branch 'main' into baklava_keyframing 2024-05-02 13:41:34 +02:00
72937ca713 Remove redundant wrapper function for strip keyframing
At this point it was literally the same signature, and just calling
the identical method on KeyframeStrip.  We can always reintroduce it
in the future when it makes sense.
2024-05-02 12:59:12 +02:00
831c4952bf Remove previously ignored INSERTKEY_NEEDED flag
In the last commit I made `insert_vert_fcurves()` actually use
the `INSERTKEY_NEEDED` flag, whereas previously it was ignored.
However, there was a call site that was already passing
`INSERTKEY_NEEDED` to `insert_vert_fcurve()` despite it previously
having no effect.  In order to preserve behavior, this commit replaces
that with `INSERTKEY_NOFLAGS`.
2024-05-02 12:45:09 +02:00
fb2a1bae3f Implement "Only Insert Needed" and "Only Insert Available" 2024-05-02 12:29:12 +02:00
074ac4330e Merge branch 'main' into baklava_keyframing 2024-05-01 16:18:38 +02:00
67b22e2f7d Add missing depsgraph tag when inserting keys 2024-05-01 15:42:15 +02:00
bf550b3d02 Add error reporting for generic keying errors 2024-04-30 17:52:28 +02:00
f96943ad1d Propagate failure results from KeyframeStrip::keyframe_insert()
This still leaves even lower-level code not returning propert failure
results, but one step at a time.
2024-04-30 17:39:02 +02:00
f2d16a7773 Use digits vs spelled-out numbers consistently in error messages 2024-04-30 16:34:36 +02:00
ba41a0fd5d Update new error reports to be more translation-friendly 2024-04-30 16:32:01 +02:00
879aa17dd5 Merge branch 'main' into baklava_keyframing 2024-04-30 16:08:21 +02:00
2e3385445a Misc cleanups 2024-04-30 16:04:17 +02:00
4bcd0d99cb Merge branch 'main' into baklava_keyframing 2024-04-30 15:32:07 +02:00
a75d2d5cb5 Don't add or key Animation datablock with experimental feature disabled 2024-04-11 14:54:27 +02:00
d1a10e777d Collect keying errors for the new code paths as well
This isn't 100% there yet, but it's a good start.
2024-04-11 14:54:27 +02:00
7ab39df3ac Run clang-format 2024-04-11 14:54:27 +02:00
e03c0987bc Anim: implement keyframing functionality for the Animation data-block
So far just a port of #119669 to latest main.
2024-04-11 14:54:27 +02:00