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:
authorClément Foucault <foucault.clem@gmail.com>2018-09-25 00:18:02 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-09-25 23:51:54 +0300
commita3bb385ca0ba37bf1cdc1b74de9ce872b262fb95 (patch)
tree250974f326d38cf9bebec98ad5b79a2fb64add10 /source/blender/draw/modes/edit_mesh_mode_text.c
parent7cc9998809359dead38bd20de851494e11ab3da1 (diff)
Edit Mesh: Move Edit Mesh display settings to overlay's
This makes the Edit Mesh display settings common to all objects. They can also be set differently per viewport. Modifying extra data (seams, sharp edges etc...) will no longer set them automaticaly visible. Bumping version because we need to force set all extra draw options for older files.
Diffstat (limited to 'source/blender/draw/modes/edit_mesh_mode_text.c')
-rw-r--r--source/blender/draw/modes/edit_mesh_mode_text.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/draw/modes/edit_mesh_mode_text.c b/source/blender/draw/modes/edit_mesh_mode_text.c
index 27f4237dba2..2874a9d60da 100644
--- a/source/blender/draw/modes/edit_mesh_mode_text.c
+++ b/source/blender/draw/modes/edit_mesh_mode_text.c
@@ -70,7 +70,7 @@ void DRW_edit_mesh_mode_text_measure_stats(
const bool do_global = (v3d->flag & V3D_GLOBAL_STATS) != 0;
const bool do_moving = (G.moving & G_TRANSFORM_EDIT) != 0;
/* when 2 edge-info options are enabled, space apart */
- const bool do_edge_textpair = (me->drawflag & ME_DRAWEXTRA_EDGELEN) && (me->drawflag & ME_DRAWEXTRA_EDGEANG);
+ const bool do_edge_textpair = (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_EDGE_LEN) && (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_EDGE_ANG);
const short edge_texpair_sep = (short)(5.0f * U.ui_scale);
float clip_planes[4][4];
/* allow for displaying shape keys and deform mods */
@@ -84,14 +84,14 @@ void DRW_edit_mesh_mode_text_measure_stats(
else if (grid <= 10.0f) conv_float = "%.3g";
else conv_float = "%.2g";
- if (me->drawflag & (ME_DRAWEXTRA_EDGELEN | ME_DRAWEXTRA_EDGEANG | ME_DRAWEXTRA_INDICES)) {
+ if (v3d->overlay.edit_flag & (V3D_OVERLAY_EDIT_EDGE_LEN | V3D_OVERLAY_EDIT_EDGE_ANG | V3D_OVERLAY_EDIT_INDICES)) {
BoundBox bb;
const rcti rect = {0, ar->winx, 0, ar->winy};
ED_view3d_clipping_calc(&bb, clip_planes, ar, em->ob, &rect);
}
- if (me->drawflag & ME_DRAWEXTRA_EDGELEN) {
+ if (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_EDGE_LEN) {
BMEdge *eed;
UI_GetThemeColor3ubv(TH_DRAWEXTRA_EDGELEN, col);
@@ -133,7 +133,7 @@ void DRW_edit_mesh_mode_text_measure_stats(
}
}
- if (me->drawflag & ME_DRAWEXTRA_EDGEANG) {
+ if (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_EDGE_ANG) {
const bool is_rad = (unit->system_rotation == USER_UNIT_ROT_RADIANS);
BMEdge *eed;
@@ -191,7 +191,7 @@ void DRW_edit_mesh_mode_text_measure_stats(
}
}
- if (me->drawflag & ME_DRAWEXTRA_FACEAREA) {
+ if (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_FACE_AREA) {
/* would be nice to use BM_face_calc_area, but that is for 2d faces
* so instead add up tessellation triangle areas */
@@ -242,7 +242,7 @@ void DRW_edit_mesh_mode_text_measure_stats(
}
}
- if (me->drawflag & ME_DRAWEXTRA_FACEANG) {
+ if (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_FACE_ANG) {
BMFace *efa;
const bool is_rad = (unit->system_rotation == USER_UNIT_ROT_RADIANS);
@@ -296,7 +296,7 @@ void DRW_edit_mesh_mode_text_measure_stats(
}
/* This option is for mesh ops and addons debugging; only available in UI if Blender starts with --debug */
- if (me->drawflag & ME_DRAWEXTRA_INDICES) {
+ if (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_INDICES) {
int i;
/* For now, reuse an appropriate theme color */