svn merge ^/trunk/blender -r42957:42967
authorCampbell Barton <ideasman42@gmail.com>
Thu, 29 Dec 2011 06:44:51 +0000 (06:44 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 29 Dec 2011 06:44:51 +0000 (06:44 +0000)
build_files/scons/config/win32-mingw-config.py
intern/cycles/kernel/osl/nodes/node_hsv.osl
intern/cycles/kernel/svm/svm_hsv.h
source/blender/modifiers/intern/MOD_mirror.c

index d9fafbda5b04d3e9cc0c9894683402a4a3392a80..e4f8827b7c82fe63f9916226b723d2c4073589ee 100644 (file)
@@ -156,15 +156,15 @@ WITH_BF_CYCLES = True
 
 WITH_BF_OIIO = True
 BF_OIIO = LIBDIR + '/gcc/openimageio'
-BF_OIIO_INC = '#../lib/windows/gcc/openimageio/include'
+BF_OIIO_INC = BF_OIIO + '/include'
 BF_OIIO_LIB = 'OpenImageIO'
-BF_OIIO_LIBPATH = '#../lib/windows/gcc/openimageio/lib'
+BF_OIIO_LIBPATH = BF_OIIO + '/lib'
 
 WITH_BF_BOOST = True
 BF_BOOST = LIBDIR + '/boost'
-BF_BOOST_INC = '#../lib/windows/boost/include'
+BF_BOOST_INC = BF_BOOST + '/include'
 BF_BOOST_LIB = 'boost_date_time-mgw45-mt-s-1_47 boost_filesystem-mgw45-mt-s-1_47 boost_regex-mgw45-mt-s-1_47 boost_system-mgw45-mt-s-1_47 boost_thread-mgw45-mt-s-1_47'
-BF_BOOST_LIBPATH = '#../lib/windows/boost/lib/gcc'
+BF_BOOST_LIBPATH = BF_BOOST + '/lib/gcc'
 
 #Ray trace optimization
 WITH_BF_RAYOPTIMIZATION = True
index da776c8909e9efa4c650dc063512a3703b958136..8fd7a1612e88ad153fb2c8fc110e80aa5239ac51 100644 (file)
@@ -30,7 +30,8 @@ shader node_hsv(
        float t = clamp(Fac, 0.0, 1.0);
        color Color = rgb_to_hsv(ColorIn);
 
-       Color[0] += Hue - 0.5;
+       // remember: fmod doesn't work for negative numbers
+       Color[0] += Hue + 0.5;
        Color[0] = fmod(Color[0], 1.0);
        Color[1] *= Saturation;
        Color[2] *= Value;
index fc927f297f55b1b89d296824a4517ecfccf13504..ed17d3fc985ee7aa4cb6c7e1cb3d73c0b2c1ebae 100644 (file)
@@ -110,7 +110,8 @@ __device void svm_node_hsv(KernelGlobals *kg, ShaderData *sd, float *stack, uint
 
        color = rgb_to_hsv(color);
 
-       color.x += hue - 0.5f;
+       // remember: fmod doesn't work for negative numbers
+       color.x += hue + 0.5f;
        color.x = fmod(color.x, 1.0f);
        color.y *= sat;
        color.z *= val;
index ea2d64adebc5008ffa5301dc911fe7fbe40308a8..30d205c198f4e68bde774a329f05884f10122add 100644 (file)
@@ -93,15 +93,10 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
        }
 }
 
-
-/* Mirror */
-#define VERT_NEW       1
-
 static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
-               Object *ob,
-               DerivedMesh *dm,
-               int UNUSED(initFlags),
-               int axis)
+                                   Object *ob,
+                                   DerivedMesh *dm,
+                                   int axis)
 {
        float tolerance_sq;
        DerivedMesh *cddm, *origdm;
@@ -266,23 +261,22 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
 }
 
 static DerivedMesh *mirrorModifier__doMirror(MirrorModifierData *mmd,
-                                               Object *ob, DerivedMesh *dm,
-                                               int initFlags)
+                                               Object *ob, DerivedMesh *dm)
 {
        DerivedMesh *result = dm;
 
        /* check which axes have been toggled and mirror accordingly */
        if(mmd->flag & MOD_MIR_AXIS_X) {
-               result = doMirrorOnAxis(mmd, ob, result, initFlags, 0);
+               result = doMirrorOnAxis(mmd, ob, result, 0);
        }
        if(mmd->flag & MOD_MIR_AXIS_Y) {
                DerivedMesh *tmp = result;
-               result = doMirrorOnAxis(mmd, ob, result, initFlags, 1);
+               result = doMirrorOnAxis(mmd, ob, result, 1);
                if(tmp != dm) tmp->release(tmp); /* free intermediate results */
        }
        if(mmd->flag & MOD_MIR_AXIS_Z) {
                DerivedMesh *tmp = result;
-               result = doMirrorOnAxis(mmd, ob, result, initFlags, 2);
+               result = doMirrorOnAxis(mmd, ob, result, 2);
                if(tmp != dm) tmp->release(tmp); /* free intermediate results */
        }
 
@@ -297,7 +291,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
        DerivedMesh *result;
        MirrorModifierData *mmd = (MirrorModifierData*) md;
 
-       result = mirrorModifier__doMirror(mmd, ob, derivedData, 0);
+       result = mirrorModifier__doMirror(mmd, ob, derivedData);
 
        if(result != derivedData)
                CDDM_calc_normals(result);