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/editors/space_graph/space_graph.c
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/editors/space_graph/space_graph.c')
-rw-r--r--source/blender/editors/space_graph/space_graph.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index f41169b6c39..fa7c6bd472a 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -563,13 +563,13 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
switch (fcu->array_index) {
case 0:
- col[0] = 1.0f; col[1] = 0.0f; col[2] = 0.0f;
+ UI_GetThemeColor3fv(TH_AXIS_X, col);
break;
case 1:
- col[0] = 0.0f; col[1] = 1.0f; col[2] = 0.0f;
+ UI_GetThemeColor3fv(TH_AXIS_Y, col);
break;
case 2:
- col[0] = 0.0f; col[1] = 0.0f; col[2] = 1.0f;
+ UI_GetThemeColor3fv(TH_AXIS_Z, col);
break;
default:
/* 'unknown' color - bluish so as to not conflict with handles */