Fix #105460: Overlay "Backwire Opacity" is 0.0 in new 3D Views

The ability to adjust the "Backwire Opacity" was mistakenly removed in
version 2.93 (b365cc017a).

As this issue went unnoticed by most users, it appears reasonable to
completely remove this setting from the code.

By making this change, there is no longer a need to define a default
value for `View3DOverlay::backwire_opacity`.

Pull Request: https://projects.blender.org/blender/blender/pulls/116799
This commit is contained in:
Germano Cavalcante 2024-01-05 13:59:02 +01:00 committed by Germano Cavalcante
parent 73f968dbe5
commit 8460b67ef8
4 changed files with 1 additions and 10 deletions

View File

@ -3401,7 +3401,6 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain)
copy_v3_fl(v3d->shading.single_color, 0.8f);
v3d->shading.shadow_intensity = 0.5;
v3d->overlay.backwire_opacity = 0.5f;
v3d->overlay.normals_length = 0.1f;
v3d->overlay.flag = 0;
}

View File

@ -88,7 +88,7 @@ void OVERLAY_edit_mesh_cache_init(OVERLAY_Data *vedata)
const bool is_wire_shmode = (shading->type == OB_WIRE);
float backwire_opacity = (pd->edit_mesh.do_zbufclip) ? v3d->overlay.backwire_opacity : 1.0f;
float backwire_opacity = (pd->edit_mesh.do_zbufclip) ? 0.5f : 1.0f;
float face_alpha = (!pd->edit_mesh.do_faces) ? 0.0f : 1.0f;
GPUTexture **depth_tex = (pd->edit_mesh.do_zbufclip) ? &dtxl->depth : &txl->dummy_depth_tx;

View File

@ -192,7 +192,6 @@ typedef struct View3DOverlay {
int edit_flag;
float normals_length;
float normals_constant_screen_size;
float backwire_opacity;
/** Paint mode settings. */
int paint_flag;
@ -232,7 +231,6 @@ typedef struct View3DOverlay {
/** Curves sculpt mode settings. */
float sculpt_curves_cage_opacity;
char _pad[4];
} View3DOverlay;
/** #View3DOverlay.handle_display */

View File

@ -4758,12 +4758,6 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
"Keep size of normals constant in relation to 3D view");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, nullptr);
prop = RNA_def_property(srna, "backwire_opacity", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, nullptr, "overlay.backwire_opacity");
RNA_def_property_ui_text(prop, "Backwire Opacity", "Opacity when rendering transparent wires");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, nullptr);
prop = RNA_def_property(srna, "texture_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, nullptr, "overlay.texture_paint_mode_opacity");
RNA_def_property_ui_text(