diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-26 14:53:59 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-26 14:53:59 +0400 |
commit | 2157031dc0ecbe99ef50a8031b44678d69e05740 (patch) | |
tree | 6d08c2056cf1636ef56fd235c2cf2f94e6d1ed69 | |
parent | ffe92d0e430aa9498c59a0335beae76b73bd54d6 (diff) |
Fix #31550: Active Armature bone hardly distinguishable from other selected bones
Made active bone color a bit brighter and made it a userpref option.
-rw-r--r-- | source/blender/blenkernel/BKE_blender.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 1 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawarmature.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 5 |
6 files changed, 19 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 48c7103d8fd..8476791a320 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -42,7 +42,7 @@ extern "C" { * and keep comment above the defines. * Use STRINGIFY() rather than defining with quotes */ #define BLENDER_VERSION 263 -#define BLENDER_SUBVERSION 14 +#define BLENDER_SUBVERSION 15 #define BLENDER_MINVERSION 250 #define BLENDER_MINSUBVERSION 0 diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 51df30d6c28..e879a01dbfb 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -127,6 +127,7 @@ enum { TH_BONE_SOLID, TH_BONE_POSE, + TH_BONE_POSE_ACTIVE, TH_STRIP, TH_STRIP_SELECT, diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 50f93f7e9f5..ba6f1be4289 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -303,6 +303,8 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo cp = ts->bone_solid; break; case TH_BONE_POSE: cp = ts->bone_pose; break; + case TH_BONE_POSE_ACTIVE: + cp = ts->bone_pose_active; break; case TH_STRIP: cp = ts->strip; break; case TH_STRIP_SELECT: @@ -739,6 +741,7 @@ void ui_theme_init_default(void) rgba_char_args_set(btheme->tv3d.bone_solid, 200, 200, 200, 255); /* alpha 80 is not meant editable, used for wire+action draw */ rgba_char_args_set(btheme->tv3d.bone_pose, 80, 200, 255, 80); + rgba_char_args_set(btheme->tv3d.bone_pose_active, 140, 255, 255, 80); rgba_char_args_set(btheme->tv3d.bundle_solid, 200, 200, 200, 255); rgba_char_args_set(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255); @@ -1914,6 +1917,13 @@ void init_userdef_do_versions(void) } } + if (bmain->versionfile < 263 || (bmain->versionfile == 263 && bmain->subversionfile < 15)) { + bTheme *btheme; + for (btheme = U.themes.first; btheme; btheme = btheme->next) { + rgba_char_args_set(btheme->tv3d.bone_pose_active, 140, 255, 255, 80); + } + } + /* GL Texture Garbage Collection (variable abused above!) */ if (U.textimeout == 0) { U.texcollectrate = 60; diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index 48b3672c144..a05bc5eddc7 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -171,7 +171,7 @@ static short set_pchan_glColor(short colCode, int boneflag, short constflag) } else { if ((boneflag & BONE_DRAW_ACTIVE) && (boneflag & BONE_SELECTED)) { - UI_ThemeColorShade(TH_BONE_POSE, 40); + UI_ThemeColor(TH_BONE_POSE_ACTIVE); } else if (boneflag & BONE_DRAW_ACTIVE) { UI_ThemeColorBlend(TH_WIRE, TH_BONE_POSE, 0.15f); /* unselected active */ diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 4e9ec0da092..7f52956d1e0 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -215,7 +215,7 @@ typedef struct ThemeSpace { char extra_edge_len[4], extra_face_angle[4], extra_face_area[4], pad3[4]; char normal[4]; char vertex_normal[4]; - char bone_solid[4], bone_pose[4]; + char bone_solid[4], bone_pose[4], bone_pose_active[4]; char strip[4], strip_select[4]; char cframe[4]; @@ -264,8 +264,6 @@ typedef struct ThemeSpace { char skin_root[4]; /* Skin modifier root color */ - int pad4; - /* NLA */ char anim_active[4]; /* Active Action + Summary Channel */ char anim_non_active[4]; /* Active Action = NULL */ diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index aa239db459b..5820de3a7e2 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1183,6 +1183,11 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Bone Pose", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); + prop = RNA_def_property(srna, "bone_pose_active", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Bone Pose Active", ""); + RNA_def_property_update(prop, 0, "rna_userdef_update"); + prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "cframe"); RNA_def_property_array(prop, 3); |