Page MenuHome

draw_active_face_option2.patch

Authored By
Sergej Reich (sergof)
Nov 13 2013, 3:08 PM
Size
4 KB
Subscribers
None

draw_active_face_option2.patch

Index: release/scripts/ui/space_userpref.py
===================================================================
--- release/scripts/ui/space_userpref.py (revision 34215)
+++ release/scripts/ui/space_userpref.py (working copy)
@@ -161,6 +161,7 @@
col.prop(view, "show_large_cursors")
col.prop(view, "show_view_name", text="View Name")
col.prop(view, "show_playback_fps", text="Playback FPS")
+ col.prop(view, "show_active_face", text="Active Face")
col.prop(view, "use_global_scene")
col.prop(view, "object_origin_size")
Index: source/blender/makesdna/DNA_userdef_types.h
===================================================================
--- source/blender/makesdna/DNA_userdef_types.h (revision 34215)
+++ source/blender/makesdna/DNA_userdef_types.h (working copy)
@@ -476,6 +476,7 @@
#define USER_SPLASH_DISABLE (1 << 27)
#define USER_HIDE_RECENT (1 << 28)
#define USER_SHOW_THUMBNAILS (1 << 29)
+#define USER_DRAW_ACTFACE (1 << 30)
/* Auto-Keying mode */
/* AUTOKEY_ON is a bitflag */
Index: source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- source/blender/makesrna/intern/rna_userdef.c (revision 34215)
+++ source/blender/makesrna/intern/rna_userdef.c (working copy)
@@ -1957,6 +1957,11 @@
RNA_def_property_ui_text(prop, "Display Object Info", "Display objects name and frame number in 3D view");
RNA_def_property_update(prop, 0, "rna_userdef_update");
+ prop= RNA_def_property(srna, "show_active_face", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DRAW_ACTFACE);
+ 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_userdef_update");
+
prop= RNA_def_property(srna, "use_global_scene", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SCENEGLOBAL);
RNA_def_property_ui_text(prop, "Global Scene", "Forces the current Scene to be displayed in all Screens");
Index: source/blender/editors/space_view3d/drawobject.c
===================================================================
--- source/blender/editors/space_view3d/drawobject.c (revision 34215)
+++ source/blender/editors/space_view3d/drawobject.c (working copy)
@@ -2282,7 +2282,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;
@@ -2356,11 +2356,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(U.uiflag & USER_DRAW_ACTFACE)
+ 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 (U.uiflag & USER_DRAW_ACTFACE && 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 34215)
+++ source/blender/editors/uvedit/uvedit_draw.c (working copy)
@@ -480,7 +480,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);
@@ -521,7 +520,7 @@
/* 3. draw active face stippled */
- if(activetf) {
+ if(U.uiflag & USER_DRAW_ACTFACE && activetf) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
UI_ThemeColor4(TH_EDITMESH_ACTIVE);

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
6c/f3/e580225add4136c129bd50285106

Event Timeline