Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2021-07-27 10:39:52 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2021-11-24 15:58:32 +0300
commit72acce43bc34e5e9569606e08ee536b02cab088b (patch)
tree3a51c79a085a2357c652b55e833787c8ca221f09 /source/blender/blenkernel/intern/nla.c
parent5d59b38605d61b2aeabfa1cb572b5a0d9158424b (diff)
Animation: allow marking actions as cyclic for Cycle-Aware Keying.
When a manual frame range is set, allow marking an action as having Cyclic Animation. This does not affect how the action is evaluated, but the Cycle-Aware Keying option will automatically make any newly added F-Curves cyclic. This allows using the option from the start to build the cycle, rather than only for tweaking an existing loop. The curves are made cyclic when they have only one key, either after inserting the first key, or before adding the second one. The latter case avoids the need to manually make the first added curve cyclic after marking a newly added action cyclic. Differential Revision: https://developer.blender.org/D11803
Diffstat (limited to 'source/blender/blenkernel/intern/nla.c')
-rw-r--r--source/blender/blenkernel/intern/nla.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 0666c1dfc53..8f2a60358e7 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -395,6 +395,11 @@ NlaStrip *BKE_nlastrip_new(bAction *act)
strip->flag &= ~NLASTRIP_FLAG_SYNC_LENGTH;
}
+ /* Enable cyclic time for known cyclic actions. */
+ if (BKE_action_is_cyclic(act)) {
+ strip->flag |= NLASTRIP_FLAG_USR_TIME_CYCLIC;
+ }
+
/* assign the action reference */
strip->act = act;
id_us_plus(&act->id);