Page Menu
Home
Search
Configure Global Search
Log In
Files
F15159
draw_active_face_option.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Sergej Reich (sergof)
Nov 13 2013, 3:08 PM
Size
4 KB
Subscribers
None
draw_active_face_option.patch
View Options
Index: release/scripts/ui/space_view3d.py
===================================================================
--- release/scripts/ui/space_view3d.py (revision 33953)
+++ release/scripts/ui/space_view3d.py (working copy)
@@ -2095,6 +2095,7 @@
col.label(text="Overlays:")
col.prop(mesh, "show_edges", text="Edges")
col.prop(mesh, "show_faces", text="Faces")
+ col.prop(mesh, "show_active_face", text="Active Face")
col.prop(mesh, "show_edge_crease", text="Creases")
col.prop(mesh, "show_edge_bevel_weight", text="Bevel Weights")
col.prop(mesh, "show_edge_seams", text="Seams")
Index: source/blender/makesdna/DNA_mesh_types.h
===================================================================
--- source/blender/makesdna/DNA_mesh_types.h (revision 33953)
+++ source/blender/makesdna/DNA_mesh_types.h (working copy)
@@ -142,6 +142,7 @@
/* me->drawflag, int */
#define ME_DRAWEDGES (1 << 0)
#define ME_DRAWFACES (1 << 1)
+#define ME_DRAWACTFACE (1 << 13)
#define ME_DRAWNORMALS (1 << 2)
#define ME_DRAW_VNORMALS (1 << 3)
Index: source/blender/makesrna/intern/rna_mesh.c
===================================================================
--- source/blender/makesrna/intern/rna_mesh.c (revision 33953)
+++ source/blender/makesrna/intern/rna_mesh.c (working copy)
@@ -1947,6 +1947,11 @@
RNA_def_property_ui_text(prop, "Draw Faces", "Displays all faces as shades in the 3D view and UV editor");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ prop= RNA_def_property(srna, "show_active_face", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWACTFACE);
+ RNA_def_property_ui_text(prop, "Draw Active Face", "Displays active face stippled in the 3D view and UV editor");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+
prop= RNA_def_property(srna, "show_normal_face", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWNORMALS);
RNA_def_property_ui_text(prop, "Draw Normals", "Displays face normals as lines");
Index: source/blender/editors/space_view3d/drawobject.c
===================================================================
--- source/blender/editors/space_view3d/drawobject.c (revision 33953)
+++ source/blender/editors/space_view3d/drawobject.c (working copy)
@@ -2279,7 +2279,7 @@
static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, EditMesh *em, DerivedMesh *cageDM, DerivedMesh *finalDM, int dt)
{
Mesh *me = ob->data;
- EditFace *efa_act = EM_get_actFace(em, 0); /* annoying but active faces is stored differently */
+ EditFace *efa_act = EM_get_actFace(em, 0); /* annoying but active face is stored differently */
EditEdge *eed_act = NULL;
EditVert *eve_act = NULL;
@@ -2353,11 +2353,15 @@
if CHECK_OB_DRAWTEXTURE(v3d, dt)
col1[3] = 0;
- draw_dm_faces_sel(cageDM, col1, col2, col3, efa_act);
+ /* don't draw active face unless we want it */
+ if(me->drawflag & ME_DRAWACTFACE)
+ draw_dm_faces_sel(cageDM, col1, col2, col3, efa_act);
+ else
+ draw_dm_faces_sel(cageDM, col1, col2, col3, NULL);
glDisable(GL_BLEND);
glDepthMask(1); // restore write in zbuffer
- } else if (efa_act) {
+ } else if (me->drawflag & ME_DRAWACTFACE && efa_act) {
/* even if draw faces is off it would be nice to draw the stipple face
* Make all other faces zero alpha except for the active
* */
Index: source/blender/editors/uvedit/uvedit_draw.c
===================================================================
--- source/blender/editors/uvedit/uvedit_draw.c (revision 33953)
+++ source/blender/editors/uvedit/uvedit_draw.c (working copy)
@@ -479,7 +479,6 @@
if(uvedit_face_visible(scene, ima, efa, tf)) {
efa->tmp.p = tf;
- if(tf==activetf) continue; /* important the temp pointer is set above */
if(uvedit_face_selected(scene, efa, tf))
glColor4ubv((GLubyte *)col2);
@@ -520,7 +519,7 @@
/* 3. draw active face stippled */
- if(activetf) {
+ if(me->drawflag & ME_DRAWACTFACE && activetf) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
UI_ThemeColor4(TH_EDITMESH_ACTIVE);
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
36/ea/b8f2bfbce9e4445e6ba6a6a1e016
Event Timeline
Log In to Comment