code cleanup: remove $Id's that crept back in, also osl style edits
authorCampbell Barton <ideasman42@gmail.com>
Tue, 23 Oct 2012 11:47:23 +0000 (11:47 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 23 Oct 2012 11:47:23 +0000 (11:47 +0000)
13 files changed:
intern/cycles/kernel/osl/nodes/node_convert_from_normal.osl
intern/cycles/kernel/osl/nodes/node_convert_from_point.osl
intern/cycles/kernel/osl/nodes/node_convert_from_vector.osl
intern/cycles/kernel/osl/nodes/node_image_texture.osl
intern/cycles/kernel/osl/nodes/node_light_falloff.osl
source/blender/bmesh/CMakeLists.txt
source/blender/compositor/CMakeLists.txt
source/blender/modifiers/intern/MOD_decimate.c
source/blender/nodes/composite/nodes/node_composite_boxmask.c
source/blender/nodes/composite/nodes/node_composite_ellipsemask.c
source/blender/opencl/CMakeLists.txt
source/gameengine/Ketsji/KX_PythonMain.cpp
source/gameengine/Ketsji/KX_PythonMain.h

index 419e93e1518cc94b1599026f2c2d45a5a6a908f4..32ef430d93b504ca9b1ff3df93013bc643dff146 100644 (file)
@@ -27,7 +27,7 @@ shader node_convert_from_normal(
        output point Point = point(0.0, 0.0, 0.0))
 {
        Val = (Normal[0] + Normal[1] + Normal[2]) * (1.0 / 3.0);
-       ValInt = (int)((Normal[0] + Normal[1] + Normal[2])*(1.0/3.0));
+       ValInt = (int)((Normal[0] + Normal[1] + Normal[2]) * (1.0 / 3.0));
        Vector = vector(Normal[0], Normal[1], Normal[2]);
        Color = color(Normal[0], Normal[1], Normal[2]);
        Point = point(Normal[0], Normal[1], Normal[2]);
index cedd200f0887be27c2d0f5483e531c5bee152285..a9435c8abf46591c180a202c0bff7ab3dc286e31 100644 (file)
@@ -27,7 +27,7 @@ shader node_convert_from_point(
        output normal Normal = normal(0.0, 0.0, 0.0))
 {
        Val = (Point[0] + Point[1] + Point[2]) * (1.0 / 3.0);
-       ValInt = (int)((Normal[0] + Normal[1] + Normal[2])*(1.0/3.0));
+       ValInt = (int)((Normal[0] + Normal[1] + Normal[2]) * (1.0 / 3.0));
        Vector = vector(Point[0], Point[1], Point[2]);
        Color = color(Point[0], Point[1], Point[2]);
        Normal = normal(Point[0], Point[1], Point[2]);
index a9f43a40074e1f8fc035d886ad0508e6ed7b107c..4516f92c7533836d07a252a5d9aa1a2de215f936 100644 (file)
@@ -27,7 +27,7 @@ shader node_convert_from_vector(
        output normal Normal = normal(0.0, 0.0, 0.0))
 {
        Val = (Vector[0] + Vector[1] + Vector[2]) * (1.0 / 3.0);
-       ValInt = (int)((Normal[0] + Normal[1] + Normal[2])*(1.0/3.0));
+       ValInt = (int)((Normal[0] + Normal[1] + Normal[2]) * (1.0 / 3.0));
        Color = color(Vector[0], Vector[1], Vector[2]);
        Point = point(Vector[0], Vector[1], Vector[2]);
        Normal = normal(Vector[0], Vector[1], Vector[2]);
index 2ca7e682a3591b9b0845df7688de9eab3c10f0da..6393605e6b57bdddc21fbe0031534441661c2c5a 100644 (file)
@@ -23,7 +23,7 @@ color image_texture_lookup(string filename, string color_space, float u, float v
 {
        color rgb = (color)texture(filename, u, 1.0 - v, "wrap", "periodic", "alpha", Alpha);
 
-       if(color_space == "sRGB")
+       if (color_space == "sRGB")
                rgb = color_srgb_to_scene_linear(rgb);
 
        return rgb;
@@ -38,10 +38,10 @@ shader node_image_texture(
        output color Color = color(0.0, 0.0, 0.0),
        output float Alpha = 1.0)
 {
-       if(projection == "Flat") {
+       if (projection == "Flat") {
                Color = image_texture_lookup(filename, color_space, Vector[0], Vector[1], Alpha);
        }
-       else if(projection == "Box") {
+       else if (projection == "Box") {
                /* object space normal */
                vector Nob = transform("world", "object", N);
 
@@ -57,44 +57,44 @@ shader node_image_texture(
                 * the Nxyz values are the barycentric coordinates in an equilateral
                 * triangle, which in case of blending, in the middle has a smaller
                 * equilateral triangle where 3 textures blend. this divides things into
-                * 7 zones, with an if() test for each zone */
+                * 7 zones, with an if () test for each zone */
 
                vector weight = vector(0.0, 0.0, 0.0);
                float blend = projection_blend;
                float limit = 0.5*(1.0 + blend);
 
                /* first test for corners with single texture */
-               if(Nob[0] > limit*(Nob[0] + Nob[1]) && Nob[0] > limit*(Nob[0] + Nob[2])) {
+               if (Nob[0] > limit*(Nob[0] + Nob[1]) && Nob[0] > limit*(Nob[0] + Nob[2])) {
                        weight[0] = 1.0;
                }
-               else if(Nob[1] > limit*(Nob[0] + Nob[1]) && Nob[1] > limit*(Nob[1] + Nob[2])) {
+               else if (Nob[1] > limit*(Nob[0] + Nob[1]) && Nob[1] > limit*(Nob[1] + Nob[2])) {
                        weight[1] = 1.0;
                }
-               else if(Nob[2] > limit*(Nob[0] + Nob[2]) && Nob[2] > limit*(Nob[1] + Nob[2])) {
+               else if (Nob[2] > limit*(Nob[0] + Nob[2]) && Nob[2] > limit*(Nob[1] + Nob[2])) {
                        weight[2] = 1.0;
                }
-               else if(blend > 0.0) {
+               else if (blend > 0.0) {
                        /* in case of blending, test for mixes between two textures */
-                       if(Nob[2] < (1.0 - limit)*(Nob[1] + Nob[0])) {
-                               weight[0] = Nob[0]/(Nob[0] + Nob[1]);
-                               weight[0] = clamp((weight[0] - 0.5*(1.0 - blend))/blend, 0.0, 1.0);
+                       if (Nob[2] < (1.0 - limit)*(Nob[1] + Nob[0])) {
+                               weight[0] = Nob[0] / (Nob[0] + Nob[1]);
+                               weight[0] = clamp((weight[0] - 0.5 * (1.0 - blend)) / blend, 0.0, 1.0);
                                weight[1] = 1.0 - weight[0];
                        }
-                       else if(Nob[0] < (1.0 - limit)*(Nob[1] + Nob[2])) {
-                               weight[1] = Nob[1]/(Nob[1] + Nob[2]);
-                               weight[1] = clamp((weight[1] - 0.5*(1.0 - blend))/blend, 0.0, 1.0);
+                       else if (Nob[0] < (1.0 - limit)*(Nob[1] + Nob[2])) {
+                               weight[1] = Nob[1] / (Nob[1] + Nob[2]);
+                               weight[1] = clamp((weight[1] - 0.5 * (1.0 - blend)) / blend, 0.0, 1.0);
                                weight[2] = 1.0 - weight[1];
                        }
-                       else if(Nob[1] < (1.0 - limit)*(Nob[0] + Nob[2])) {
-                               weight[0] = Nob[0]/(Nob[0] + Nob[2]);
-                               weight[0] = clamp((weight[0] - 0.5*(1.0 - blend))/blend, 0.0, 1.0);
+                       else if (Nob[1] < (1.0 - limit) * (Nob[0] + Nob[2])) {
+                               weight[0] = Nob[0] / (Nob[0] + Nob[2]);
+                               weight[0] = clamp((weight[0] - 0.5 * (1.0 - blend)) / blend, 0.0, 1.0);
                                weight[2] = 1.0 - weight[0];
                        }
                        else {
                                /* last case, we have a mix between three */
-                               weight[0] = ((2.0 - limit)*Nob[0] + (limit - 1.0))/(2.0*limit - 1.0);
-                               weight[1] = ((2.0 - limit)*Nob[1] + (limit - 1.0))/(2.0*limit - 1.0);
-                               weight[2] = ((2.0 - limit)*Nob[2] + (limit - 1.0))/(2.0*limit - 1.0);
+                               weight[0] = ((2.0 - limit) * Nob[0] + (limit - 1.0)) / (2.0 * limit - 1.0);
+                               weight[1] = ((2.0 - limit) * Nob[1] + (limit - 1.0)) / (2.0 * limit - 1.0);
+                               weight[2] = ((2.0 - limit) * Nob[2] + (limit - 1.0)) / (2.0 * limit - 1.0);
                        }
                }
 
@@ -103,15 +103,15 @@ shader node_image_texture(
 
                float tmp_alpha;
 
-               if(weight[0] > 0.0) {
+               if (weight[0] > 0.0) {
                        Color += weight[0]*image_texture_lookup(filename, color_space, Vector[1], Vector[2], tmp_alpha);
                        Alpha += weight[0]*tmp_alpha;
                }
-               if(weight[1] > 0.0) {
+               if (weight[1] > 0.0) {
                        Color += weight[1]*image_texture_lookup(filename, color_space, Vector[0], Vector[2], tmp_alpha);
                        Alpha += weight[1]*tmp_alpha;
                }
-               if(weight[2] > 0.0) {
+               if (weight[2] > 0.0) {
                        Color += weight[2]*image_texture_lookup(filename, color_space, Vector[1], Vector[0], tmp_alpha);
                        Alpha += weight[2]*tmp_alpha;
                }
index fd68594a1d85e38d77592fa050a038a6c07ca7b8..3877b6d5bdc2167451685418c44ccbe67f6f1817 100644 (file)
@@ -29,9 +29,9 @@ shader node_light_falloff(
        float strength = Strength;
        getattribute("std::ray_length", ray_length);
 
-       if(Smooth > 0.0) {
+       if (Smooth > 0.0) {
                float squared = ray_length*ray_length;
-               strength *= squared/(Smooth + squared);
+               strength *= squared / (Smooth + squared);
        }
 
        /* Quadratic */ 
index 8b0e616515f72e9c0696fc30147d1deb8f8ba793..3c329b1dce4b1bd3351c9c31f9f445b7f813d030 100644 (file)
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 31746 2010-09-04 05:31:25Z joeedh $
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
 # This program is free software; you can redistribute it and/or
index 9932ed17378941a9404808f834202a4660daa98b..fcd710b9b13d454a4856e6df7e0e5c6b1710d0cb 100644 (file)
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 14444 2008-04-16 22:40:48Z hos $
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
 # This program is free software; you can redistribute it and/or
index cf409c27b2f8528f17929a7b940a1f8843cb28aa..75bea93910736df9417b40bc0ef12453aee0a217 100644 (file)
@@ -195,6 +195,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
         TIMEIT_END(decim);
 #endif
 
+        CDDM_calc_normals(result);
+
        return result;
 }
 
index 0f82fdb481a9f6e4ec92b697805139bea83786ce..d3c6b2ccef047e11a267aac9e5516c329166ef5a 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id: CMP_math.c 36271 2011-04-21 13:11:51Z campbellbarton $
- *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
index 5e7bd26d34a42a622fb5ccfe11431a4bdae9f270..761b0b13f114c6f7fbfcbf12065941fdc2d3146e 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id: CMP_math.c 36271 2011-04-21 13:11:51Z campbellbarton $
- *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
index 20dcf33d3632de146db149232470d2934d295213..b3c76db1bcaa0ed9a3c04b5039aa2b3896360e06 100644 (file)
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 14444 2008-04-16 22:40:48Z hos $
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
 # This program is free software; you can redistribute it and/or
index d926dff0bf58acb8fcd7253682755ed6a2bb38c5..740bb102fd95349ae2f26aeb879347ff2cc97565 100644 (file)
@@ -1,6 +1,4 @@
-/* 
- * $Id: KX_PythonMain.cpp 37750 2011-06-27 09:27:56Z sjoerd $
- *
+/*
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
+ * Contributor(s): Benoit Bolsee
  *
  * ***** END GPL LICENSE BLOCK *****
  */
+
 /** \file gameengine/Ketsji/KX_PythonMain.cpp
  *  \ingroup ketsji
  */
index 1460ea2ca962f06d3195f0bf52c7f355487a23b9..e638fa9094e9020274a5ca8bff1476897c446ba0 100644 (file)
@@ -1,6 +1,4 @@
-/* 
- * $Id: KX_PythonMain.h 37750 2011-06-27 09:27:56Z sjoerd $
- *
+/*
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
  *  \ingroup ketsji
  */
 
-#ifndef __KX_PYTHON_MAIN
-#define __KX_PYTHON_MAIN
+#ifndef __KX_PYTHON_MAIN__
+#define __KX_PYTHON_MAIN__
 
 #include "BKE_main.h"
 #include "DNA_scene_types.h"
 extern "C" char *KX_GetPythonMain(struct Scene* scene);
 extern "C" char *KX_GetPythonCode(struct Main *main, char *python_main);
-#endif
+
+#endif  /* __KX_PYTHON_MAIN__ */