[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52409] trunk/blender: code cleanup: comment unused members of bmesh operator slots and some osl style edits.
Campbell Barton
ideasman42 at gmail.com
Tue Nov 20 15:32:03 CET 2012
Revision: 52409
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52409
Author: campbellbarton
Date: 2012-11-20 14:31:58 +0000 (Tue, 20 Nov 2012)
Log Message:
-----------
code cleanup: comment unused members of bmesh operator slots and some osl style edits.
Modified Paths:
--------------
trunk/blender/GNUmakefile
trunk/blender/intern/cycles/kernel/shaders/node_sky_texture.osl
trunk/blender/intern/cycles/kernel/shaders/node_ward_bsdf.osl
trunk/blender/source/blender/bmesh/intern/bmesh_operator_api.h
trunk/blender/source/blender/bmesh/intern/bmesh_operators.c
Modified: trunk/blender/GNUmakefile
===================================================================
--- trunk/blender/GNUmakefile 2012-11-20 14:18:56 UTC (rev 52408)
+++ trunk/blender/GNUmakefile 2012-11-20 14:31:58 UTC (rev 52409)
@@ -241,13 +241,13 @@
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 @@
$(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
Modified: trunk/blender/intern/cycles/kernel/shaders/node_sky_texture.osl
===================================================================
--- trunk/blender/intern/cycles/kernel/shaders/node_sky_texture.osl 2012-11-20 14:18:56 UTC (rev 52408)
+++ trunk/blender/intern/cycles/kernel/shaders/node_sky_texture.osl 2012-11-20 14:31:58 UTC (rev 52409)
@@ -43,9 +43,9 @@
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)
Modified: trunk/blender/intern/cycles/kernel/shaders/node_ward_bsdf.osl
===================================================================
--- trunk/blender/intern/cycles/kernel/shaders/node_ward_bsdf.osl 2012-11-20 14:18:56 UTC (rev 52408)
+++ trunk/blender/intern/cycles/kernel/shaders/node_ward_bsdf.osl 2012-11-20 14:31:58 UTC (rev 52409)
@@ -30,20 +30,20 @@
/* 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);
Modified: trunk/blender/source/blender/bmesh/intern/bmesh_operator_api.h
===================================================================
--- trunk/blender/source/blender/bmesh/intern/bmesh_operator_api.h 2012-11-20 14:18:56 UTC (rev 52408)
+++ trunk/blender/source/blender/bmesh/intern/bmesh_operator_api.h 2012-11-20 14:31:58 UTC (rev 52409)
@@ -119,8 +119,8 @@
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;
Modified: trunk/blender/source/blender/bmesh/intern/bmesh_operators.c
===================================================================
--- trunk/blender/source/blender/bmesh/intern/bmesh_operators.c 2012-11-20 14:18:56 UTC (rev 52408)
+++ trunk/blender/source/blender/bmesh/intern/bmesh_operators.c 2012-11-20 14:31:58 UTC (rev 52409)
@@ -133,7 +133,7 @@
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
}
}
More information about the Bf-blender-cvs
mailing list