diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-25 13:02:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-25 13:06:51 +0300 |
commit | 29c106924408a508b2f37af9e09d9eb46adc6fad (patch) | |
tree | 1858cfeb59d259a434da39848ee130ae8aa63627 /source/blender/draw | |
parent | 7a4d5b78ea061196f7bf1550928680e9f094e38b (diff) |
Cleanup: code style
Diffstat (limited to 'source/blender/draw')
3 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_deferred.c b/source/blender/draw/engines/workbench/workbench_deferred.c index 39a4197bdf3..4fe3e92f10c 100644 --- a/source/blender/draw/engines/workbench/workbench_deferred.c +++ b/source/blender/draw/engines/workbench/workbench_deferred.c @@ -584,8 +584,7 @@ static WORKBENCH_MaterialData *get_or_create_material_data( copy_v4_v4(material->material_data.diffuse_color, material_template.material_data.diffuse_color); copy_v4_v4(material->material_data.specular_color, material_template.material_data.specular_color); material->material_data.roughness = material_template.material_data.roughness; - if (color_type == V3D_SHADING_TEXTURE_COLOR) - { + if (color_type == V3D_SHADING_TEXTURE_COLOR) { GPUTexture *tex = GPU_texture_from_blender(ima, NULL, GL_TEXTURE_2D, false, 0.0); DRW_shgroup_uniform_texture(material->shgrp, "image", tex); } diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c index 47fcaa0ca66..9f23cd5b43b 100644 --- a/source/blender/draw/engines/workbench/workbench_forward.c +++ b/source/blender/draw/engines/workbench/workbench_forward.c @@ -179,8 +179,7 @@ static WORKBENCH_MaterialData *get_or_create_material_data( copy_v4_v4(material->material_data.specular_color, material_template.material_data.specular_color); material->material_data.roughness = material_template.material_data.roughness; - if (color_type == V3D_SHADING_TEXTURE_COLOR) - { + if (color_type == V3D_SHADING_TEXTURE_COLOR) { GPUTexture *tex = GPU_texture_from_blender(ima, NULL, GL_TEXTURE_2D, false, 0.0f); DRW_shgroup_uniform_texture(grp, "image", tex); } diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c index a8c677b4070..76599fdce99 100644 --- a/source/blender/draw/engines/workbench/workbench_materials.c +++ b/source/blender/draw/engines/workbench/workbench_materials.c @@ -10,7 +10,7 @@ void workbench_material_update_data(WORKBENCH_PrivateData *wpd, Object *ob, Material *mat, WORKBENCH_MaterialData *data) { /* When V3D_SHADING_TEXTURE_COLOR is active, use V3D_SHADING_MATERIAL_COLOR as fallback when no texture could be determined */ - int color_type = wpd->shading.color_type == V3D_SHADING_TEXTURE_COLOR? V3D_SHADING_MATERIAL_COLOR: wpd->shading.color_type; + int color_type = wpd->shading.color_type == V3D_SHADING_TEXTURE_COLOR ? V3D_SHADING_MATERIAL_COLOR : wpd->shading.color_type; static float default_diffuse_color[] = {0.8f, 0.8f, 0.8f, 1.0f}; static float default_specular_color[] = {0.5f, 0.5f, 0.5f, 0.5f}; copy_v4_v4(data->material_data.diffuse_color, default_diffuse_color); @@ -169,8 +169,7 @@ void workbench_material_set_normal_world_matrix( int workbench_material_determine_color_type(WORKBENCH_PrivateData *wpd, Image *ima) { int color_type = wpd->shading.color_type; - if (color_type == V3D_SHADING_TEXTURE_COLOR && ima == NULL) - { + if (color_type == V3D_SHADING_TEXTURE_COLOR && ima == NULL) { color_type = V3D_SHADING_MATERIAL_COLOR; } return color_type; |