From 68e9fdeb810e1665c1415abffc43ba3e2030e88d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 20 Nov 2012 14:31:58 +0000 Subject: code cleanup: comment unused members of bmesh operator slots and some osl style edits. --- GNUmakefile | 6 +++--- intern/cycles/kernel/shaders/node_sky_texture.osl | 6 +++--- intern/cycles/kernel/shaders/node_ward_bsdf.osl | 12 ++++++------ source/blender/bmesh/intern/bmesh_operator_api.h | 4 ++-- source/blender/bmesh/intern/bmesh_operators.c | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 8876b1db33d..c1b67c86ed2 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -241,13 +241,13 @@ test_style_c_qtc: test_style_osl: # run our own checks on C/C++ style - PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/intern/cycles/kernel/osl + PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/intern/cycles/kernel/shaders test_style_osl_qtc: # run our own checks on C/C++ style USE_QTC_TASK=1 \ - PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/intern/cycles/kernel/osl > \ + PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/intern/cycles/kernel/shaders > \ test_style.tasks @echo "written: test_style.tasks" @@ -308,7 +308,7 @@ check_spelling_c_qtc: $(BLENDER_DIR)/check_spelling_c.tasks check_spelling_osl: - cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/intern/cycles/kernel/osl + cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/intern/cycles/kernel/shaders # ----------------------------------------------------------------------------- # Utilities diff --git a/intern/cycles/kernel/shaders/node_sky_texture.osl b/intern/cycles/kernel/shaders/node_sky_texture.osl index 932fb1e2f17..98986ba1d65 100644 --- a/intern/cycles/kernel/shaders/node_sky_texture.osl +++ b/intern/cycles/kernel/shaders/node_sky_texture.osl @@ -43,9 +43,9 @@ color xyY_to_xyz(float x, float y, float Y) color xyz_to_rgb(float x, float y, float z) { - return color(3.240479 * x + -1.537150 * y + -0.498535 * z, - -0.969256 * x + 1.875991 * y + 0.041556 * z, - 0.055648 * x + -0.204043 * y + 1.057311 * z); + return color( 3.240479 * x + -1.537150 * y + -0.498535 * z, + -0.969256 * x + 1.875991 * y + 0.041556 * z, + 0.055648 * x + -0.204043 * y + 1.057311 * z); } float sky_angle_between(float thetav, float phiv, float theta, float phi) diff --git a/intern/cycles/kernel/shaders/node_ward_bsdf.osl b/intern/cycles/kernel/shaders/node_ward_bsdf.osl index e5c6f0ad705..82ce15ab9b6 100644 --- a/intern/cycles/kernel/shaders/node_ward_bsdf.osl +++ b/intern/cycles/kernel/shaders/node_ward_bsdf.osl @@ -30,20 +30,20 @@ shader node_ward_bsdf( /* rotate tangent around normal */ vector T = Tangent; - if(Rotation != 0.0) + if (Rotation != 0.0) T = rotate(T, Rotation*2.0*M_PI, point(0.0, 0.0, 0.0), Normal); /* compute roughness */ float RoughnessU, RoughnessV; float aniso = clamp(Anisotropy, -0.99, 0.99); - if(aniso < 0.0) { - RoughnessU = Roughness/(1.0 + aniso); - RoughnessV = Roughness*(1.0 + aniso); + if (aniso < 0.0) { + RoughnessU = Roughness / (1.0 + aniso); + RoughnessV = Roughness * (1.0 + aniso); } else { - RoughnessU = Roughness*(1.0 - aniso); - RoughnessV = Roughness/(1.0 - aniso); + RoughnessU = Roughness * (1.0 - aniso); + RoughnessV = Roughness / (1.0 - aniso); } BSDF = Color * ward(Normal, T, RoughnessU, RoughnessV); diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h index 1bff79ba799..b87e023e63a 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api.h +++ b/source/blender/bmesh/intern/bmesh_operator_api.h @@ -119,8 +119,8 @@ typedef struct BMOpSlot { const char *slot_name; /* pointer to BMOpDefine.slot_args */ int slot_type; int len; - int flag; - int index; /* index within slot array */ +// int flag; /* UNUSED */ +// int index; /* index within slot array */ /* UNUSED */ union { int i; float f; diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index 2566d6bfa24..54035b47b57 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -133,7 +133,7 @@ static void bmo_op_slots_init(BMOSlotType *slot_types, BMOpSlot *slot_args) for (i = 0; slot_types[i].type; i++) { slot_args[i].slot_name = slot_types[i].name; slot_args[i].slot_type = slot_types[i].type; - slot_args[i].index = i; + // slot_args[i].index = i; // UNUSED } } -- cgit v1.2.3