diff options
author | Thomas Dinges <blender@dingto.org> | 2012-03-23 20:14:25 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2012-03-23 20:14:25 +0400 |
commit | b331c867e1783cc1b3fa8c7ed88b022ddfda8436 (patch) | |
tree | b960cf0e3ff0967c21128a31ccf8dd435a4430c6 /source/blender/editors | |
parent | 310353171600278bbffdbf060d68ac502e3b0d33 (diff) |
3D View Themes:
* Camera and Empty colour is now themeable. Patch by Pablo Vazquez (venomgfx) with some minor edits.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 3 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index c329a784d18..c470b13aa69 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -133,8 +133,9 @@ enum { TH_STRIP_SELECT, TH_LAMP, - TH_SPEAKER, + TH_CAMERA, + TH_EMPTY, TH_NODE, TH_NODE_IN_OUT, diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 448c076a6a1..124ce77325b 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -245,6 +245,10 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo cp= ts->lamp; break; case TH_SPEAKER: cp= ts->speaker; break; + case TH_CAMERA: + cp= ts->camera; break; + case TH_EMPTY: + cp= ts->empty; break; case TH_SELECT: cp= ts->select; break; case TH_ACTIVE: @@ -636,6 +640,8 @@ void ui_theme_init_default(void) rgba_char_args_set(btheme->tv3d.wire, 0x0, 0x0, 0x0, 255); rgba_char_args_set(btheme->tv3d.lamp, 0, 0, 0, 40); rgba_char_args_set(btheme->tv3d.speaker, 0, 0, 0, 255); + rgba_char_args_set(btheme->tv3d.camera, 0, 0, 0, 255); + rgba_char_args_set(btheme->tv3d.empty, 0, 0, 0, 255); rgba_char_args_set(btheme->tv3d.select, 241, 88, 0, 255); rgba_char_args_set(btheme->tv3d.active, 255, 170, 64, 255); rgba_char_args_set(btheme->tv3d.group, 8, 48, 8, 255); diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index f18ee9220a9..c0c117242d7 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -5877,7 +5877,7 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d) if (ob==OBACT) curcol= TH_ACTIVE; else curcol= TH_SELECT; } - else curcol= TH_WIRE; + else curcol= TH_EMPTY; /* scale size of circle etc with the empty drawsize */ if (ob->type == OB_EMPTY) size = ob->empty_drawsize; @@ -6475,6 +6475,8 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) else { if (ob->type==OB_LAMP) theme_id= TH_LAMP; else if (ob->type==OB_SPEAKER) theme_id= TH_SPEAKER; + else if (ob->type==OB_CAMERA) theme_id= TH_CAMERA; + else if (ob->type==OB_EMPTY) theme_id= TH_EMPTY; /* fallback to TH_WIRE */ } } |