diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-05-15 18:03:59 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-05-15 18:03:59 +0300 |
commit | 87cd4de3babdfcf3e7de43a4d8a6dc113f5fe3cc (patch) | |
tree | eb8ba6698b865ff91acce86c9e8c2238f8a555a4 | |
parent | a95d417db0fe4ff18e22e833951a08805c7a91e7 (diff) |
Workbench: Renamed Overlap to Outline
Outline is reserved for the Overlap Overlay
6 files changed, 16 insertions, 16 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index b7ab57d0f46..f053a326ef1 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3519,7 +3519,7 @@ class VIEW3D_PT_shading(Panel): sub.active = shading.show_shadows sub.prop(shading, "shadow_intensity", text="") - col.prop(shading, "show_object_overlap") + col.prop(shading, "show_object_outline") class VIEW3D_PT_overlay(Panel): diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 39cd4426618..4668241d9dd 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -928,7 +928,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main) if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->shading.light = V3D_LIGHTING_STUDIO; - v3d->shading.flag |= V3D_SHADING_OBJECT_OVERLAP; + v3d->shading.flag |= V3D_SHADING_OBJECT_OUTLINE; /* Assume (demo) files written with 2.8 want to show * Eevee renders in the viewport. */ diff --git a/source/blender/draw/engines/workbench/shaders/workbench_composite_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_composite_frag.glsl index 09bdffe3299..fc5c085999c 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_composite_frag.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_composite_frag.glsl @@ -22,12 +22,12 @@ void main() vec2 uv_viewport = gl_FragCoord.xy * invertedViewportSize; uint object_id = texelFetch(objectId, texel, 0).r; -#ifndef V3D_SHADING_OBJECT_OVERLAP +#ifndef V3D_SHADING_OBJECT_OUTLINE if (object_id == NO_OBJECT_ID) { fragColor = vec4(background_color(world_data, uv_viewport.y), 0.0); return; } -#else /* !V3D_SHADING_OBJECT_OVERLAP */ +#else /* !V3D_SHADING_OBJECT_OUTLINE */ float object_overlap = calculate_object_overlap(objectId, texel, object_id); if (object_id == NO_OBJECT_ID) { @@ -40,7 +40,7 @@ void main() } return; } -#endif /* !V3D_SHADING_OBJECT_OVERLAP */ +#endif /* !V3D_SHADING_OBJECT_OUTLINE */ vec4 diffuse_color = texelFetch(colorBuffer, texel, 0); /* Do we need normals */ @@ -76,8 +76,8 @@ void main() shaded_color *= light_multiplier; -#ifdef V3D_SHADING_OBJECT_OVERLAP +#ifdef V3D_SHADING_OBJECT_OUTLINE shaded_color = mix(objectOverlapColor, shaded_color, object_overlap); -#endif /* V3D_SHADING_OBJECT_OVERLAP */ +#endif /* V3D_SHADING_OBJECT_OUTLINE */ fragColor = vec4(shaded_color, 1.0); } diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c index 0f21b76b4d2..553f4801d19 100644 --- a/source/blender/draw/engines/workbench/workbench_materials.c +++ b/source/blender/draw/engines/workbench/workbench_materials.c @@ -82,7 +82,7 @@ extern char datatoc_workbench_world_light_lib_glsl[]; extern DrawEngineType draw_engine_workbench_solid; -#define OBJECT_ID_PASS_ENABLED(wpd) (wpd->shading.flag & V3D_SHADING_OBJECT_OVERLAP) +#define OBJECT_ID_PASS_ENABLED(wpd) (wpd->shading.flag & V3D_SHADING_OBJECT_OUTLINE) #define NORMAL_VIEWPORT_PASS_ENABLED(wpd) (wpd->shading.light & V3D_LIGHTING_STUDIO || wpd->shading.flag & V3D_SHADING_SHADOW) #define SHADOW_ENABLED(wpd) (wpd->shading.flag & V3D_SHADING_SHADOW) #define NORMAL_ENCODING_ENABLED() (true) @@ -95,8 +95,8 @@ static char *workbench_build_defines(WORKBENCH_PrivateData *wpd, int drawtype) DynStr *ds = BLI_dynstr_new(); - if (wpd->shading.flag & V3D_SHADING_OBJECT_OVERLAP) { - BLI_dynstr_appendf(ds, "#define V3D_SHADING_OBJECT_OVERLAP\n"); + if (wpd->shading.flag & V3D_SHADING_OBJECT_OUTLINE) { + BLI_dynstr_appendf(ds, "#define V3D_SHADING_OBJECT_OUTLINE\n"); } if (wpd->shading.flag & V3D_SHADING_SHADOW) { BLI_dynstr_appendf(ds, "#define V3D_SHADING_SHADOW\n"); @@ -138,7 +138,7 @@ static char *workbench_build_composite_frag(WORKBENCH_PrivateData *wpd) if (wpd->shading.light & V3D_LIGHTING_STUDIO) { BLI_dynstr_append(ds, datatoc_workbench_world_light_lib_glsl); } - if (wpd->shading.flag & V3D_SHADING_OBJECT_OVERLAP) { + if (wpd->shading.flag & V3D_SHADING_OBJECT_OUTLINE) { BLI_dynstr_append(ds, datatoc_workbench_object_overlap_lib_glsl); } @@ -165,7 +165,7 @@ static char *workbench_build_prepass_frag(void) static int get_shader_index(WORKBENCH_PrivateData *wpd, int drawtype) { - const int DRAWOPTIONS_MASK = V3D_SHADING_OBJECT_OVERLAP | V3D_SHADING_SHADOW; + const int DRAWOPTIONS_MASK = V3D_SHADING_OBJECT_OUTLINE | V3D_SHADING_SHADOW; int index = (wpd->shading.flag & DRAWOPTIONS_MASK); index = (index << 2) + wpd->shading.light; /* set the drawtype flag diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 5758b18c364..5c54da89f53 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -331,7 +331,7 @@ enum { /* View3DShading->flag */ enum { - V3D_SHADING_OBJECT_OVERLAP = (1 << 0), + V3D_SHADING_OBJECT_OUTLINE = (1 << 0), V3D_SHADING_SHADOW = (1 << 2), }; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index e8ab86c51a3..ba77c94085e 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2203,10 +2203,10 @@ static void rna_def_space_view3d_shading(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Lighting", "Lighting Method for Solid/Texture Viewport Shading"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - prop = RNA_def_property(srna, "show_object_overlap", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "shading.flag", V3D_SHADING_OBJECT_OVERLAP); + prop = RNA_def_property(srna, "show_object_outline", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "shading.flag", V3D_SHADING_OBJECT_OUTLINE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_ui_text(prop, "Object Overlap", "Show Object Overlap"); + RNA_def_property_ui_text(prop, "Object Outline", "Show Object Outline"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "studio_light", PROP_ENUM, PROP_NONE); |