diff options
author | Daniel Salazar <zanqdo@gmail.com> | 2010-02-11 06:37:51 +0300 |
---|---|---|
committer | Daniel Salazar <zanqdo@gmail.com> | 2010-02-11 06:37:51 +0300 |
commit | d65101629dacb5f6760304bea70285826075ae55 (patch) | |
tree | ec358235700e6b84582878a6ccfbbd4a90baaf9b /source/blender/editors | |
parent | 15ef07d6849f2d92d006f1e52c69142729b200f8 (diff) |
Added theme support for vertex normals display alongside face normals.
This makes having both enabled at the same time actually useful!
http://www.pasteall.org/pic/show.php?id=1265
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 1 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index e78ff664f3c..5336fa99c0f 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -160,6 +160,7 @@ enum { TH_FACE, TH_FACE_SELECT, TH_NORMAL, + TH_VNORMAL, TH_FACE_DOT, TH_FACEDOT_SIZE, TH_CFRAME, diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 313b03fdec3..785cb6384ac 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -293,6 +293,8 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) cp= &ts->facedot_size; break; case TH_NORMAL: cp= ts->normal; break; + case TH_VNORMAL: + cp= ts->vertex_normal; break; case TH_BONE_SOLID: cp= ts->bone_solid; break; case TH_BONE_POSE: @@ -486,6 +488,7 @@ void ui_theme_init_userdef(void) SETCOL(btheme->tv3d.face, 0, 0, 0, 18); SETCOL(btheme->tv3d.face_select, 255, 133, 0, 60); SETCOL(btheme->tv3d.normal, 0x22, 0xDD, 0xDD, 255); + SETCOL(btheme->tv3d.vertex_normal, 0x23, 0x61, 0xDD, 255); SETCOL(btheme->tv3d.face_dot, 255, 133, 0, 255); btheme->tv3d.facedot_size= 4; SETCOL(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255); @@ -984,6 +987,9 @@ void init_userdef_do_versions(void) if(btheme->tv3d.normal[3]==0) { SETCOL(btheme->tv3d.normal, 0x22, 0xDD, 0xDD, 255); } + if(btheme->tv3d.vertex_normal[3]==0) { + SETCOL(btheme->tv3d.vertex_normal, 0x23, 0x61, 0xDD, 255); + } if(btheme->tv3d.face_dot[3]==0) { SETCOL(btheme->tv3d.face_dot, 255, 138, 48, 255); btheme->tv3d.facedot_size= 4; diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 5c5f0dbc897..5de0308029e 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -2313,7 +2313,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object draw_dm_face_normals(scene, cageDM); } if(me->drawflag & ME_DRAW_VNORMALS) { - UI_ThemeColor(TH_NORMAL); + UI_ThemeColor(TH_VNORMAL); draw_dm_vert_normals(scene, cageDM); } |