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>2019-05-11 21:16:46 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-05-11 21:20:21 +0300
commitebc44aae9897607a7d19a642d1a2fdffa2b24400 (patch)
tree43191d4c9a91688403d63e79c76b61c509c060b0 /source/blender/makesrna/intern/rna_animation.c
parent83d35c25d0fcc9b095ef1a0e1c5c290bb04d3017 (diff)
Python API: expose more keyframing flags for use in keyframe_insert.
Expose REPLACE and CYCLE_AWARE, and add AVAILABLE for completeness. These flags are generic and safe to use, and necessary to match the behavior of certain UI options.
Diffstat (limited to 'source/blender/makesrna/intern/rna_animation.c')
-rw-r--r--source/blender/makesrna/intern/rna_animation.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 15429ec6b5e..5970149273e 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -72,6 +72,43 @@ const EnumPropertyItem rna_enum_keying_flag_items[] = {
{0, NULL, 0, NULL, NULL},
};
+/* Contains additional flags suitable for use in Python API functions. */
+const EnumPropertyItem rna_enum_keying_flag_items_api[] = {
+ {INSERTKEY_NEEDED,
+ "INSERTKEY_NEEDED",
+ 0,
+ "Only Needed",
+ "Only insert keyframes where they're needed in the relevant F-Curves"},
+ {INSERTKEY_MATRIX,
+ "INSERTKEY_VISUAL",
+ 0,
+ "Visual Keying",
+ "Insert keyframes based on 'visual transforms'"},
+ {INSERTKEY_XYZ2RGB,
+ "INSERTKEY_XYZ_TO_RGB",
+ 0,
+ "XYZ=RGB Colors",
+ "Color for newly added transformation F-Curves (Location, Rotation, Scale) "
+ "and also Color is based on the transform axis"},
+ {INSERTKEY_REPLACE,
+ "INSERTKEY_REPLACE",
+ 0,
+ "Replace Existing",
+ "Only replace existing keyframes"},
+ {INSERTKEY_AVAILABLE,
+ "INSERTKEY_AVAILABLE",
+ 0,
+ "Only Available",
+ "Don't create F-Curves when they don't already exist"},
+ {INSERTKEY_CYCLE_AWARE,
+ "INSERTKEY_CYCLE_AWARE",
+ 0,
+ "Cycle Aware Keying",
+ "When inserting into a curve with cyclic extrapolation, remap the keyframe inside "
+ "the cycle time range, and if changing an end key, also update the other one"},
+ {0, NULL, 0, NULL, NULL},
+};
+
#ifdef RNA_RUNTIME
# include "BLI_math_base.h"