[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26795] trunk/blender: Added theme support for vertex normals display alongside face normals.
Daniel Salazar
zanqdo at gmail.com
Thu Feb 11 04:37:53 CET 2010
Revision: 26795
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26795
Author: zanqdo
Date: 2010-02-11 04:37:51 +0100 (Thu, 11 Feb 2010)
Log Message:
-----------
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
Modified Paths:
--------------
trunk/blender/release/scripts/ui/space_userpref.py
trunk/blender/source/blender/editors/include/UI_resources.h
trunk/blender/source/blender/editors/interface/resources.c
trunk/blender/source/blender/editors/space_view3d/drawobject.c
trunk/blender/source/blender/makesdna/DNA_userdef_types.h
trunk/blender/source/blender/makesrna/intern/rna_userdef.c
Modified: trunk/blender/release/scripts/ui/space_userpref.py
===================================================================
--- trunk/blender/release/scripts/ui/space_userpref.py 2010-02-11 02:03:18 UTC (rev 26794)
+++ trunk/blender/release/scripts/ui/space_userpref.py 2010-02-11 03:37:51 UTC (rev 26795)
@@ -653,6 +653,7 @@
col.prop(v3d, "vertex")
col.prop(v3d, "face", slider=True)
col.prop(v3d, "normal")
+ col.prop(v3d, "vertex_normal")
col.prop(v3d, "bone_solid")
col.prop(v3d, "bone_pose")
#col.prop(v3d, "edge") Doesn't seem to work
Modified: trunk/blender/source/blender/editors/include/UI_resources.h
===================================================================
--- trunk/blender/source/blender/editors/include/UI_resources.h 2010-02-11 02:03:18 UTC (rev 26794)
+++ trunk/blender/source/blender/editors/include/UI_resources.h 2010-02-11 03:37:51 UTC (rev 26795)
@@ -160,6 +160,7 @@
TH_FACE,
TH_FACE_SELECT,
TH_NORMAL,
+ TH_VNORMAL,
TH_FACE_DOT,
TH_FACEDOT_SIZE,
TH_CFRAME,
Modified: trunk/blender/source/blender/editors/interface/resources.c
===================================================================
--- trunk/blender/source/blender/editors/interface/resources.c 2010-02-11 02:03:18 UTC (rev 26794)
+++ trunk/blender/source/blender/editors/interface/resources.c 2010-02-11 03:37:51 UTC (rev 26795)
@@ -293,6 +293,8 @@
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 @@
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 @@
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;
Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c 2010-02-11 02:03:18 UTC (rev 26794)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c 2010-02-11 03:37:51 UTC (rev 26795)
@@ -2313,7 +2313,7 @@
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);
}
Modified: trunk/blender/source/blender/makesdna/DNA_userdef_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_userdef_types.h 2010-02-11 02:03:18 UTC (rev 26794)
+++ trunk/blender/source/blender/makesdna/DNA_userdef_types.h 2010-02-11 03:37:51 UTC (rev 26795)
@@ -196,6 +196,7 @@
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];
Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2010-02-11 02:03:18 UTC (rev 26794)
+++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2010-02-11 03:37:51 UTC (rev 26795)
@@ -761,9 +761,14 @@
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);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bone Solid", "");
More information about the Bf-blender-cvs
mailing list