diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-12 06:06:15 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-12 06:06:15 +0400 |
commit | 3116062a828e24ed2e91c219ab338a38030f2f42 (patch) | |
tree | fe77a0722deaee3afd521b4a596bbe5c1c827b2e /source/blender/makesrna/intern/rna_userdef.c | |
parent | 8b9bb47a3faf753cb0ca2ec0e9c6a741c7af31c2 (diff) |
2.5: Couple of small fun features
* Text window font size now supports full range 8-32, instead of
just 12 and 15. I added BLF_fixed_width to get the character
width of a fixed size font.
* Buttons do undo push on change again.
* Animated/Keyframe/Driver colors are now themable, with blend
value to blend with original color. Set this to 0.5 now to
give colors less constrast.
* Fix tooltip popping up with RMB menu open, and missing redraw.
* Autokeyframe now works for buttons.
* Driver expressions can be edited in place in a button now.
(still some refresh issues).
* Also made python driver default for the Add Driver function
in the RMB button. This way you don't have to open a Graph
editor if you just want to type an expression. Also, the
default expression then is the current value.
* Tooltips now show some extra info, not sure what is good to
have, but currently I added:
* Shortcut key for operator buttons.
* Python struct & property name for RNA buttons.
* Expression for driven values.
* Value for text/search/pointer buttons.
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 977c43e6b95..ffe3751908d 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -268,7 +268,50 @@ static void rna_def_userdef_theme_ui_wcol(BlenderRNA *brna) RNA_def_property_range(prop, -100, 100); RNA_def_property_ui_text(prop, "Shade Down", ""); RNA_def_property_update(prop, NC_WINDOW, NULL); +} + +static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna= RNA_def_struct(brna, "ThemeWidgetStateColors", NULL); + RNA_def_struct_sdna(srna, "uiWidgetStateColors"); + RNA_def_struct_ui_text(srna, "Theme Widget State Color", "Theme settings for widget state colors."); + + prop= RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Animated", ""); + RNA_def_property_update(prop, NC_WINDOW, NULL); + + prop= RNA_def_property(srna, "inner_anim_sel", PROP_FLOAT, PROP_COLOR); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Animated Selected", ""); + RNA_def_property_update(prop, NC_WINDOW, NULL); + prop= RNA_def_property(srna, "inner_key", PROP_FLOAT, PROP_COLOR); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Keyframe", ""); + RNA_def_property_update(prop, NC_WINDOW, NULL); + + prop= RNA_def_property(srna, "inner_key_sel", PROP_FLOAT, PROP_COLOR); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Keyframe Selected", ""); + RNA_def_property_update(prop, NC_WINDOW, NULL); + + prop= RNA_def_property(srna, "inner_driven", PROP_FLOAT, PROP_COLOR); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Driven", ""); + RNA_def_property_update(prop, NC_WINDOW, NULL); + + prop= RNA_def_property(srna, "inner_driven_sel", PROP_FLOAT, PROP_COLOR); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Driven Selected", ""); + RNA_def_property_update(prop, NC_WINDOW, NULL); + + prop= RNA_def_property(srna, "blend", PROP_FLOAT, PROP_PERCENTAGE); + RNA_def_property_ui_text(prop, "Blend", ""); + RNA_def_property_update(prop, NC_WINDOW, NULL); } static void rna_def_userdef_theme_ui(BlenderRNA *brna) @@ -277,6 +320,7 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna) PropertyRNA *prop; rna_def_userdef_theme_ui_wcol(brna); + rna_def_userdef_theme_ui_wcol_state(brna); srna= RNA_def_struct(brna, "ThemeUserInterface", NULL); RNA_def_struct_sdna(srna, "ThemeUI"); @@ -365,6 +409,12 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna) RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Scroll Widget Colors", ""); RNA_def_property_update(prop, NC_WINDOW, NULL); + + prop= RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NEVER_NULL); + RNA_def_property_pointer_sdna(prop, NULL, "wcol_state"); + RNA_def_property_struct_type(prop, "ThemeWidgetStateColors"); + RNA_def_property_ui_text(prop, "State Colors", ""); + RNA_def_property_update(prop, NC_WINDOW, NULL); prop= RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "iconfile"); |