From 900928f8bf47b8f1bbb1b2cd863d2d9649c940a0 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 4 Aug 2011 14:13:05 +0000 Subject: Bassam Feature Request: "Auto Clamped" handles can now be set per handle/key This used to be a weird per-curve setting which would happen to get applied/work correctly if handles were set to "auto", and was a source of constant confusion for both old and new animators. The main effect of this handle-type/option was really to just ensure that auto-handles stayed horizontal, instead of tilting as the keys were moved. This commit simply changes this from a per-curve to per keyframe/handle setting. --- source/blender/makesrna/intern/rna_userdef.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/rna_userdef.c') diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 64cd7dc646f..7cafc39d0ff 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -878,6 +878,21 @@ static void rna_def_userdef_theme_spaces_curves(StructRNA *srna, short incl_nurb RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Align handle selected color", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); + + if (incl_nurbs == 0) { + /* assume that when nurbs are off, this is for 2D (i.e. anim) editors */ + prop= RNA_def_property(srna, "handle_auto_clamped", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, NULL, "handle_auto_clamped"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Auto-Clamped handle color", ""); + RNA_def_property_update(prop, 0, "rna_userdef_update"); + + prop= RNA_def_property(srna, "handle_sel_auto_clamped", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, NULL, "handle_sel_auto_clamped"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Auto-Clamped handle selected color", ""); + RNA_def_property_update(prop, 0, "rna_userdef_update"); + } prop= RNA_def_property(srna, "lastsel_point", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "lastsel_point"); @@ -2254,7 +2269,7 @@ static void rna_def_userdef_edit(BlenderRNA *brna) RNA_def_property_ui_text(prop, "New Interpolation Type", ""); prop= RNA_def_property(srna, "keyframe_new_handle_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, beztriple_handle_type_items); + RNA_def_property_enum_items(prop, keyframe_handle_type_items); RNA_def_property_enum_sdna(prop, NULL, "keyhandles_new"); RNA_def_property_ui_text(prop, "New Handles Type", ""); -- cgit v1.2.3