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:
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_enum_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c31
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c7
3 files changed, 25 insertions, 14 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index e72a55b5a9e..458f031ceae 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -90,6 +90,7 @@ extern const EnumPropertyItem rna_enum_color_sets_items[];
extern const EnumPropertyItem rna_enum_beztriple_keyframe_type_items[];
extern const EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[];
extern const EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[];
+extern const EnumPropertyItem rna_enum_fcurve_auto_smoothing_items[];
extern const EnumPropertyItem rna_enum_keyframe_handle_type_items[];
extern const EnumPropertyItem rna_enum_driver_target_rotation_mode_items[];
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 254f3bc3710..424bb4a492f 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -76,6 +76,22 @@ const EnumPropertyItem rna_enum_fmodifier_type_items[] = {
{0, NULL, 0, NULL, NULL},
};
+const EnumPropertyItem rna_enum_fcurve_auto_smoothing_items[] = {
+ {FCURVE_SMOOTH_NONE,
+ "NONE",
+ 0,
+ "None",
+ "Automatic handles only take immediately adjacent keys into account"},
+ {FCURVE_SMOOTH_CONT_ACCEL,
+ "CONT_ACCEL",
+ 0,
+ "Continuous Acceleration",
+ "Automatic handles are adjusted to avoid jumps in acceleration, resulting "
+ "in smoother curves. However, key changes may affect interpolation over a "
+ "larger stretch of the curve"},
+ {0, NULL, 0, NULL, NULL},
+};
+
const EnumPropertyItem rna_enum_beztriple_keyframe_type_items[] = {
{BEZT_KEYTYPE_KEYFRAME,
"KEYFRAME",
@@ -2258,19 +2274,6 @@ static void rna_def_fcurve(BlenderRNA *brna)
"Use custom hand-picked color for F-Curve"},
{0, NULL, 0, NULL, NULL},
};
- static EnumPropertyItem prop_mode_smoothing_items[] = {
- {FCURVE_SMOOTH_NONE,
- "NONE",
- 0,
- "None",
- "Auto handles only take adjacent keys into account (legacy mode)"},
- {FCURVE_SMOOTH_CONT_ACCEL,
- "CONT_ACCEL",
- 0,
- "Continuous Acceleration",
- "Auto handles are placed to avoid jumps in acceleration"},
- {0, NULL, 0, NULL, NULL},
- };
srna = RNA_def_struct(brna, "FCurve", NULL);
RNA_def_struct_ui_text(srna, "F-Curve", "F-Curve defining values of a period of time");
@@ -2350,7 +2353,7 @@ static void rna_def_fcurve(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
prop = RNA_def_property(srna, "auto_smoothing", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_mode_smoothing_items);
+ RNA_def_property_enum_items(prop, rna_enum_fcurve_auto_smoothing_items);
RNA_def_property_ui_text(
prop, "Auto Handle Smoothing", "Algorithm used to compute automatic handles");
RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, "rna_FCurve_update_data");
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index f08a3ce93a1..07ce07710b1 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -4657,6 +4657,13 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
"Color for newly added transformation F-Curves (Location, Rotation, Scale) "
"and also Color is based on the transform axis");
+ prop = RNA_def_property(srna, "fcurve_new_auto_smoothing", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, rna_enum_fcurve_auto_smoothing_items);
+ RNA_def_property_enum_sdna(prop, NULL, "auto_smoothing_new");
+ RNA_def_property_ui_text(prop,
+ "New Curve Smoothing Mode",
+ "Auto Handle Smoothing mode used for newly added F-Curves");
+
prop = RNA_def_property(srna, "keyframe_new_interpolation_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, rna_enum_beztriple_interpolation_mode_items);
RNA_def_property_enum_sdna(prop, NULL, "ipo_new");