diff options
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 3 | ||||
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_gpencil.c | 5 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 5 |
4 files changed, 2 insertions, 12 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 643776fc612..fca4cb4c321 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -6733,10 +6733,9 @@ class VIEW3D_PT_overlay_gpencil_options(Panel): col = layout.column() row = col.row() row.prop(overlay, "use_gpencil_grid", text="") - sub = row.row(align=True) + sub = row.row() sub.active = overlay.use_gpencil_grid sub.prop(overlay, "gpencil_grid_opacity", text="Canvas", slider=True) - sub.prop(overlay, "use_gpencil_canvas_xray", text="", icon='XRAY') row = col.row() row.prop(overlay, "use_gpencil_fade_layers", text="") diff --git a/source/blender/draw/engines/overlay/overlay_gpencil.c b/source/blender/draw/engines/overlay/overlay_gpencil.c index 1397ef7b4b2..b79d5753686 100644 --- a/source/blender/draw/engines/overlay/overlay_gpencil.c +++ b/source/blender/draw/engines/overlay/overlay_gpencil.c @@ -204,7 +204,6 @@ void OVERLAY_gpencil_cache_init(OVERLAY_Data *vedata) const bool show_grid = (v3d->gp_flag & V3D_GP_SHOW_GRID) != 0 && ((ts->gpencil_v3d_align & (GP_PROJECT_DEPTH_VIEW | GP_PROJECT_DEPTH_STROKE)) == 0); - const bool grid_xray = (v3d->gp_flag & V3D_GP_SHOW_GRID_XRAY); if (show_grid && show_overlays) { const char *grid_unit = NULL; @@ -257,9 +256,7 @@ void OVERLAY_gpencil_cache_init(OVERLAY_Data *vedata) const int gridlines = (gpd->grid.lines <= 0) ? 1 : gpd->grid.lines; int line_ct = gridlines * 4 + 2; - DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA; - state |= (grid_xray) ? DRW_STATE_DEPTH_ALWAYS : DRW_STATE_DEPTH_LESS_EQUAL; - + DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_ALPHA; DRW_PASS_CREATE(psl->gpencil_canvas_ps, state); sh = OVERLAY_shader_gpencil_canvas(); diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 11c3c1c4d1b..21def800e4a 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -450,7 +450,6 @@ enum { #define V3D_GP_FADE_NOACTIVE_GPENCIL (1 << 6) /* Fade other GPencil objects */ #define V3D_GP_SHOW_STROKE_DIRECTION (1 << 7) /* Show Strokes Directions */ #define V3D_GP_SHOW_MATERIAL_NAME (1 << 8) /* Show Material names */ -#define V3D_GP_SHOW_GRID_XRAY (1 << 9) /* Show Canvas Grid on Top */ /** #View3DShading.flag */ enum { diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 326dd88dc59..d4d35e07c2a 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -3852,11 +3852,6 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) prop, "Fade Grease Pencil Objects", "Fade Grease Pencil Objects, except the active one"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update"); - prop = RNA_def_property(srna, "use_gpencil_canvas_xray", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "gp_flag", V3D_GP_SHOW_GRID_XRAY); - RNA_def_property_ui_text(prop, "Canvas X-Ray", "Put Canvas grid on top of any other object"); - RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update"); - prop = RNA_def_property(srna, "use_gpencil_show_directions", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gp_flag", V3D_GP_SHOW_STROKE_DIRECTION); RNA_def_property_ui_text(prop, |