code cleanup: comment unused members of bmesh operator slots and some osl style edits.

This commit is contained in:
Campbell Barton 2012-11-20 14:31:58 +00:00
parent f92359cc29
commit 68e9fdeb81
5 changed files with 15 additions and 15 deletions

View File

@ -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

View File

@ -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)

View File

@ -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);

View File

@ -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;

View File

@ -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
}
}