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
path: root/source
diff options
context:
space:
mode:
authorDaniel Salazar <zanqdo@gmail.com>2010-02-11 06:37:51 +0300
committerDaniel Salazar <zanqdo@gmail.com>2010-02-11 06:37:51 +0300
commitd65101629dacb5f6760304bea70285826075ae55 (patch)
treeec358235700e6b84582878a6ccfbbd4a90baaf9b /source
parent15ef07d6849f2d92d006f1e52c69142729b200f8 (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')
-rw-r--r--source/blender/editors/include/UI_resources.h1
-rw-r--r--source/blender/editors/interface/resources.c6
-rw-r--r--source/blender/editors/space_view3d/drawobject.c2
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c7
5 files changed, 15 insertions, 2 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);
}
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 24d54bae1fa..5b1c6d96ec0 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -196,6 +196,7 @@ typedef struct ThemeSpace {
char face[4], face_select[4]; // solid faces
char face_dot[4]; // selected color
char normal[4];
+ char vertex_normal[4];
char bone_solid[4], bone_pose[4];
char strip[4], strip_select[4];
char cframe[4];
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 143ee4c4cbd..80f2d076b7a 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -761,7 +761,12 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Normal", "");
+ RNA_def_property_ui_text(prop, "Face Normal", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop= RNA_def_property(srna, "vertex_normal", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Vertex Normal", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "bone_solid", PROP_FLOAT, PROP_COLOR);