Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-22 02:32:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-22 12:48:17 +0300
commit14a49950ff11f43b7a5a73da545339b969de97f0 (patch)
treeb935489e6d39db98ecac8784d327ab9c451c8d01 /source/blender/gpu/intern/gpu_material.c
parent620b960d3d8cfd90b9f0df6ba3671c33eccb8309 (diff)
Cleanup: style, use braces for gpu
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r--source/blender/gpu/intern/gpu_material.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index cae60351bd5..1a668a48eed 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -163,8 +163,9 @@ GPUTexture **gpu_material_ramp_texture_row_set(GPUMaterial *mat,
static void gpu_material_ramp_texture_build(GPUMaterial *mat)
{
- if (mat->coba_builder == NULL)
+ if (mat->coba_builder == NULL) {
return;
+ }
GPUColorBandBuilder *builder = mat->coba_builder;
@@ -523,8 +524,9 @@ struct GPUUniformBuffer *GPU_material_sss_profile_get(GPUMaterial *material,
int sample_len,
GPUTexture **tex_profile)
{
- if (!material->sss_enabled)
+ if (!material->sss_enabled) {
return NULL;
+ }
if (material->sss_dirty || (material->sss_samples != sample_len)) {
GPUSssKernelData kd;
@@ -577,8 +579,9 @@ void GPU_material_vertex_attrs(GPUMaterial *material, GPUVertAttrLayers *r_attrs
void GPU_material_output_link(GPUMaterial *material, GPUNodeLink *link)
{
- if (!material->outlink)
+ if (!material->outlink) {
material->outlink = link;
+ }
}
void gpu_material_add_node(GPUMaterial *material, GPUNode *node)
@@ -596,8 +599,9 @@ eGPUMaterialStatus GPU_material_status(GPUMaterial *mat)
bool GPU_material_do_color_management(GPUMaterial *mat)
{
- if (!BKE_scene_check_color_management_enabled(mat->scene))
+ if (!BKE_scene_check_color_management_enabled(mat->scene)) {
return false;
+ }
return true;
}
@@ -768,11 +772,13 @@ void GPU_materials_free(Main *bmain)
World *wo;
extern Material defmaterial;
- for (ma = bmain->materials.first; ma; ma = ma->id.next)
+ for (ma = bmain->materials.first; ma; ma = ma->id.next) {
GPU_material_free(&ma->gpumaterial);
+ }
- for (wo = bmain->worlds.first; wo; wo = wo->id.next)
+ for (wo = bmain->worlds.first; wo; wo = wo->id.next) {
GPU_material_free(&wo->gpumaterial);
+ }
GPU_material_free(&defmaterial.gpumaterial);
}