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
path: root/source
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-10-29 17:34:47 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-10-29 18:26:52 +0300
commit6b3981737ac547996bfdedaa95d8071aa712cab0 (patch)
treea8d377b821b9f4a1084bcb47f0751e59b10eb2c4 /source
parent2a9b53b97076f8a1e098afd2463b0b3f94575d1c (diff)
Edit Mode: Fix "Hidden Wire" option not working
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c16
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_space.c10
3 files changed, 21 insertions, 7 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index ab52a9b8b8f..52c83d83454 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -2162,7 +2162,21 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
gpd->grid.lines = GP_DEFAULT_GRID_LINES; // Number of lines
gpd->grid.axis = GP_GRID_AXIS_Y;
}
+ }
-
+ {
+ for (bScreen *screen = bmain->screen.first; screen; screen = screen->id.next) {
+ for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
+ for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D *)sl;
+ if (v3d->flag2 & V3D_OCCLUDE_WIRE) {
+ v3d->overlay.edit_flag |= V3D_OVERLAY_EDIT_OCCLUDE_WIRE;
+ v3d->flag2 &= ~V3D_OCCLUDE_WIRE;
+ }
+ }
+ }
+ }
+ }
}
}
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index fca1a79c775..d9628dabd74 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -361,7 +361,7 @@ typedef struct View3D {
#define V3D_RENDER_BORDER (1 << 11)
#define V3D_SOLID_MATCAP (1 << 12) /* user flag */
#define V3D_SHOW_SOLID_MATCAP (1 << 13) /* runtime flag */
-#define V3D_OCCLUDE_WIRE (1 << 14)
+#define V3D_OCCLUDE_WIRE (1 << 14) /* XXX: DNA deprecated */
#define V3D_SHOW_MODE_SHADE_OVERRIDE (1 << 15) /* XXX: DNA deprecated */
/* View3d->gp_flag (short) */
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 35bfc92370c..d230b5394cb 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2626,11 +2626,6 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Show Overlays", "Display overlays like gizmos and outlines");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
- prop = RNA_def_property(srna, "show_occlude_wire", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_OCCLUDE_WIRE);
- RNA_def_property_ui_text(prop, "Hidden Wire", "Use hidden wireframe display");
- RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
-
prop = RNA_def_property(srna, "show_floor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_FLOOR);
RNA_def_property_ui_text(prop, "Display Grid Floor", "Show the ground plane grid in perspective view");
@@ -2794,6 +2789,11 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Show Weights", "Display weights in editmode");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+ prop = RNA_def_property(srna, "show_occlude_wire", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_OCCLUDE_WIRE);
+ RNA_def_property_ui_text(prop, "Hidden Wire", "Use hidden wireframe display");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+
prop = RNA_def_property(srna, "show_face_normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_FACE_NORMALS);
RNA_def_property_ui_text(prop, "Display Normals", "Display face normals as lines");