diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-05-22 19:29:15 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-05-22 19:29:15 +0400 |
commit | 6485b32909e8e9d89891ac3808099425148514dc (patch) | |
tree | 94b26787d96afd6bd2f0d693f02f33086f95eda5 | |
parent | 8801330c18b063e341e8263131c91695cd1b7bdf (diff) |
Add new theme-able color, TH_SKIN_ROOT.
Bumped file version from 263.5 to 263.6 to ensure the default
TH_SKIN_ROOT color gets set.
Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 12 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 5 |
4 files changed, 24 insertions, 1 deletions
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 35376412628..2d409879ba3 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -198,7 +198,9 @@ enum { TH_STITCH_PREVIEW_ACTIVE, TH_MATCH, /* highlight color for search matches */ - TH_SELECT_HIGHLIGHT /* highlight color for selected outliner item */ + TH_SELECT_HIGHLIGHT, /* highlight color for selected outliner item */ + + TH_SKIN_ROOT }; /* XXX WARNING: previous is saved in file, so do not change order! */ diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index ae42d6d7f58..0d16e0f4dc0 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -469,6 +469,10 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo case TH_SELECT_HIGHLIGHT: cp = ts->selected_highlight; break; + + case TH_SKIN_ROOT: + cp = ts->skin_root; + break; } } } @@ -702,6 +706,8 @@ void ui_theme_init_default(void) rgba_char_args_set(btheme->tv3d.bundle_solid, 200, 200, 200, 255); rgba_char_args_set(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255); + + rgba_char_args_set(btheme->tv3d.skin_root, 180, 77, 77, 255); /* space buttons */ /* to have something initialized */ @@ -1808,6 +1814,12 @@ void init_userdef_do_versions(void) } } + if (bmain->versionfile < 263 || (bmain->versionfile == 263 && bmain->subversionfile < 6)) { + bTheme *btheme; + for (btheme = U.themes.first; btheme; btheme = btheme->next) + rgba_char_args_set(btheme->tv3d.skin_root, 180, 77, 77, 255); + } + /* GL Texture Garbage Collection (variable abused above!) */ if (U.textimeout == 0) { U.texcollectrate = 60; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 94c4d141a57..b0874eefa4a 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -261,6 +261,10 @@ typedef struct ThemeSpace { char match[4]; /* outliner - filter match */ char selected_highlight[4]; /* outliner - selected item */ + + char skin_root[4]; /* Skin modifier root color */ + + int pad4; } ThemeSpace; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index b2dbc6b4632..c21fa2614a8 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1199,6 +1199,11 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna) RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Camera Path", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); + + prop = RNA_def_property(srna, "skin_root", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Skin Root", ""); + RNA_def_property_update(prop, 0, "rna_userdef_update"); } |