diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-30 16:32:08 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-30 16:33:05 +0300 |
commit | 375c1eab65ddf0a96097a168950f5c8b3ec9e2e3 (patch) | |
tree | 8fa740468b792f17f6757d8a997005781459ee95 | |
parent | d0d2fc981952a3fd132058da6f93ccb9fc2c8195 (diff) |
Cleanup: RNA naming, use highlight as suffux
This is whats done already elsewhere.
7 files changed, 12 insertions, 12 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index c2a1037de32..05714921b7a 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3528,7 +3528,7 @@ class VIEW3D_PT_shading(Panel): col.row().prop(shading, "studiolight_rot_z") row = col.row() - row.prop(shading, "show_specular_highlights") + row.prop(shading, "show_specular_highlight") col.separator() diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index a4b5f53e0eb..5ec12aace28 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1505,7 +1505,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main) for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; - v3d->shading.flag |= V3D_SHADING_SPECULAR_HIGHLIGHTS; + v3d->shading.flag |= V3D_SHADING_SPECULAR_HIGHLIGHT; } } } diff --git a/source/blender/draw/engines/workbench/shaders/workbench_world_light_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_world_light_lib.glsl index 7e476080b64..6a64feb93de 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_world_light_lib.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_world_light_lib.glsl @@ -22,15 +22,15 @@ vec3 get_camera_diffuse_light(WorldData world_data, vec3 N) /* N And I are in View Space. */ vec3 get_world_specular_light(WorldData world_data, vec3 N, vec3 I) { -#ifdef V3D_SHADING_SPECULAR_HIGHLIGHTS +#ifdef V3D_SHADING_SPECULAR_HIGHLIGHT vec3 reflection_vector = reflect(I, N); vec3 specular_light = vec3(1.0); /* Simple frontal specular highlights. */ float specular_influence = pow(max(0.0, dot(world_data.light_direction_vs.xyz, reflection_vector)), world_data.specular_sharpness); vec3 specular_color = specular_light * specular_influence; -#else /* V3D_SHADING_SPECULAR_HIGHLIGHTS */ +#else /* V3D_SHADING_SPECULAR_HIGHLIGHT */ vec3 specular_color = vec3(0.0); -#endif /* V3D_SHADING_SPECULAR_HIGHLIGHTS */ +#endif /* V3D_SHADING_SPECULAR_HIGHLIGHT */ return specular_color; } diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c index 2dffafbe409..785a01c7621 100644 --- a/source/blender/draw/engines/workbench/workbench_materials.c +++ b/source/blender/draw/engines/workbench/workbench_materials.c @@ -52,8 +52,8 @@ char *workbench_material_build_defines(WORKBENCH_PrivateData *wpd, int drawtype) if (wpd->shading.flag & V3D_SHADING_SHADOW) { BLI_dynstr_appendf(ds, "#define V3D_SHADING_SHADOW\n"); } - if (wpd->shading.flag & V3D_SHADING_SPECULAR_HIGHLIGHTS) { - BLI_dynstr_appendf(ds, "#define V3D_SHADING_SPECULAR_HIGHLIGHTS\n"); + if (wpd->shading.flag & V3D_SHADING_SPECULAR_HIGHLIGHT) { + BLI_dynstr_appendf(ds, "#define V3D_SHADING_SPECULAR_HIGHLIGHT\n"); } if (wpd->shading.light & V3D_LIGHTING_STUDIO) { BLI_dynstr_appendf(ds, "#define V3D_LIGHTING_STUDIO\n"); @@ -110,7 +110,7 @@ uint workbench_material_get_hash(WORKBENCH_MaterialData *material_template) int workbench_material_get_shader_index(WORKBENCH_PrivateData *wpd, int drawtype) { - const int DRAWOPTIONS_MASK = V3D_SHADING_OBJECT_OUTLINE | V3D_SHADING_SHADOW | V3D_SHADING_SPECULAR_HIGHLIGHTS; + const int DRAWOPTIONS_MASK = V3D_SHADING_OBJECT_OUTLINE | V3D_SHADING_SHADOW | V3D_SHADING_SPECULAR_HIGHLIGHT; int index = (wpd->shading.flag & DRAWOPTIONS_MASK); index = (index << 2) + wpd->shading.light; index = (index << 2); diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index eec9e310e4c..10c8eb61526 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -323,7 +323,7 @@ static SpaceLink *view3d_new(const ScrArea *UNUSED(sa), const Scene *scene) v3d->gridlines = 16; v3d->gridsubdiv = 10; v3d->drawtype = OB_SOLID; - v3d->shading.flag = V3D_SHADING_SPECULAR_HIGHLIGHTS; + v3d->shading.flag = V3D_SHADING_SPECULAR_HIGHLIGHT; v3d->shading.light = V3D_LIGHTING_STUDIO; v3d->shading.shadow_intensity = 0.5; copy_v3_fl(v3d->shading.single_color, 0.8f); diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index a458d053813..053509cbc03 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -341,7 +341,7 @@ enum { V3D_SHADING_XRAY = (1 << 1), V3D_SHADING_SHADOW = (1 << 2), V3D_SHADING_SCENE_LIGHT = (1 << 3), - V3D_SHADING_SPECULAR_HIGHLIGHTS = (1 << 4), + V3D_SHADING_SPECULAR_HIGHLIGHT = (1 << 4), }; /* View3DShading->single_color_type */ diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index c1096626abb..a8d32bbf6c2 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2342,8 +2342,8 @@ static void rna_def_space_view3d_shading(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Scene Light", "Render lamps and light probes of the scene"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - prop = RNA_def_property(srna, "show_specular_highlights", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "shading.flag", V3D_SHADING_SPECULAR_HIGHLIGHTS); + prop = RNA_def_property(srna, "show_specular_highlight", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "shading.flag", V3D_SHADING_SPECULAR_HIGHLIGHT); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Specular Highlights", "Render specular highlights"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); |