svn merge ^/trunk/blender -r42957:42967

This commit is contained in:
Campbell Barton 2011-12-29 06:44:51 +00:00
commit 6b587bc5a1
4 changed files with 16 additions and 20 deletions

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

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

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

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