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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-08-30 09:21:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-08-30 09:21:03 +0300
commite74d7d6f81356b8b3a5a843a4dbb87fe1909fb14 (patch)
tree984a86c85ee57a94580c9d8db7d332c75e700645
parent7dd24ba6e84cf48b0d1ce60abaedfcd94cd5d5f6 (diff)
3D View: option to always show center in face mode
This matches 2.7x behavior
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py3
-rw-r--r--source/blender/draw/modes/edit_mesh_mode.c15
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c5
4 files changed, 20 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 07ded525d61..8d2cdd4b11b 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -4354,6 +4354,9 @@ class VIEW3D_PT_overlay_edit_mesh(Panel):
sub.prop(data, "show_edges", text="Edges")
sub = split.column()
sub.prop(data, "show_faces", text="Faces")
+ sub = split.column()
+ sub.active = view.use_occlude_geometry
+ sub.prop(data, "show_face_center", text="Center")
row = col.row(align=True)
row.prop(data, "show_edge_crease", text="Creases", toggle=True)
diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c
index 6c86f008e3d..a79c0e2dc31 100644
--- a/source/blender/draw/modes/edit_mesh_mode.c
+++ b/source/blender/draw/modes/edit_mesh_mode.c
@@ -559,14 +559,21 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob)
if (stl->g_data->do_zbufclip) {
edit_mesh_add_ob_to_pass(
- scene, ob, stl->g_data->face_occluded_shgrp, stl->g_data->ledges_occluded_shgrp,
- stl->g_data->lverts_occluded_shgrp, stl->g_data->facedot_occluded_shgrp,
+ scene, ob,
+ stl->g_data->face_occluded_shgrp,
+ stl->g_data->ledges_occluded_shgrp,
+ stl->g_data->lverts_occluded_shgrp,
+ stl->g_data->facedot_occluded_shgrp,
stl->g_data->facefill_occluded_shgrp);
}
else {
edit_mesh_add_ob_to_pass(
- scene, ob, stl->g_data->face_overlay_shgrp, stl->g_data->ledges_overlay_shgrp,
- stl->g_data->lverts_overlay_shgrp, NULL, NULL);
+ scene, ob,
+ stl->g_data->face_overlay_shgrp,
+ stl->g_data->ledges_overlay_shgrp,
+ stl->g_data->lverts_overlay_shgrp,
+ (me->drawflag & ME_DRAW_FACE_DOT) ? stl->g_data->facedot_overlay_shgrp : NULL,
+ NULL);
}
stl->g_data->ghost_ob += (ob->dtx & OB_DRAWXRAY) ? 1 : 0;
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index 9e15bd32b3b..a91f2f05c1a 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -243,7 +243,7 @@ enum {
ME_DRAW_VNORMALS = 1 << 3,
ME_DRAWEIGHT = 1 << 4,
- /* ME_HIDDENEDGES = 1 << 5, */ /* DEPRECATED */
+ ME_DRAW_FACE_DOT = 1 << 5,
ME_DRAWCREASES = 1 << 6,
ME_DRAWSEAMS = 1 << 7,
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 041fd352658..53c5da243fe 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -3523,6 +3523,11 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Draw Faces", "Display 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_face_center", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_FACE_DOT);
+ RNA_def_property_ui_text(prop, "Draw Face Center", "Display face center");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+
prop = RNA_def_property(srna, "show_edge_crease", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWCREASES);
RNA_def_property_ui_text(prop, "Draw Creases", "Display creases created for Subdivision Surface modifier");