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:
authorJoshua Leung <aligorith@gmail.com>2011-08-04 18:13:05 +0400
committerJoshua Leung <aligorith@gmail.com>2011-08-04 18:13:05 +0400
commit900928f8bf47b8f1bbb1b2cd863d2d9649c940a0 (patch)
treee5d20746f2a35a5dca94dba00d1d0dc1ff83eeec /source/blender/makesrna/intern/rna_userdef.c
parent2ed11158db7cfc157c26475a2dcb5f513043cd72 (diff)
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c17
1 files changed, 16 insertions, 1 deletions
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", "");