code cleanup: comment unused members of bmesh operator slots and some osl style edits.
authorCampbell Barton <ideasman42@gmail.com>
Tue, 20 Nov 2012 14:31:58 +0000 (14:31 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 20 Nov 2012 14:31:58 +0000 (14:31 +0000)
GNUmakefile
intern/cycles/kernel/shaders/node_sky_texture.osl
intern/cycles/kernel/shaders/node_ward_bsdf.osl
source/blender/bmesh/intern/bmesh_operator_api.h
source/blender/bmesh/intern/bmesh_operators.c

index 8876b1d..c1b67c8 100644 (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
index 932fb1e..98986ba 100644 (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)
index e5c6f0a..82ce15a 100644 (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);
index 1bff79b..b87e023 100644 (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;
index 2566d6b..54035b4 100644 (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
        }
 }