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/makesrna
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/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_action.c10
-rw-r--r--source/blender/makesrna/intern/rna_scene.c3
2 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index db2c415c918..96e37dfebbb 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -893,6 +893,16 @@ static void rna_def_action(BlenderRNA *brna)
"(this range is used by some tools, but does not affect animation evaluation)");
RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
+ prop = RNA_def_property(srna, "use_cyclic", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CYCLIC);
+ RNA_def_property_ui_text(
+ prop,
+ "Cyclic Animation",
+ "The action is intended to be used as a cycle looping over its manually set "
+ "playback frame range (enabling this doesn't automatically make it loop)");
+ RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
+
prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_float_sdna(prop, NULL, "frame_start");
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index c69a69290f9..d05f2a13c4b 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -3425,7 +3425,8 @@ static void rna_def_tool_settings(BlenderRNA *brna)
prop,
"Cycle-Aware Keying",
"For channels with cyclic extrapolation, keyframe insertion is automatically "
- "remapped inside the cycle time range, and keeps ends in sync");
+ "remapped inside the cycle time range, and keeps ends in sync. Curves newly added to "
+ "actions with a Manual Frame Range and Cyclic Animation are automatically made cyclic");
/* Keyframing */
prop = RNA_def_property(srna, "keyframe_type", PROP_ENUM, PROP_NONE);