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>2012-11-09 10:36:11 +0400
committerJoshua Leung <aligorith@gmail.com>2012-11-09 10:36:11 +0400
commit9b91da0d0dea01ef74b317bdaeaf20d19cf7cfd0 (patch)
treebb17304f56d120c9fb4f07cb4eed06f85d10770e /source/blender/makesrna
parent1369e29db01ccbaa5a11add9e888972fde9af7ae (diff)
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like the mini axis indicator, grid axis indicators, manipulators, transform constraint indicators, F-Curves (when using XYZ to RGB colouring option), and perhaps something else I've missed. Previously, these places all used hardcoded defines (220 * i/j/k), but the readability of these colours was often quite poor, especially when used with certain themes. The settings for these colours can be found under the "User Interface" section of the themes (i.e. same set of colours is used across editors). I could have made these per editor, but since it's unlikely that these will need to be too different across editors in practice (+ being easier to version patch), they are stored under the UI section.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index fe179d8486d..11e04cdd281 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -770,6 +770,25 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
prop = RNA_def_property(srna, "icon_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_ui_text(prop, "Icon Alpha", "Transparency of icons in the interface, to reduce contrast");
RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ /* axis */
+ prop = RNA_def_property(srna, "axis_x", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "xaxis");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "X Axis", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "axis_y", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "yaxis");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Y Axis", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "axis_z", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "zaxis");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Z Axis", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_generic(BlenderRNA *brna)