diff options
Diffstat (limited to 'source')
21 files changed, 333 insertions, 287 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 5855cc67719..a6666bf4fae 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -1030,10 +1030,9 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = { /* 23: CD_CLOTH_ORCO */ {sizeof(float)*3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL}, /* 24: CD_RECAST */ - {sizeof(MRecast), "MRecast", 1, "Recast", NULL, NULL, NULL, NULL} + {sizeof(MRecast), "MRecast", 1, "Recast", NULL, NULL, NULL, NULL}, /* BMESH ONLY */ - , /* 25: CD_MPOLY */ {sizeof(MPoly), "MPoly", 1, "NGon Face", NULL, NULL, NULL, NULL, NULL}, /* 26: CD_MLOOP */ @@ -1070,10 +1069,9 @@ static const char *LAYERTYPENAMES[CD_NUMTYPES] = { /* 5-9 */ "CDMTFace", "CDMCol", "CDOrigIndex", "CDNormal", "CDFlags", /* 10-14 */ "CDMFloatProperty", "CDMIntProperty", "CDMStringProperty", "CDOrigSpace", "CDOrco", /* 15-19 */ "CDMTexPoly", "CDMLoopUV", "CDMloopCol", "CDTangent", "CDMDisps", - /* 20-24 */"CDPreviewMCol", "CDIDMCol", "CDTextureMCol", "CDClothOrco", "CDMRecast" + /* 20-24 */"CDPreviewMCol", "CDIDMCol", "CDTextureMCol", "CDClothOrco", "CDMRecast", /* BMESH ONLY */ - , /* 25-29 */ "CDMPoly", "CDMLoop", "CDShapeKeyIndex", "CDShapeKey", "CDBevelWeight", /* 30-32 */ "CDSubSurfCrease", "CDOrigSpaceLoop", "CDPreviewLoopCol" /* END BMESH ONLY */ diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 882d907059e..1a1ae8e949c 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -1362,8 +1362,8 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData /* now we should have in chronologiacl order k1<=k2<=t<=k3<=k4 with keytime between [0, 1]->[k2, k3] (k1 & k4 used for cardinal & bspline interpolation)*/ psys_interpolate_particle((pind->keyed || pind->cache || point_vel) ? -1 /* signal for cubic interpolation */ - : (pind->bspline ? KEY_BSPLINE : KEY_CARDINAL) - , keys, keytime, result, 1); + : (pind->bspline ? KEY_BSPLINE : KEY_CARDINAL), + keys, keytime, result, 1); /* the velocity needs to be converted back from cubic interpolation */ if (pind->keyed || pind->cache || point_vel) diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index dde7efcb4a7..d795f9bf332 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -45,158 +45,225 @@ static float noise3_perlin(float vec[3]); //static float turbulence_perlin(float *point, float lofreq, float hifreq); //static float turbulencep(float noisesize, float x, float y, float z, int nr); -#define HASHVEC(x,y,z) hashvectf+3*hash[ (hash[ (hash[(z) & 255]+(y)) & 255]+(x)) & 255] +#define HASHVEC(x, y, z) hashvectf + 3 * hash[ (hash[ (hash[(z) & 255] + (y)) & 255] + (x)) & 255] /* needed for voronoi */ -#define HASHPNT(x,y,z) hashpntf+3*hash[ (hash[ (hash[(z) & 255]+(y)) & 255]+(x)) & 255] -static float hashpntf[768] = {0.536902, 0.020915, 0.501445, 0.216316, 0.517036, 0.822466, 0.965315, -0.377313, 0.678764, 0.744545, 0.097731, 0.396357, 0.247202, 0.520897, -0.613396, 0.542124, 0.146813, 0.255489, 0.810868, 0.638641, 0.980742, -0.292316, 0.357948, 0.114382, 0.861377, 0.629634, 0.722530, 0.714103, -0.048549, 0.075668, 0.564920, 0.162026, 0.054466, 0.411738, 0.156897, -0.887657, 0.599368, 0.074249, 0.170277, 0.225799, 0.393154, 0.301348, -0.057434, 0.293849, 0.442745, 0.150002, 0.398732, 0.184582, 0.915200, -0.630984, 0.974040, 0.117228, 0.795520, 0.763238, 0.158982, 0.616211, -0.250825, 0.906539, 0.316874, 0.676205, 0.234720, 0.667673, 0.792225, -0.273671, 0.119363, 0.199131, 0.856716, 0.828554, 0.900718, 0.705960, -0.635923, 0.989433, 0.027261, 0.283507, 0.113426, 0.388115, 0.900176, -0.637741, 0.438802, 0.715490, 0.043692, 0.202640, 0.378325, 0.450325, -0.471832, 0.147803, 0.906899, 0.524178, 0.784981, 0.051483, 0.893369, -0.596895, 0.275635, 0.391483, 0.844673, 0.103061, 0.257322, 0.708390, -0.504091, 0.199517, 0.660339, 0.376071, 0.038880, 0.531293, 0.216116, -0.138672, 0.907737, 0.807994, 0.659582, 0.915264, 0.449075, 0.627128, -0.480173, 0.380942, 0.018843, 0.211808, 0.569701, 0.082294, 0.689488, -0.573060, 0.593859, 0.216080, 0.373159, 0.108117, 0.595539, 0.021768, -0.380297, 0.948125, 0.377833, 0.319699, 0.315249, 0.972805, 0.792270, -0.445396, 0.845323, 0.372186, 0.096147, 0.689405, 0.423958, 0.055675, -0.117940, 0.328456, 0.605808, 0.631768, 0.372170, 0.213723, 0.032700, -0.447257, 0.440661, 0.728488, 0.299853, 0.148599, 0.649212, 0.498381, -0.049921, 0.496112, 0.607142, 0.562595, 0.990246, 0.739659, 0.108633, -0.978156, 0.209814, 0.258436, 0.876021, 0.309260, 0.600673, 0.713597, -0.576967, 0.641402, 0.853930, 0.029173, 0.418111, 0.581593, 0.008394, -0.589904, 0.661574, 0.979326, 0.275724, 0.111109, 0.440472, 0.120839, -0.521602, 0.648308, 0.284575, 0.204501, 0.153286, 0.822444, 0.300786, -0.303906, 0.364717, 0.209038, 0.916831, 0.900245, 0.600685, 0.890002, -0.581660, 0.431154, 0.705569, 0.551250, 0.417075, 0.403749, 0.696652, -0.292652, 0.911372, 0.690922, 0.323718, 0.036773, 0.258976, 0.274265, -0.225076, 0.628965, 0.351644, 0.065158, 0.080340, 0.467271, 0.130643, -0.385914, 0.919315, 0.253821, 0.966163, 0.017439, 0.392610, 0.478792, -0.978185, 0.072691, 0.982009, 0.097987, 0.731533, 0.401233, 0.107570, -0.349587, 0.479122, 0.700598, 0.481751, 0.788429, 0.706864, 0.120086, -0.562691, 0.981797, 0.001223, 0.192120, 0.451543, 0.173092, 0.108960, -0.549594, 0.587892, 0.657534, 0.396365, 0.125153, 0.666420, 0.385823, -0.890916, 0.436729, 0.128114, 0.369598, 0.759096, 0.044677, 0.904752, -0.088052, 0.621148, 0.005047, 0.452331, 0.162032, 0.494238, 0.523349, -0.741829, 0.698450, 0.452316, 0.563487, 0.819776, 0.492160, 0.004210, -0.647158, 0.551475, 0.362995, 0.177937, 0.814722, 0.727729, 0.867126, -0.997157, 0.108149, 0.085726, 0.796024, 0.665075, 0.362462, 0.323124, -0.043718, 0.042357, 0.315030, 0.328954, 0.870845, 0.683186, 0.467922, -0.514894, 0.809971, 0.631979, 0.176571, 0.366320, 0.850621, 0.505555, -0.749551, 0.750830, 0.401714, 0.481216, 0.438393, 0.508832, 0.867971, -0.654581, 0.058204, 0.566454, 0.084124, 0.548539, 0.902690, 0.779571, -0.562058, 0.048082, 0.863109, 0.079290, 0.713559, 0.783496, 0.265266, -0.672089, 0.786939, 0.143048, 0.086196, 0.876129, 0.408708, 0.229312, -0.629995, 0.206665, 0.207308, 0.710079, 0.341704, 0.264921, 0.028748, -0.629222, 0.470173, 0.726228, 0.125243, 0.328249, 0.794187, 0.741340, -0.489895, 0.189396, 0.724654, 0.092841, 0.039809, 0.860126, 0.247701, -0.655331, 0.964121, 0.672536, 0.044522, 0.690567, 0.837238, 0.631520, -0.953734, 0.352484, 0.289026, 0.034152, 0.852575, 0.098454, 0.795529, -0.452181, 0.826159, 0.186993, 0.820725, 0.440328, 0.922137, 0.704592, -0.915437, 0.738183, 0.733461, 0.193798, 0.929213, 0.161390, 0.318547, -0.888751, 0.430968, 0.740837, 0.193544, 0.872253, 0.563074, 0.274598, -0.347805, 0.666176, 0.449831, 0.800991, 0.588727, 0.052296, 0.714761, -0.420620, 0.570325, 0.057550, 0.210888, 0.407312, 0.662848, 0.924382, -0.895958, 0.775198, 0.688605, 0.025721, 0.301913, 0.791408, 0.500602, -0.831984, 0.828509, 0.642093, 0.494174, 0.525880, 0.446365, 0.440063, -0.763114, 0.630358, 0.223943, 0.333806, 0.906033, 0.498306, 0.241278, -0.427640, 0.772683, 0.198082, 0.225379, 0.503894, 0.436599, 0.016503, -0.803725, 0.189878, 0.291095, 0.499114, 0.151573, 0.079031, 0.904618, -0.708535, 0.273900, 0.067419, 0.317124, 0.936499, 0.716511, 0.543845, -0.939909, 0.826574, 0.715090, 0.154864, 0.750150, 0.845808, 0.648108, -0.556564, 0.644757, 0.140873, 0.799167, 0.632989, 0.444245, 0.471978, -0.435910, 0.359793, 0.216241, 0.007633, 0.337236, 0.857863, 0.380247, -0.092517, 0.799973, 0.919000, 0.296798, 0.096989, 0.854831, 0.165369, -0.568475, 0.216855, 0.020457, 0.835511, 0.538039, 0.999742, 0.620226, -0.244053, 0.060399, 0.323007, 0.294874, 0.988899, 0.384919, 0.735655, -0.773428, 0.549776, 0.292882, 0.660611, 0.593507, 0.621118, 0.175269, -0.682119, 0.794493, 0.868197, 0.632150, 0.807823, 0.509656, 0.482035, -0.001780, 0.259126, 0.358002, 0.280263, 0.192985, 0.290367, 0.208111, -0.917633, 0.114422, 0.925491, 0.981110, 0.255570, 0.974862, 0.016629, -0.552599, 0.575741, 0.612978, 0.615965, 0.803615, 0.772334, 0.089745, -0.838812, 0.634542, 0.113709, 0.755832, 0.577589, 0.667489, 0.529834, -0.325660, 0.817597, 0.316557, 0.335093, 0.737363, 0.260951, 0.737073, -0.049540, 0.735541, 0.988891, 0.299116, 0.147695, 0.417271, 0.940811, -0.524160, 0.857968, 0.176403, 0.244835, 0.485759, 0.033353, 0.280319, -0.750688, 0.755809, 0.924208, 0.095956, 0.962504, 0.275584, 0.173715, -0.942716, 0.706721, 0.078464, 0.576716, 0.804667, 0.559249, 0.900611, -0.646904, 0.432111, 0.927885, 0.383277, 0.269973, 0.114244, 0.574867, -0.150703, 0.241855, 0.272871, 0.199950, 0.079719, 0.868566, 0.962833, -0.789122, 0.320025, 0.905554, 0.234876, 0.991356, 0.061913, 0.732911, -0.785960, 0.874074, 0.069035, 0.658632, 0.309901, 0.023676, 0.791603, -0.764661, 0.661278, 0.319583, 0.829650, 0.117091, 0.903124, 0.982098, -0.161631, 0.193576, 0.670428, 0.857390, 0.003760, 0.572578, 0.222162, -0.114551, 0.420118, 0.530404, 0.470682, 0.525527, 0.764281, 0.040596, -0.443275, 0.501124, 0.816161, 0.417467, 0.332172, 0.447565, 0.614591, -0.559246, 0.805295, 0.226342, 0.155065, 0.714630, 0.160925, 0.760001, -0.453456, 0.093869, 0.406092, 0.264801, 0.720370, 0.743388, 0.373269, -0.403098, 0.911923, 0.897249, 0.147038, 0.753037, 0.516093, 0.739257, -0.175018, 0.045768, 0.735857, 0.801330, 0.927708, 0.240977, 0.591870, -0.921831, 0.540733, 0.149100, 0.423152, 0.806876, 0.397081, 0.061100, -0.811630, 0.044899, 0.460915, 0.961202, 0.822098, 0.971524, 0.867608, -0.773604, 0.226616, 0.686286, 0.926972, 0.411613, 0.267873, 0.081937, -0.226124, 0.295664, 0.374594, 0.533240, 0.237876, 0.669629, 0.599083, -0.513081, 0.878719, 0.201577, 0.721296, 0.495038, 0.079760, 0.965959, -0.233090, 0.052496, 0.714748, 0.887844, 0.308724, 0.972885, 0.723337, -0.453089, 0.914474, 0.704063, 0.823198, 0.834769, 0.906561, 0.919600, -0.100601, 0.307564, 0.901977, 0.468879, 0.265376, 0.885188, 0.683875, -0.868623, 0.081032, 0.466835, 0.199087, 0.663437, 0.812241, 0.311337, -0.821361, 0.356628, 0.898054, 0.160781, 0.222539, 0.714889, 0.490287, -0.984915, 0.951755, 0.964097, 0.641795, 0.815472, 0.852732, 0.862074, -0.051108, 0.440139, 0.323207, 0.517171, 0.562984, 0.115295, 0.743103, -0.977914, 0.337596, 0.440694, 0.535879, 0.959427, 0.351427, 0.704361, -0.010826, 0.131162, 0.577080, 0.349572, 0.774892, 0.425796, 0.072697, -0.500001, 0.267322, 0.909654, 0.206176, 0.223987, 0.937698, 0.323423, -0.117501, 0.490308, 0.474372, 0.689943, 0.168671, 0.719417, 0.188928, -0.330464, 0.265273, 0.446271, 0.171933, 0.176133, 0.474616, 0.140182, -0.114246, 0.905043, 0.713870, 0.555261, 0.951333}; +#define HASHPNT(x, y, z) hashpntf + 3 * hash[ (hash[ (hash[(z) & 255] + (y)) & 255] + (x)) & 255] +static float hashpntf[768] = { + 0.536902, 0.020915, 0.501445, 0.216316, 0.517036, 0.822466, 0.965315, + 0.377313, 0.678764, 0.744545, 0.097731, 0.396357, 0.247202, 0.520897, + 0.613396, 0.542124, 0.146813, 0.255489, 0.810868, 0.638641, 0.980742, + 0.292316, 0.357948, 0.114382, 0.861377, 0.629634, 0.722530, 0.714103, + 0.048549, 0.075668, 0.564920, 0.162026, 0.054466, 0.411738, 0.156897, + 0.887657, 0.599368, 0.074249, 0.170277, 0.225799, 0.393154, 0.301348, + 0.057434, 0.293849, 0.442745, 0.150002, 0.398732, 0.184582, 0.915200, + 0.630984, 0.974040, 0.117228, 0.795520, 0.763238, 0.158982, 0.616211, + 0.250825, 0.906539, 0.316874, 0.676205, 0.234720, 0.667673, 0.792225, + 0.273671, 0.119363, 0.199131, 0.856716, 0.828554, 0.900718, 0.705960, + 0.635923, 0.989433, 0.027261, 0.283507, 0.113426, 0.388115, 0.900176, + 0.637741, 0.438802, 0.715490, 0.043692, 0.202640, 0.378325, 0.450325, + 0.471832, 0.147803, 0.906899, 0.524178, 0.784981, 0.051483, 0.893369, + 0.596895, 0.275635, 0.391483, 0.844673, 0.103061, 0.257322, 0.708390, + 0.504091, 0.199517, 0.660339, 0.376071, 0.038880, 0.531293, 0.216116, + 0.138672, 0.907737, 0.807994, 0.659582, 0.915264, 0.449075, 0.627128, + 0.480173, 0.380942, 0.018843, 0.211808, 0.569701, 0.082294, 0.689488, + 0.573060, 0.593859, 0.216080, 0.373159, 0.108117, 0.595539, 0.021768, + 0.380297, 0.948125, 0.377833, 0.319699, 0.315249, 0.972805, 0.792270, + 0.445396, 0.845323, 0.372186, 0.096147, 0.689405, 0.423958, 0.055675, + 0.117940, 0.328456, 0.605808, 0.631768, 0.372170, 0.213723, 0.032700, + 0.447257, 0.440661, 0.728488, 0.299853, 0.148599, 0.649212, 0.498381, + 0.049921, 0.496112, 0.607142, 0.562595, 0.990246, 0.739659, 0.108633, + 0.978156, 0.209814, 0.258436, 0.876021, 0.309260, 0.600673, 0.713597, + 0.576967, 0.641402, 0.853930, 0.029173, 0.418111, 0.581593, 0.008394, + 0.589904, 0.661574, 0.979326, 0.275724, 0.111109, 0.440472, 0.120839, + 0.521602, 0.648308, 0.284575, 0.204501, 0.153286, 0.822444, 0.300786, + 0.303906, 0.364717, 0.209038, 0.916831, 0.900245, 0.600685, 0.890002, + 0.581660, 0.431154, 0.705569, 0.551250, 0.417075, 0.403749, 0.696652, + 0.292652, 0.911372, 0.690922, 0.323718, 0.036773, 0.258976, 0.274265, + 0.225076, 0.628965, 0.351644, 0.065158, 0.080340, 0.467271, 0.130643, + 0.385914, 0.919315, 0.253821, 0.966163, 0.017439, 0.392610, 0.478792, + 0.978185, 0.072691, 0.982009, 0.097987, 0.731533, 0.401233, 0.107570, + 0.349587, 0.479122, 0.700598, 0.481751, 0.788429, 0.706864, 0.120086, + 0.562691, 0.981797, 0.001223, 0.192120, 0.451543, 0.173092, 0.108960, + 0.549594, 0.587892, 0.657534, 0.396365, 0.125153, 0.666420, 0.385823, + 0.890916, 0.436729, 0.128114, 0.369598, 0.759096, 0.044677, 0.904752, + 0.088052, 0.621148, 0.005047, 0.452331, 0.162032, 0.494238, 0.523349, + 0.741829, 0.698450, 0.452316, 0.563487, 0.819776, 0.492160, 0.004210, + 0.647158, 0.551475, 0.362995, 0.177937, 0.814722, 0.727729, 0.867126, + 0.997157, 0.108149, 0.085726, 0.796024, 0.665075, 0.362462, 0.323124, + 0.043718, 0.042357, 0.315030, 0.328954, 0.870845, 0.683186, 0.467922, + 0.514894, 0.809971, 0.631979, 0.176571, 0.366320, 0.850621, 0.505555, + 0.749551, 0.750830, 0.401714, 0.481216, 0.438393, 0.508832, 0.867971, + 0.654581, 0.058204, 0.566454, 0.084124, 0.548539, 0.902690, 0.779571, + 0.562058, 0.048082, 0.863109, 0.079290, 0.713559, 0.783496, 0.265266, + 0.672089, 0.786939, 0.143048, 0.086196, 0.876129, 0.408708, 0.229312, + 0.629995, 0.206665, 0.207308, 0.710079, 0.341704, 0.264921, 0.028748, + 0.629222, 0.470173, 0.726228, 0.125243, 0.328249, 0.794187, 0.741340, + 0.489895, 0.189396, 0.724654, 0.092841, 0.039809, 0.860126, 0.247701, + 0.655331, 0.964121, 0.672536, 0.044522, 0.690567, 0.837238, 0.631520, + 0.953734, 0.352484, 0.289026, 0.034152, 0.852575, 0.098454, 0.795529, + 0.452181, 0.826159, 0.186993, 0.820725, 0.440328, 0.922137, 0.704592, + 0.915437, 0.738183, 0.733461, 0.193798, 0.929213, 0.161390, 0.318547, + 0.888751, 0.430968, 0.740837, 0.193544, 0.872253, 0.563074, 0.274598, + 0.347805, 0.666176, 0.449831, 0.800991, 0.588727, 0.052296, 0.714761, + 0.420620, 0.570325, 0.057550, 0.210888, 0.407312, 0.662848, 0.924382, + 0.895958, 0.775198, 0.688605, 0.025721, 0.301913, 0.791408, 0.500602, + 0.831984, 0.828509, 0.642093, 0.494174, 0.525880, 0.446365, 0.440063, + 0.763114, 0.630358, 0.223943, 0.333806, 0.906033, 0.498306, 0.241278, + 0.427640, 0.772683, 0.198082, 0.225379, 0.503894, 0.436599, 0.016503, + 0.803725, 0.189878, 0.291095, 0.499114, 0.151573, 0.079031, 0.904618, + 0.708535, 0.273900, 0.067419, 0.317124, 0.936499, 0.716511, 0.543845, + 0.939909, 0.826574, 0.715090, 0.154864, 0.750150, 0.845808, 0.648108, + 0.556564, 0.644757, 0.140873, 0.799167, 0.632989, 0.444245, 0.471978, + 0.435910, 0.359793, 0.216241, 0.007633, 0.337236, 0.857863, 0.380247, + 0.092517, 0.799973, 0.919000, 0.296798, 0.096989, 0.854831, 0.165369, + 0.568475, 0.216855, 0.020457, 0.835511, 0.538039, 0.999742, 0.620226, + 0.244053, 0.060399, 0.323007, 0.294874, 0.988899, 0.384919, 0.735655, + 0.773428, 0.549776, 0.292882, 0.660611, 0.593507, 0.621118, 0.175269, + 0.682119, 0.794493, 0.868197, 0.632150, 0.807823, 0.509656, 0.482035, + 0.001780, 0.259126, 0.358002, 0.280263, 0.192985, 0.290367, 0.208111, + 0.917633, 0.114422, 0.925491, 0.981110, 0.255570, 0.974862, 0.016629, + 0.552599, 0.575741, 0.612978, 0.615965, 0.803615, 0.772334, 0.089745, + 0.838812, 0.634542, 0.113709, 0.755832, 0.577589, 0.667489, 0.529834, + 0.325660, 0.817597, 0.316557, 0.335093, 0.737363, 0.260951, 0.737073, + 0.049540, 0.735541, 0.988891, 0.299116, 0.147695, 0.417271, 0.940811, + 0.524160, 0.857968, 0.176403, 0.244835, 0.485759, 0.033353, 0.280319, + 0.750688, 0.755809, 0.924208, 0.095956, 0.962504, 0.275584, 0.173715, + 0.942716, 0.706721, 0.078464, 0.576716, 0.804667, 0.559249, 0.900611, + 0.646904, 0.432111, 0.927885, 0.383277, 0.269973, 0.114244, 0.574867, + 0.150703, 0.241855, 0.272871, 0.199950, 0.079719, 0.868566, 0.962833, + 0.789122, 0.320025, 0.905554, 0.234876, 0.991356, 0.061913, 0.732911, + 0.785960, 0.874074, 0.069035, 0.658632, 0.309901, 0.023676, 0.791603, + 0.764661, 0.661278, 0.319583, 0.829650, 0.117091, 0.903124, 0.982098, + 0.161631, 0.193576, 0.670428, 0.857390, 0.003760, 0.572578, 0.222162, + 0.114551, 0.420118, 0.530404, 0.470682, 0.525527, 0.764281, 0.040596, + 0.443275, 0.501124, 0.816161, 0.417467, 0.332172, 0.447565, 0.614591, + 0.559246, 0.805295, 0.226342, 0.155065, 0.714630, 0.160925, 0.760001, + 0.453456, 0.093869, 0.406092, 0.264801, 0.720370, 0.743388, 0.373269, + 0.403098, 0.911923, 0.897249, 0.147038, 0.753037, 0.516093, 0.739257, + 0.175018, 0.045768, 0.735857, 0.801330, 0.927708, 0.240977, 0.591870, + 0.921831, 0.540733, 0.149100, 0.423152, 0.806876, 0.397081, 0.061100, + 0.811630, 0.044899, 0.460915, 0.961202, 0.822098, 0.971524, 0.867608, + 0.773604, 0.226616, 0.686286, 0.926972, 0.411613, 0.267873, 0.081937, + 0.226124, 0.295664, 0.374594, 0.533240, 0.237876, 0.669629, 0.599083, + 0.513081, 0.878719, 0.201577, 0.721296, 0.495038, 0.079760, 0.965959, + 0.233090, 0.052496, 0.714748, 0.887844, 0.308724, 0.972885, 0.723337, + 0.453089, 0.914474, 0.704063, 0.823198, 0.834769, 0.906561, 0.919600, + 0.100601, 0.307564, 0.901977, 0.468879, 0.265376, 0.885188, 0.683875, + 0.868623, 0.081032, 0.466835, 0.199087, 0.663437, 0.812241, 0.311337, + 0.821361, 0.356628, 0.898054, 0.160781, 0.222539, 0.714889, 0.490287, + 0.984915, 0.951755, 0.964097, 0.641795, 0.815472, 0.852732, 0.862074, + 0.051108, 0.440139, 0.323207, 0.517171, 0.562984, 0.115295, 0.743103, + 0.977914, 0.337596, 0.440694, 0.535879, 0.959427, 0.351427, 0.704361, + 0.010826, 0.131162, 0.577080, 0.349572, 0.774892, 0.425796, 0.072697, + 0.500001, 0.267322, 0.909654, 0.206176, 0.223987, 0.937698, 0.323423, + 0.117501, 0.490308, 0.474372, 0.689943, 0.168671, 0.719417, 0.188928, + 0.330464, 0.265273, 0.446271, 0.171933, 0.176133, 0.474616, 0.140182, + 0.114246, 0.905043, 0.713870, 0.555261, 0.951333 +}; unsigned char hash[512]= { -0xA2,0xA0,0x19,0x3B,0xF8,0xEB,0xAA,0xEE,0xF3,0x1C,0x67,0x28,0x1D,0xED,0x0,0xDE,0x95,0x2E,0xDC,0x3F,0x3A,0x82,0x35,0x4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B, 0x5D, }; float hashvectf[768]= { -0.33783,0.715698,-0.611206,-0.944031,-0.326599,-0.045624,-0.101074,-0.416443,-0.903503,0.799286,0.49411,-0.341949,-0.854645,0.518036,0.033936,0.42514,-0.437866,-0.792114,-0.358948,0.597046,0.717377,-0.985413,0.144714,0.089294,-0.601776,-0.33728,-0.723907,-0.449921,0.594513,0.666382,0.208313,-0.10791, -0.972076,0.575317,0.060425,0.815643,0.293365,-0.875702,-0.383453,0.293762,0.465759,0.834686,-0.846008,-0.233398,-0.47934,-0.115814,0.143036,-0.98291,0.204681,-0.949036,-0.239532,0.946716,-0.263947,0.184326,-0.235596,0.573822,0.784332,0.203705,-0.372253,-0.905487,0.756989,-0.651031,0.055298,0.497803, -0.814697,-0.297363,-0.16214,0.063995,-0.98468,-0.329254,0.834381,0.441925,0.703827,-0.527039,-0.476227,0.956421,0.266113,0.119781,0.480133,0.482849,0.7323,-0.18631,0.961212,-0.203125,-0.748474,-0.656921,-0.090393,-0.085052,-0.165253,0.982544,-0.76947,0.628174,-0.115234,0.383148,0.537659,0.751068, -0.616486,-0.668488,-0.415924,-0.259979,-0.630005,0.73175,0.570953,-0.087952,0.816223,-0.458008,0.023254,0.888611,-0.196167,0.976563,-0.088287,-0.263885,-0.69812,-0.665527,0.437134,-0.892273,-0.112793,-0.621674,-0.230438,0.748566,0.232422,0.900574,-0.367249,0.22229,-0.796143,0.562744,-0.665497,-0.73764, -0.11377,0.670135,0.704803,0.232605,0.895599,0.429749,-0.114655,-0.11557,-0.474243,0.872742,0.621826,0.604004,-0.498444,-0.832214,0.012756,0.55426,-0.702484,0.705994,-0.089661,-0.692017,0.649292,0.315399,-0.175995,-0.977997,0.111877,0.096954,-0.04953,0.994019,0.635284,-0.606689,-0.477783,-0.261261, --0.607422,-0.750153,0.983276,0.165436,0.075958,-0.29837,0.404083,-0.864655,-0.638672,0.507721,0.578156,0.388214,0.412079,0.824249,0.556183,-0.208832,0.804352,0.778442,0.562012,0.27951,-0.616577,0.781921,-0.091522,0.196289,0.051056,0.979187,-0.121216,0.207153,-0.970734,-0.173401,-0.384735,0.906555, -0.161499,-0.723236,-0.671387,0.178497,-0.006226,-0.983887,-0.126038,0.15799,0.97934,0.830475,-0.024811,0.556458,-0.510132,-0.76944,0.384247,0.81424,0.200104,-0.544891,-0.112549,-0.393311,-0.912445,0.56189,0.152222,-0.813049,0.198914,-0.254517,-0.946381,-0.41217,0.690979,-0.593811,-0.407257,0.324524, -0.853668,-0.690186,0.366119,-0.624115,-0.428345,0.844147,-0.322296,-0.21228,-0.297546,-0.930756,-0.273071,0.516113,0.811798,0.928314,0.371643,0.007233,0.785828,-0.479218,-0.390778,-0.704895,0.058929,0.706818,0.173248,0.203583,0.963562,0.422211,-0.904297,-0.062469,-0.363312,-0.182465,0.913605,0.254028, --0.552307,-0.793945,-0.28891,-0.765747,-0.574554,0.058319,0.291382,0.954803,0.946136,-0.303925,0.111267,-0.078156,0.443695,-0.892731,0.182098,0.89389,0.409515,-0.680298,-0.213318,0.701141,0.062469,0.848389,-0.525635,-0.72879,-0.641846,0.238342,-0.88089,0.427673,0.202637,-0.532501,-0.21405,0.818878, -0.948975,-0.305084,0.07962,0.925446,0.374664,0.055817,0.820923,0.565491,0.079102,0.25882,0.099792,-0.960724,-0.294617,0.910522,0.289978,0.137115,0.320038,-0.937408,-0.908386,0.345276,-0.235718,-0.936218,0.138763,0.322754,0.366577,0.925934,-0.090637,0.309296,-0.686829,-0.657684,0.66983,0.024445, -0.742065,-0.917999,-0.059113,-0.392059,0.365509,0.462158,-0.807922,0.083374,0.996399,-0.014801,0.593842,0.253143,-0.763672,0.974976,-0.165466,0.148285,0.918976,0.137299,0.369537,0.294952,0.694977,0.655731,0.943085,0.152618,-0.295319,0.58783,-0.598236,0.544495,0.203796,0.678223,0.705994,-0.478821, --0.661011,0.577667,0.719055,-0.1698,-0.673828,-0.132172,-0.965332,0.225006,-0.981873,-0.14502,0.121979,0.763458,0.579742,0.284546,-0.893188,0.079681,0.442474,-0.795776,-0.523804,0.303802,0.734955,0.67804,-0.007446,0.15506,0.986267,-0.056183,0.258026,0.571503,-0.778931,-0.681549,-0.702087,-0.206116, --0.96286,-0.177185,0.203613,-0.470978,-0.515106,0.716095,-0.740326,0.57135,0.354095,-0.56012,-0.824982,-0.074982,-0.507874,0.753204,0.417969,-0.503113,0.038147,0.863342,0.594025,0.673553,-0.439758,-0.119873,-0.005524,-0.992737,0.098267,-0.213776,0.971893,-0.615631,0.643951,0.454163,0.896851,-0.441071, -0.032166,-0.555023,0.750763,-0.358093,0.398773,0.304688,0.864929,-0.722961,0.303589,0.620544,-0.63559,-0.621948,-0.457306,-0.293243,0.072327,0.953278,-0.491638,0.661041,-0.566772,-0.304199,-0.572083,-0.761688,0.908081,-0.398956,0.127014,-0.523621,-0.549683,-0.650848,-0.932922,-0.19986,0.299408,0.099426, -0.140869,0.984985,-0.020325,-0.999756,-0.002319,0.952667,0.280853,-0.11615,-0.971893,0.082581,0.220337,0.65921,0.705292,-0.260651,0.733063,-0.175537,0.657043,-0.555206,0.429504,-0.712189,0.400421,-0.89859,0.179352,0.750885,-0.19696,0.630341,0.785675,-0.569336,0.241821,-0.058899,-0.464111,0.883789, -0.129608,-0.94519,0.299622,-0.357819,0.907654,0.219238,-0.842133,-0.439117,-0.312927,-0.313477,0.84433,0.434479,-0.241211,0.053253,0.968994,0.063873,0.823273,0.563965,0.476288,0.862152,-0.172516,0.620941,-0.298126,0.724915,0.25238,-0.749359,-0.612122,-0.577545,0.386566,0.718994,-0.406342,-0.737976, -0.538696,0.04718,0.556305,0.82959,-0.802856,0.587463,0.101166,-0.707733,-0.705963,0.026428,0.374908,0.68457,0.625092,0.472137,0.208405,-0.856506,-0.703064,-0.581085,-0.409821,-0.417206,-0.736328,0.532623,-0.447876,-0.20285,-0.870728,0.086945,-0.990417,0.107086,0.183685,0.018341,-0.982788,0.560638, --0.428864,0.708282,0.296722,-0.952576,-0.0672,0.135773,0.990265,0.030243,-0.068787,0.654724,0.752686,0.762604,-0.551758,0.337585,-0.819611,-0.407684,0.402466,-0.727844,-0.55072,-0.408539,-0.855774,-0.480011,0.19281,0.693176,-0.079285,0.716339,0.226013,0.650116,-0.725433,0.246704,0.953369,-0.173553, --0.970398,-0.239227,-0.03244,0.136383,-0.394318,0.908752,0.813232,0.558167,0.164368,0.40451,0.549042,-0.731323,-0.380249,-0.566711,0.730865,0.022156,0.932739,0.359741,0.00824,0.996552,-0.082306,0.956635,-0.065338,-0.283722,-0.743561,0.008209,0.668579,-0.859589,-0.509674,0.035767,-0.852234,0.363678, --0.375977,-0.201965,-0.970795,-0.12915,0.313477,0.947327,0.06546,-0.254028,-0.528259,0.81015,0.628052,0.601105,0.49411,-0.494385,0.868378,0.037933,0.275635,-0.086426,0.957336,-0.197937,0.468903,-0.860748,0.895599,0.399384,0.195801,0.560791,0.825012,-0.069214,0.304199,-0.849487,0.43103,0.096375, -0.93576,0.339111,-0.051422,0.408966,-0.911072,0.330444,0.942841,-0.042389,-0.452362,-0.786407,0.420563,0.134308,-0.933472,-0.332489,0.80191,-0.566711,-0.188934,-0.987946,-0.105988,0.112518,-0.24408,0.892242,-0.379791,-0.920502,0.229095,-0.316376,0.7789,0.325958,0.535706,-0.912872,0.185211,-0.36377, --0.184784,0.565369,-0.803833,-0.018463,0.119537,0.992615,-0.259247,-0.935608,0.239532,-0.82373,-0.449127,-0.345947,-0.433105,0.659515,0.614349,-0.822754,0.378845,-0.423676,0.687195,-0.674835,-0.26889,-0.246582,-0.800842,0.545715,-0.729187,-0.207794,0.651978,0.653534,-0.610443,-0.447388,0.492584,-0.023346, -0.869934,0.609039,0.009094,-0.79306,0.962494,-0.271088,-0.00885,0.2659,-0.004913,0.963959,0.651245,0.553619,-0.518951,0.280548,-0.84314,0.458618,-0.175293,-0.983215,0.049805,0.035339,-0.979919,0.196045,-0.982941,0.164307,-0.082245,0.233734,-0.97226,-0.005005,-0.747253,-0.611328,0.260437,0.645599, -0.592773,0.481384,0.117706,-0.949524,-0.29068,-0.535004,-0.791901,-0.294312,-0.627167,-0.214447,0.748718,-0.047974,-0.813477,-0.57959,-0.175537,0.477264,-0.860992,0.738556,-0.414246,-0.53183,0.562561,-0.704071,0.433289,-0.754944,0.64801,-0.100586,0.114716,0.044525,-0.992371,0.966003,0.244873,-0.082764, + 0.33783, 0.715698, -0.611206, -0.944031, -0.326599, -0.045624, -0.101074, -0.416443, -0.903503, 0.799286, 0.49411, + -0.341949, -0.854645, 0.518036, 0.033936, 0.42514, -0.437866, -0.792114, -0.358948, 0.597046, 0.717377, -0.985413, + 0.144714, 0.089294, -0.601776, -0.33728, -0.723907, -0.449921, 0.594513, 0.666382, 0.208313, -0.10791, 0.972076, + 0.575317, 0.060425, 0.815643, 0.293365, -0.875702, -0.383453, 0.293762, 0.465759, 0.834686, -0.846008, -0.233398, + -0.47934, -0.115814, 0.143036, -0.98291, 0.204681, -0.949036, -0.239532, 0.946716, -0.263947, 0.184326, -0.235596, + 0.573822, 0.784332, 0.203705, -0.372253, -0.905487, 0.756989, -0.651031, 0.055298, 0.497803, 0.814697, -0.297363, + -0.16214, 0.063995, -0.98468, -0.329254, 0.834381, 0.441925, 0.703827, -0.527039, -0.476227, 0.956421, 0.266113, + 0.119781, 0.480133, 0.482849, 0.7323, -0.18631, 0.961212, -0.203125, -0.748474, -0.656921, -0.090393, -0.085052, + -0.165253, 0.982544, -0.76947, 0.628174, -0.115234, 0.383148, 0.537659, 0.751068, 0.616486, -0.668488, -0.415924, + -0.259979, -0.630005, 0.73175, 0.570953, -0.087952, 0.816223, -0.458008, 0.023254, 0.888611, -0.196167, 0.976563, + -0.088287, -0.263885, -0.69812, -0.665527, 0.437134, -0.892273, -0.112793, -0.621674, -0.230438, 0.748566, 0.232422, + 0.900574, -0.367249, 0.22229, -0.796143, 0.562744, -0.665497, -0.73764, 0.11377, 0.670135, 0.704803, 0.232605, + 0.895599, 0.429749, -0.114655, -0.11557, -0.474243, 0.872742, 0.621826, 0.604004, -0.498444, -0.832214, 0.012756, + 0.55426, -0.702484, 0.705994, -0.089661, -0.692017, 0.649292, 0.315399, -0.175995, -0.977997, 0.111877, 0.096954, + -0.04953, 0.994019, 0.635284, -0.606689, -0.477783, -0.261261, -0.607422, -0.750153, 0.983276, 0.165436, 0.075958, + -0.29837, 0.404083, -0.864655, -0.638672, 0.507721, 0.578156, 0.388214, 0.412079, 0.824249, 0.556183, -0.208832, + 0.804352, 0.778442, 0.562012, 0.27951, -0.616577, 0.781921, -0.091522, 0.196289, 0.051056, 0.979187, -0.121216, + 0.207153, -0.970734, -0.173401, -0.384735, 0.906555, 0.161499, -0.723236, -0.671387, 0.178497, -0.006226, -0.983887, + -0.126038, 0.15799, 0.97934, 0.830475, -0.024811, 0.556458, -0.510132, -0.76944, 0.384247, 0.81424, 0.200104, + -0.544891, -0.112549, -0.393311, -0.912445, 0.56189, 0.152222, -0.813049, 0.198914, -0.254517, -0.946381, -0.41217, + 0.690979, -0.593811, -0.407257, 0.324524, 0.853668, -0.690186, 0.366119, -0.624115, -0.428345, 0.844147, -0.322296, + -0.21228, -0.297546, -0.930756, -0.273071, 0.516113, 0.811798, 0.928314, 0.371643, 0.007233, 0.785828, -0.479218, + -0.390778, -0.704895, 0.058929, 0.706818, 0.173248, 0.203583, 0.963562, 0.422211, -0.904297, -0.062469, -0.363312, + -0.182465, 0.913605, 0.254028, -0.552307, -0.793945, -0.28891, -0.765747, -0.574554, 0.058319, 0.291382, 0.954803, + 0.946136, -0.303925, 0.111267, -0.078156, 0.443695, -0.892731, 0.182098, 0.89389, 0.409515, -0.680298, -0.213318, + 0.701141, 0.062469, 0.848389, -0.525635, -0.72879, -0.641846, 0.238342, -0.88089, 0.427673, 0.202637, -0.532501, + -0.21405, 0.818878, 0.948975, -0.305084, 0.07962, 0.925446, 0.374664, 0.055817, 0.820923, 0.565491, 0.079102, + 0.25882, 0.099792, -0.960724, -0.294617, 0.910522, 0.289978, 0.137115, 0.320038, -0.937408, -0.908386, 0.345276, + -0.235718, -0.936218, 0.138763, 0.322754, 0.366577, 0.925934, -0.090637, 0.309296, -0.686829, -0.657684, 0.66983, + 0.024445, 0.742065, -0.917999, -0.059113, -0.392059, 0.365509, 0.462158, -0.807922, 0.083374, 0.996399, -0.014801, + 0.593842, 0.253143, -0.763672, 0.974976, -0.165466, 0.148285, 0.918976, 0.137299, 0.369537, 0.294952, 0.694977, + 0.655731, 0.943085, 0.152618, -0.295319, 0.58783, -0.598236, 0.544495, 0.203796, 0.678223, 0.705994, -0.478821, + -0.661011, 0.577667, 0.719055, -0.1698, -0.673828, -0.132172, -0.965332, 0.225006, -0.981873, -0.14502, 0.121979, + 0.763458, 0.579742, 0.284546, -0.893188, 0.079681, 0.442474, -0.795776, -0.523804, 0.303802, 0.734955, 0.67804, + -0.007446, 0.15506, 0.986267, -0.056183, 0.258026, 0.571503, -0.778931, -0.681549, -0.702087, -0.206116, -0.96286, + -0.177185, 0.203613, -0.470978, -0.515106, 0.716095, -0.740326, 0.57135, 0.354095, -0.56012, -0.824982, -0.074982, + -0.507874, 0.753204, 0.417969, -0.503113, 0.038147, 0.863342, 0.594025, 0.673553, -0.439758, -0.119873, -0.005524, + -0.992737, 0.098267, -0.213776, 0.971893, -0.615631, 0.643951, 0.454163, 0.896851, -0.441071, 0.032166, -0.555023, + 0.750763, -0.358093, 0.398773, 0.304688, 0.864929, -0.722961, 0.303589, 0.620544, -0.63559, -0.621948, -0.457306, + -0.293243, 0.072327, 0.953278, -0.491638, 0.661041, -0.566772, -0.304199, -0.572083, -0.761688, 0.908081, -0.398956, + 0.127014, -0.523621, -0.549683, -0.650848, -0.932922, -0.19986, 0.299408, 0.099426, 0.140869, 0.984985, -0.020325, + -0.999756, -0.002319, 0.952667, 0.280853, -0.11615, -0.971893, 0.082581, 0.220337, 0.65921, 0.705292, -0.260651, + 0.733063, -0.175537, 0.657043, -0.555206, 0.429504, -0.712189, 0.400421, -0.89859, 0.179352, 0.750885, -0.19696, + 0.630341, 0.785675, -0.569336, 0.241821, -0.058899, -0.464111, 0.883789, 0.129608, -0.94519, 0.299622, -0.357819, + 0.907654, 0.219238, -0.842133, -0.439117, -0.312927, -0.313477, 0.84433, 0.434479, -0.241211, 0.053253, 0.968994, + 0.063873, 0.823273, 0.563965, 0.476288, 0.862152, -0.172516, 0.620941, -0.298126, 0.724915, 0.25238, -0.749359, + -0.612122, -0.577545, 0.386566, 0.718994, -0.406342, -0.737976, 0.538696, 0.04718, 0.556305, 0.82959, -0.802856, + 0.587463, 0.101166, -0.707733, -0.705963, 0.026428, 0.374908, 0.68457, 0.625092, 0.472137, 0.208405, -0.856506, + -0.703064, -0.581085, -0.409821, -0.417206, -0.736328, 0.532623, -0.447876, -0.20285, -0.870728, 0.086945, + -0.990417, 0.107086, 0.183685, 0.018341, -0.982788, 0.560638, -0.428864, 0.708282, 0.296722, -0.952576, -0.0672, + 0.135773, 0.990265, 0.030243, -0.068787, 0.654724, 0.752686, 0.762604, -0.551758, 0.337585, -0.819611, -0.407684, + 0.402466, -0.727844, -0.55072, -0.408539, -0.855774, -0.480011, 0.19281, 0.693176, -0.079285, 0.716339, 0.226013, + 0.650116, -0.725433, 0.246704, 0.953369, -0.173553, -0.970398, -0.239227, -0.03244, 0.136383, -0.394318, 0.908752, + 0.813232, 0.558167, 0.164368, 0.40451, 0.549042, -0.731323, -0.380249, -0.566711, 0.730865, 0.022156, 0.932739, + 0.359741, 0.00824, 0.996552, -0.082306, 0.956635, -0.065338, -0.283722, -0.743561, 0.008209, 0.668579, -0.859589, + -0.509674, 0.035767, -0.852234, 0.363678, -0.375977, -0.201965, -0.970795, -0.12915, 0.313477, 0.947327, 0.06546, + -0.254028, -0.528259, 0.81015, 0.628052, 0.601105, 0.49411, -0.494385, 0.868378, 0.037933, 0.275635, -0.086426, + 0.957336, -0.197937, 0.468903, -0.860748, 0.895599, 0.399384, 0.195801, 0.560791, 0.825012, -0.069214, 0.304199, + -0.849487, 0.43103, 0.096375, 0.93576, 0.339111, -0.051422, 0.408966, -0.911072, 0.330444, 0.942841, -0.042389, + -0.452362, -0.786407, 0.420563, 0.134308, -0.933472, -0.332489, 0.80191, -0.566711, -0.188934, -0.987946, -0.105988, + 0.112518, -0.24408, 0.892242, -0.379791, -0.920502, 0.229095, -0.316376, 0.7789, 0.325958, 0.535706, -0.912872, + 0.185211, -0.36377, -0.184784, 0.565369, -0.803833, -0.018463, 0.119537, 0.992615, -0.259247, -0.935608, 0.239532, + -0.82373, -0.449127, -0.345947, -0.433105, 0.659515, 0.614349, -0.822754, 0.378845, -0.423676, 0.687195, -0.674835, + -0.26889, -0.246582, -0.800842, 0.545715, -0.729187, -0.207794, 0.651978, 0.653534, -0.610443, -0.447388, 0.492584, + -0.023346, 0.869934, 0.609039, 0.009094, -0.79306, 0.962494, -0.271088, -0.00885, 0.2659, -0.004913, 0.963959, + 0.651245, 0.553619, -0.518951, 0.280548, -0.84314, 0.458618, -0.175293, -0.983215, 0.049805, 0.035339, -0.979919, + 0.196045, -0.982941, 0.164307, -0.082245, 0.233734, -0.97226, -0.005005, -0.747253, -0.611328, 0.260437, 0.645599, + 0.592773, 0.481384, 0.117706, -0.949524, -0.29068, -0.535004, -0.791901, -0.294312, -0.627167, -0.214447, 0.748718, + -0.047974, -0.813477, -0.57959, -0.175537, 0.477264, -0.860992, 0.738556, -0.414246, -0.53183, 0.562561, -0.704071, +0.433289, -0.754944, 0.64801, -0.100586, 0.114716, 0.044525, -0.992371, 0.966003, 0.244873, -0.082764, }; /**************************/ diff --git a/source/blender/collada/AnimationImporter.h b/source/blender/collada/AnimationImporter.h index 492d63dbe8e..362b288dbb4 100644 --- a/source/blender/collada/AnimationImporter.h +++ b/source/blender/collada/AnimationImporter.h @@ -143,9 +143,9 @@ public: virtual void change_eul_to_quat(Object *ob, bAction *act); #endif - void translate_Animations(COLLADAFW::Node * Node , + void translate_Animations(COLLADAFW::Node * Node, std::map<COLLADAFW::UniqueId, COLLADAFW::Node*>& root_map, - std::multimap<COLLADAFW::UniqueId, Object*>& object_map , + std::multimap<COLLADAFW::UniqueId, Object*>& object_map, std::map<COLLADAFW::UniqueId, const COLLADAFW::Object*> FW_object_map); AnimMix* get_animation_type( const COLLADAFW::Node * node, std::map<COLLADAFW::UniqueId, const COLLADAFW::Object*> FW_object_map ); diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index a3c9ff38e87..a1f69ef16bd 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -371,7 +371,7 @@ Object* DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Nod Object *new_child = NULL; if (inodes.getCount()) { // \todo loop through instance nodes const COLLADAFW::UniqueId& id = inodes[0]->getInstanciatedObjectId(); - fprintf(stderr,"Doing %d child nodes\n" ,node_map.count(id)); + fprintf(stderr, "Doing %d child nodes\n", node_map.count(id)); new_child = create_instance_node(object_map.find(id)->second, node_map[id], child_node, sce, is_library_node); } else { @@ -401,7 +401,7 @@ void DocumentImporter::write_node (COLLADAFW::Node *node, COLLADAFW::Node *paren par = add_object(sce, OB_ARMATURE); bc_set_parent(par, empty->parent, mContext); //remove empty : todo - object_map.insert( std::make_pair<COLLADAFW::UniqueId, Object *>(parent_node->getUniqueId(),par) ); + object_map.insert(std::make_pair<COLLADAFW::UniqueId, Object *>(parent_node->getUniqueId(), par)); } armature_importer.add_joint(node, parent_node == NULL || parent_node->getType() != COLLADAFW::Node::JOINT, par, sce); } @@ -450,14 +450,14 @@ void DocumentImporter::write_node (COLLADAFW::Node *node, COLLADAFW::Node *paren ob = NULL; } else { - std::pair<std::multimap<COLLADAFW::UniqueId,Object *>::iterator, std::multimap<COLLADAFW::UniqueId,Object *>::iterator> pair_iter = object_map.equal_range(node_id); - for(std::multimap<COLLADAFW::UniqueId,Object *>::iterator it2 = pair_iter.first; it2 != pair_iter.second; it2++){ + std::pair<std::multimap<COLLADAFW::UniqueId, Object *>::iterator, std::multimap<COLLADAFW::UniqueId, Object *>::iterator> pair_iter = object_map.equal_range(node_id); + for (std::multimap<COLLADAFW::UniqueId, Object *>::iterator it2 = pair_iter.first; it2 != pair_iter.second; it2++) { Object *source_ob = (Object *)it2->second; COLLADAFW::Node *source_node = node_map[node_id]; ob = create_instance_node(source_ob, source_node, node, sce, is_library_node); } } - if(ob != NULL) objects_done->push_back(ob); + if (ob != NULL) objects_done->push_back(ob); ++inst_done; read_transform = false; @@ -472,11 +472,11 @@ void DocumentImporter::write_node (COLLADAFW::Node *node, COLLADAFW::Node *paren // XXX: if there're multiple instances, only one is stored if (!ob) return; - for(std::vector<Object *>::iterator it = objects_done->begin(); it != objects_done->end(); ++it) { + for (std::vector<Object *>::iterator it = objects_done->begin(); it != objects_done->end(); ++it) { ob = *it; std::string nodename = node->getName().size() ? node->getName() : node->getOriginalId(); rename_id(&ob->id, (char*)nodename.c_str()); - object_map.insert( std::make_pair<COLLADAFW::UniqueId,Object *>(node->getUniqueId(),ob) ); + object_map.insert(std::make_pair<COLLADAFW::UniqueId, Object *>(node->getUniqueId(), ob)); node_map[node->getUniqueId()] = node; if (is_library_node) @@ -485,7 +485,7 @@ void DocumentImporter::write_node (COLLADAFW::Node *node, COLLADAFW::Node *paren } - for(std::vector<Object *>::iterator it = objects_done->begin(); it != objects_done->end(); ++it) { + for (std::vector<Object *>::iterator it = objects_done->begin(); it != objects_done->end(); ++it) { ob =*it; if (read_transform) diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index e8c1a034dc9..92f4d6f01d5 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -4368,8 +4368,9 @@ static int edbm_convex_hull_exec(bContext *C, wmOperator *op) /* Delete unused vertices, edges, and faces */ if (RNA_boolean_get(op->ptr, "delete_unused")) { - if(!EDBM_op_callf(em, op, "del geom=%s context=%i", - &bmop, "unused_geom", DEL_ONLYTAGGED)) { + if (!EDBM_op_callf(em, op, "del geom=%s context=%i", + &bmop, "unused_geom", DEL_ONLYTAGGED)) + { EDBM_op_finish(em, &bmop, op, TRUE); return OPERATOR_CANCELLED; } @@ -4377,8 +4378,9 @@ static int edbm_convex_hull_exec(bContext *C, wmOperator *op) /* Delete hole edges/faces */ if (RNA_boolean_get(op->ptr, "make_holes")) { - if(!EDBM_op_callf(em, op, "del geom=%s context=%i", - &bmop, "holes_geom", DEL_ONLYTAGGED)) { + if (!EDBM_op_callf(em, op, "del geom=%s context=%i", + &bmop, "holes_geom", DEL_ONLYTAGGED)) + { EDBM_op_finish(em, &bmop, op, TRUE); return OPERATOR_CANCELLED; } @@ -4386,9 +4388,10 @@ static int edbm_convex_hull_exec(bContext *C, wmOperator *op) /* Merge adjacent triangles */ if (RNA_boolean_get(op->ptr, "join_triangles")) { - if(!EDBM_op_callf(em, op, "join_triangles faces=%s limit=%f", - &bmop, "geomout", - RNA_float_get(op->ptr, "limit"))) { + if (!EDBM_op_callf(em, op, "join_triangles faces=%s limit=%f", + &bmop, "geomout", + RNA_float_get(op->ptr, "limit"))) + { EDBM_op_finish(em, &bmop, op, TRUE); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index aa3ae0077a9..24bc01989fc 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -344,12 +344,12 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op) BLI_strncpy(filename, path, sizeof(filename)); BLI_path_abs(filename, bmain->name); - if(split) + if (split) result = AUD_mixdown_per_channel(scene->sound_scene, SFRA * specs.rate / FPS, (EFRA - SFRA) * specs.rate / FPS, - accuracy, filename, specs, container, codec, bitrate); + accuracy, filename, specs, container, codec, bitrate); else result = AUD_mixdown(scene->sound_scene, SFRA * specs.rate / FPS, (EFRA - SFRA) * specs.rate / FPS, - accuracy, filename, specs, container, codec, bitrate); + accuracy, filename, specs, container, codec, bitrate); if (result) { BKE_report(op->reports, RPT_ERROR, result); diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 6d72ca99678..81791721015 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -654,7 +654,7 @@ int transformEvent(TransInfo *t, wmEvent *event) t->redraw |= TREDRAW_HARD; } else if (t->mode == TFM_TRANSLATION) { - if(t->options & CTX_MOVIECLIP) { + if (t->options & CTX_MOVIECLIP) { restoreTransObjects(t); t->flag ^= T_ALT_TRANSFORM; diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 75bd0de5d1a..5ee3e4bb96d 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -618,9 +618,8 @@ static void bone_children_clear_transflag(int mode, short around, ListBase *lb) { Bone *bone= lb->first; - for (;bone;bone= bone->next) { - if ((bone->flag & BONE_HINGE) && (bone->flag & BONE_CONNECTED)) - { + for ( ; bone;bone= bone->next) { + if ((bone->flag & BONE_HINGE) && (bone->flag & BONE_CONNECTED)) { bone->flag |= BONE_HINGE_CHILD_TRANSFORM; } else if ((bone->flag & BONE_TRANSFORM) && @@ -696,8 +695,7 @@ int count_set_pose_transflags(int *out_mode, short around, Object *ob) } /* if there are no translatable bones, do rotation */ - if (mode == TFM_TRANSLATION && !hastranslation) - { + if (mode == TFM_TRANSLATION && !hastranslation) { *out_mode = TFM_ROTATION; } @@ -1025,16 +1023,13 @@ static void createTransArmatureVerts(TransInfo *t) t->mode= TFM_BONE_ENVELOPE; t->total = 0; - for (ebo = edbo->first; ebo; ebo = ebo->next) - { - if (EBONE_VISIBLE(arm, ebo) && !(ebo->flag & BONE_EDITMODE_LOCKED)) - { - if (t->mode==TFM_BONESIZE) - { + for (ebo = edbo->first; ebo; ebo = ebo->next) { + if (EBONE_VISIBLE(arm, ebo) && !(ebo->flag & BONE_EDITMODE_LOCKED)) { + if (t->mode == TFM_BONESIZE) { if (ebo->flag & BONE_SELECTED) t->total++; } - else if (t->mode==TFM_BONE_ROLL) { + else if (t->mode == TFM_BONE_ROLL) { if (ebo->flag & BONE_SELECTED) t->total++; } @@ -1054,16 +1049,12 @@ static void createTransArmatureVerts(TransInfo *t) td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransEditBone"); - for (ebo = edbo->first; ebo; ebo = ebo->next) - { + for (ebo = edbo->first; ebo; ebo = ebo->next) { ebo->oldlength = ebo->length; // length==0.0 on extrude, used for scaling radius of bone points - if (EBONE_VISIBLE(arm, ebo) && !(ebo->flag & BONE_EDITMODE_LOCKED)) - { - if (t->mode==TFM_BONE_ENVELOPE) - { - if (ebo->flag & BONE_ROOTSEL) - { + if (EBONE_VISIBLE(arm, ebo) && !(ebo->flag & BONE_EDITMODE_LOCKED)) { + if (t->mode==TFM_BONE_ENVELOPE) { + if (ebo->flag & BONE_ROOTSEL) { td->val= &ebo->rad_head; td->ival= *td->val; @@ -1079,8 +1070,7 @@ static void createTransArmatureVerts(TransInfo *t) td++; } - if (ebo->flag & BONE_TIPSEL) - { + if (ebo->flag & BONE_TIPSEL) { td->val= &ebo->rad_tail; td->ival= *td->val; copy_v3_v3(td->center, ebo->tail); @@ -1099,8 +1089,7 @@ static void createTransArmatureVerts(TransInfo *t) } else if (t->mode==TFM_BONESIZE) { if (ebo->flag & BONE_SELECTED) { - if (arm->drawtype==ARM_ENVELOPE) - { + if (arm->drawtype==ARM_ENVELOPE) { td->loc= NULL; td->val= &ebo->dist; td->ival= ebo->dist; @@ -1130,8 +1119,7 @@ static void createTransArmatureVerts(TransInfo *t) } } else if (t->mode==TFM_BONE_ROLL) { - if (ebo->flag & BONE_SELECTED) - { + if (ebo->flag & BONE_SELECTED) { td->loc= NULL; td->val= &(ebo->roll); td->ival= ebo->roll; @@ -1146,8 +1134,7 @@ static void createTransArmatureVerts(TransInfo *t) } } else { - if (ebo->flag & BONE_TIPSEL) - { + if (ebo->flag & BONE_TIPSEL) { copy_v3_v3(td->iloc, ebo->tail); copy_v3_v3(td->center, (t->around==V3D_LOCAL) ? ebo->head : td->iloc); td->loc= ebo->tail; @@ -1161,8 +1148,7 @@ static void createTransArmatureVerts(TransInfo *t) sub_v3_v3v3(delta, ebo->tail, ebo->head); vec_roll_to_mat3(delta, ebo->roll, td->axismtx); - if ((ebo->flag & BONE_ROOTSEL) == 0) - { + if ((ebo->flag & BONE_ROOTSEL) == 0) { td->extra = ebo; } @@ -1172,8 +1158,7 @@ static void createTransArmatureVerts(TransInfo *t) td++; } - if (ebo->flag & BONE_ROOTSEL) - { + if (ebo->flag & BONE_ROOTSEL) { copy_v3_v3(td->iloc, ebo->head); copy_v3_v3(td->center, td->iloc); td->loc= ebo->head; @@ -1943,8 +1928,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t) char *selstate = NULL; short selectmode = ts->selectmode; - if (t->flag & T_MIRROR) - { + if (t->flag & T_MIRROR) { EDBM_verts_mirror_cache_begin(em, TRUE); mirror = 1; } @@ -2071,8 +2055,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t) eve = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL); for (a=0; eve; eve=BM_iter_step(&iter), a++) { if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN) && selstate[a] && eve->co[0]!=0.0f) { - if (eve->co[0]<0.0f) - { + if (eve->co[0] < 0.0f) { t->mirror = -1; mirror = -1; } @@ -2144,13 +2127,10 @@ static void createTransEditVerts(bContext *C, TransInfo *t) } } - if (mirror != 0) - { + if (mirror != 0) { tob = t->data; - for (a = 0; a < t->total; a++, tob++ ) - { - if (ABS(tob->loc[0]) <= 0.00001f) - { + for (a = 0; a < t->total; a++, tob++ ) { + if (ABS(tob->loc[0]) <= 0.00001f) { tob->flag |= TD_MIRROR_EDGE; } } diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index c15366c4976..32e4ff8d81c 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -914,10 +914,10 @@ void GPU_framebuffer_blur(GPUFrameBuffer *fb, GPUTexture *tex, GPUFrameBuffer *b /* Drawing quad */ glBegin(GL_QUADS); - glTexCoord2d(0,0);glVertex2f(1,1); - glTexCoord2d(1,0);glVertex2f(-1,1); - glTexCoord2d(1,1);glVertex2f(-1,-1); - glTexCoord2d(0,1);glVertex2f(1,-1); + glTexCoord2d(0, 0); glVertex2f(1, 1); + glTexCoord2d(1, 0); glVertex2f(-1, 1); + glTexCoord2d(1, 1); glVertex2f(-1, -1); + glTexCoord2d(0, 1); glVertex2f(1, -1); glEnd(); /* Blurring vertically */ @@ -927,12 +927,14 @@ void GPU_framebuffer_blur(GPUFrameBuffer *fb, GPUTexture *tex, GPUFrameBuffer *b GPU_shader_uniform_vector(blur_shader, scale_uniform, 2, 1, (float*)scalev); GPU_shader_uniform_texture(blur_shader, texture_source_uniform, blurtex); GPU_texture_bind(blurtex, 0); + glBegin(GL_QUADS); - glTexCoord2d(0,0);glVertex2f(1,1); - glTexCoord2d(1,0);glVertex2f(-1,1); - glTexCoord2d(1,1);glVertex2f(-1,-1); - glTexCoord2d(0,1);glVertex2f(1,-1); + glTexCoord2d(0, 0); glVertex2f(1, 1); + glTexCoord2d(1, 0); glVertex2f(-1, 1); + glTexCoord2d(1, 1); glVertex2f(-1, -1); + glTexCoord2d(0, 1); glVertex2f(1, -1); glEnd(); + GPU_shader_unbind(blur_shader); } @@ -1267,18 +1269,17 @@ GPUShader *GPU_shader_get_builtin_shader(GPUBuiltinShader shader) { GPUShader *retval = NULL; - switch (shader) - { - case GPU_SHADER_VSM_STORE: - if (!GG.shaders.vsm_store) - GG.shaders.vsm_store = GPU_shader_create(datatoc_gpu_shader_vsm_store_vert_glsl, datatoc_gpu_shader_vsm_store_frag_glsl, NULL); - retval = GG.shaders.vsm_store; - break; - case GPU_SHADER_SEP_GAUSSIAN_BLUR: - if (!GG.shaders.sep_gaussian_blur) - GG.shaders.sep_gaussian_blur = GPU_shader_create(datatoc_gpu_shader_sep_gaussian_blur_vert_glsl, datatoc_gpu_shader_sep_gaussian_blur_frag_glsl, NULL); - retval = GG.shaders.sep_gaussian_blur; - break; + switch (shader) { + case GPU_SHADER_VSM_STORE: + if (!GG.shaders.vsm_store) + GG.shaders.vsm_store = GPU_shader_create(datatoc_gpu_shader_vsm_store_vert_glsl, datatoc_gpu_shader_vsm_store_frag_glsl, NULL); + retval = GG.shaders.vsm_store; + break; + case GPU_SHADER_SEP_GAUSSIAN_BLUR: + if (!GG.shaders.sep_gaussian_blur) + GG.shaders.sep_gaussian_blur = GPU_shader_create(datatoc_gpu_shader_sep_gaussian_blur_vert_glsl, datatoc_gpu_shader_sep_gaussian_blur_frag_glsl, NULL); + retval = GG.shaders.sep_gaussian_blur; + break; } if (retval == NULL) @@ -1289,14 +1290,12 @@ GPUShader *GPU_shader_get_builtin_shader(GPUBuiltinShader shader) void GPU_shader_free_builtin_shaders() { - if (GG.shaders.vsm_store) - { + if (GG.shaders.vsm_store) { MEM_freeN(GG.shaders.vsm_store); GG.shaders.vsm_store = NULL; } - if (GG.shaders.sep_gaussian_blur) - { + if (GG.shaders.sep_gaussian_blur) { MEM_freeN(GG.shaders.sep_gaussian_blur); GG.shaders.sep_gaussian_blur = NULL; } diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 5f046806beb..173fbf02287 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -327,10 +327,11 @@ void GPU_material_bind_uniforms(GPUMaterial *material, float obmat[][4], float v mul_m4_v3(viewmat, lamp->dynco); } - if (material->dynproperty & DYN_LAMP_IMAT) + if (material->dynproperty & DYN_LAMP_IMAT) { mult_m4_m4m4(lamp->dynimat, lamp->imat, viewinv); - if (material->dynproperty & DYN_LAMP_PERSMAT) - { + } + + if (material->dynproperty & DYN_LAMP_PERSMAT) { if (!GPU_lamp_has_shadow_buffer(lamp)) /* The lamp matrices are already updated if we're using shadow buffers */ GPU_lamp_update_buffer_mats(lamp); mult_m4_m4m4(lamp->dynpersmat, lamp->persmat, viewinv); @@ -1611,7 +1612,7 @@ static void gpu_lamp_from_blender(Scene *scene, Object *ob, Object *par, Lamp *l /* makeshadowbuf */ if (lamp->type == LA_SUN) { wsize = la->shadow_frustum_size; - orthographic_m4( lamp->winmat,-wsize, wsize, -wsize, wsize, lamp->d, lamp->clipend); + orthographic_m4(lamp->winmat, -wsize, wsize, -wsize, wsize, lamp->d, lamp->clipend); } else { angle= saacos(lamp->spotsi); @@ -1636,11 +1637,11 @@ static void gpu_lamp_shadow_free(GPULamp *lamp) GPU_framebuffer_free(lamp->fb); lamp->fb= NULL; } - if(lamp->blurtex) { + if (lamp->blurtex) { GPU_texture_free(lamp->blurtex); lamp->blurtex= NULL; } - if(lamp->blurfb) { + if (lamp->blurfb) { GPU_framebuffer_free(lamp->blurfb); lamp->blurfb= NULL; } @@ -1721,7 +1722,7 @@ GPULamp *GPU_lamp_from_blender(Scene *scene, Object *ob, Object *par) } else { lamp->tex = GPU_texture_create_depth(lamp->size, lamp->size, NULL); - if(!lamp->tex) { + if (!lamp->tex) { gpu_lamp_shadow_free(lamp); return lamp; } @@ -1814,7 +1815,7 @@ void GPU_lamp_shadow_buffer_bind(GPULamp *lamp, float viewmat[][4], int *winsize glDisable(GL_SCISSOR_TEST); GPU_framebuffer_texture_bind(lamp->fb, lamp->tex, GPU_texture_opengl_width(lamp->tex), GPU_texture_opengl_height(lamp->tex)); - if(lamp->la->shadowmap_type == LA_SHADMAP_VARIANCE) + if (lamp->la->shadowmap_type == LA_SHADMAP_VARIANCE) GPU_shader_bind(GPU_shader_get_builtin_shader(GPU_SHADER_VSM_STORE)); /* set matrices */ @@ -1825,7 +1826,7 @@ void GPU_lamp_shadow_buffer_bind(GPULamp *lamp, float viewmat[][4], int *winsize void GPU_lamp_shadow_buffer_unbind(GPULamp *lamp) { - if(lamp->la->shadowmap_type == LA_SHADMAP_VARIANCE) { + if (lamp->la->shadowmap_type == LA_SHADMAP_VARIANCE) { GPU_shader_unbind(GPU_shader_get_builtin_shader(GPU_SHADER_VSM_STORE)); GPU_framebuffer_blur(lamp->fb, lamp->tex, lamp->blurfb, lamp->blurtex); } diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index e2a956f0dba..2fd259d2816 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -239,7 +239,7 @@ static int imb_tiff_CloseProc(thandle_t handle) /* get the pointer to the in-memory file */ mfile = IMB_TIFF_GET_MEMFILE(handle); if (!mfile || !mfile->mem) { - fprintf(stderr,"imb_tiff_CloseProc: !mfile || !mfile->mem!\n"); + fprintf(stderr, "imb_tiff_CloseProc: !mfile || !mfile->mem!\n"); return (0); } @@ -265,7 +265,7 @@ static toff_t imb_tiff_SizeProc(thandle_t handle) /* get the pointer to the in-memory file */ mfile = IMB_TIFF_GET_MEMFILE(handle); if (!mfile || !mfile->mem) { - fprintf(stderr,"imb_tiff_SizeProc: !mfile || !mfile->mem!\n"); + fprintf(stderr, "imb_tiff_SizeProc: !mfile || !mfile->mem!\n"); return (0); } diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index 22001cf6bae..88bab4d5af3 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -95,8 +95,7 @@ static int rna_use_shadow_get(PointerRNA *ptr) static void rna_use_shadow_set(PointerRNA *ptr, int value) { Lamp *la = (Lamp*)ptr->data; - if (value) - { + if (value) { la->mode |= LA_SHAD_BUF; la->mode &= ~LA_SHAD_RAY; } @@ -495,7 +494,7 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area) {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem prop_shadbuffiltertype_items[] = { - {LA_SHADBUF_BOX , "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples"}, + {LA_SHADBUF_BOX, "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples"}, {LA_SHADBUF_TENT, "TENT", 0, "Tent", "Apply the Tent Filter to shadow buffer samples"}, {LA_SHADBUF_GAUSS, "GAUSS", 0, "Gauss", "Apply the Gauss filter to shadow buffer samples"}, {0, NULL, 0, NULL, NULL}}; diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index ba927a1c739..986c76db199 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1924,7 +1924,7 @@ void rna_def_render_layer_common(StructRNA *srna, int scene) if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); - if(scene) { + if (scene) { prop = RNA_def_property(srna, "samples", PROP_INT, PROP_UNSIGNED); RNA_def_property_ui_text(prop, "Samples", "Override number of render samples for this render layer, 0 will use the scene setting"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); diff --git a/source/blender/modifiers/intern/MOD_particlesystem.c b/source/blender/modifiers/intern/MOD_particlesystem.c index d93779fc07d..dc1429208a0 100644 --- a/source/blender/modifiers/intern/MOD_particlesystem.c +++ b/source/blender/modifiers/intern/MOD_particlesystem.c @@ -226,7 +226,7 @@ ModifierTypeInfo modifierType_ParticleSystem = { /* copyData */ copyData, /* deformVerts */ deformVerts, - /* deformVertsEM */ NULL /* deformVertsEM */ , + /* deformVertsEM */ NULL, /* deformMatrices */ NULL, /* deformMatricesEM */ NULL, /* applyModifier */ NULL, diff --git a/source/blender/nodes/composite/nodes/node_composite_diffMatte.c b/source/blender/nodes/composite/nodes/node_composite_diffMatte.c index dd09bc5d0d4..c7fbcb46c23 100644 --- a/source/blender/nodes/composite/nodes/node_composite_diffMatte.c +++ b/source/blender/nodes/composite/nodes/node_composite_diffMatte.c @@ -34,15 +34,15 @@ /* ******************* channel Difference Matte ********************************* */ static bNodeSocketTemplate cmp_node_diff_matte_in[]={ - {SOCK_RGBA,1,"Image 1", 1.0f, 1.0f, 1.0f, 1.0f}, - {SOCK_RGBA,1,"Image 2", 1.0f, 1.0f, 1.0f, 1.0f}, - {-1,0,""} + {SOCK_RGBA, 1, "Image 1", 1.0f, 1.0f, 1.0f, 1.0f}, + {SOCK_RGBA, 1, "Image 2", 1.0f, 1.0f, 1.0f, 1.0f}, + {-1, 0, ""} }; static bNodeSocketTemplate cmp_node_diff_matte_out[]={ - {SOCK_RGBA,0,"Image"}, - {SOCK_FLOAT,0,"Matte"}, - {-1,0,""} + {SOCK_RGBA, 0, "Image"}, + {SOCK_FLOAT, 0, "Matte"}, + {-1, 0, ""} }; static void do_diff_matte(bNode *node, float *outColor, float *inColor1, float *inColor2) @@ -65,10 +65,10 @@ static void do_diff_matte(bNode *node, float *outColor, float *inColor1, float * copy_v3_v3(outColor, inColor1); if (difference <= tolerence) { - if(difference<=falloff) { - alpha=0.0f; + if (difference <= falloff) { + alpha = 0.0f; } - else{ + else { /* alpha as percent (distance / tolerance), each modified by falloff amount (in pixels)*/ alpha=(difference-falloff)/(tolerence-falloff); } @@ -77,9 +77,9 @@ static void do_diff_matte(bNode *node, float *outColor, float *inColor1, float * maxInputAlpha=maxf(inColor1[3], inColor2[3]); if (alpha < maxInputAlpha) { /*clamp*/ - if(alpha<0.0f) alpha=0.0f; - if(alpha>1.0f) alpha=1.0f; - outColor[3]=alpha; + if (alpha < 0.0f) alpha = 0.0f; + if (alpha > 1.0f) alpha = 1.0f; + outColor[3] = alpha; } else { /* leave as before */ outColor[3]=maxInputAlpha; diff --git a/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c b/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c index a485210e37e..1976aa45eed 100644 --- a/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c +++ b/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c @@ -34,15 +34,15 @@ /* ******************* channel Distance Matte ********************************* */ static bNodeSocketTemplate cmp_node_distance_matte_in[]={ - {SOCK_RGBA,1,"Image", 1.0f, 1.0f, 1.0f, 1.0f}, - {SOCK_RGBA,1,"Key Color", 1.0f, 1.0f, 1.0f, 1.0f}, - {-1,0,""} + {SOCK_RGBA, 1, "Image", 1.0f, 1.0f, 1.0f, 1.0f}, + {SOCK_RGBA, 1, "Key Color", 1.0f, 1.0f, 1.0f, 1.0f}, + {-1, 0, ""} }; static bNodeSocketTemplate cmp_node_distance_matte_out[]={ - {SOCK_RGBA,0,"Image"}, - {SOCK_FLOAT,0,"Matte"}, - {-1,0,""} + {SOCK_RGBA, 0, "Image"}, + {SOCK_FLOAT, 0, "Matte"}, + {-1, 0, ""} }; /* note, keyvals is passed on from caller as stack array */ @@ -64,10 +64,10 @@ static void do_distance_matte(bNode *node, float *out, float *in) copy_v3_v3(out, in); if (distance <= tolerence) { - if(distance<=falloff) { - alpha=0.0f; + if (distance <= falloff) { + alpha = 0.0f; } - else{ + else { /* alpha as percent (distance / tolerance), each modified by falloff amount (in pixels)*/ alpha=(distance-falloff)/(tolerence-falloff); } @@ -75,8 +75,8 @@ static void do_distance_matte(bNode *node, float *out, float *in) /*only change if more transparent than before */ if (alpha < in[3]) { /*clamp*/ - if(alpha<0.0f) alpha=0.0f; - if(alpha>1.0f) alpha=1.0f; + if (alpha < 0.0f) alpha = 0.0f; + if (alpha > 1.0f) alpha = 1.0f; out[3]=alpha; } else { /* leave as before */ @@ -115,10 +115,10 @@ static void do_chroma_distance_matte(bNode *node, float *out, float *in) copy_v3_v3(out, in); if (distance <= tolerence) { - if(distance<=falloff) { - alpha=0.0f; + if (distance <= falloff) { + alpha = 0.0f; } - else{ + else { /* alpha as percent (distance / tolerance), each modified by falloff amount (in pixels)*/ alpha=(distance-falloff)/(tolerence-falloff); } @@ -126,8 +126,8 @@ static void do_chroma_distance_matte(bNode *node, float *out, float *in) /*only change if more transparent than before */ if (alpha < in[3]) { /*clamp*/ - if(alpha<0.0f) alpha=0.0f; - if(alpha>1.0f) alpha=1.0f; + if (alpha < 0.0f) alpha = 0.0f; + if (alpha > 1.0f) alpha = 1.0f; out[3]=alpha; } else { /* leave as before */ @@ -162,7 +162,7 @@ static void node_composit_exec_distance_matte(void *data, bNode *node, bNodeStac c->key[2]= in[1]->vec[2]; /* work in RGB color space */ - if(c->channel==1) { + if (c->channel == 1) { /* note, processor gets a keyvals array passed on as buffer constant */ composit1_pixel_processor(node, workbuf, workbuf, in[0]->vec, do_distance_matte, CB_RGBA); } diff --git a/source/blender/render/intern/source/sunsky.c b/source/blender/render/intern/source/sunsky.c index 5d0e7c1d4c8..111ec75dd27 100644 --- a/source/blender/render/intern/source/sunsky.c +++ b/source/blender/render/intern/source/sunsky.c @@ -484,7 +484,7 @@ void AtmospherePixleShader(struct SunSky* sunSky, float view[3], float s, float FOPVEC3(vTemp2, 1.0f, -, E1); VEC3OPV(vTemp1, vTemp1, *, vTemp2); - FOPVEC3(vTemp2, 1.0f, / , sunSky->atm_BetaRM); + FOPVEC3(vTemp2, 1.0f, /, sunSky->atm_BetaRM); VEC3OPV(I, vTemp1, *, vTemp2); diff --git a/source/creator/creator.c b/source/creator/creator.c index 13daeec87be..c28f72881cf 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -1322,8 +1322,7 @@ int main(int argc, const char **argv) BLI_argsFree(ba); #ifdef WIN32 - while (argci) - { + while (argci) { free(argv[--argci]); } MEM_freeN(argv); diff --git a/source/gameengine/Ketsji/KX_VertexProxy.cpp b/source/gameengine/Ketsji/KX_VertexProxy.cpp index 1739f26ab6f..d489c015273 100644 --- a/source/gameengine/Ketsji/KX_VertexProxy.cpp +++ b/source/gameengine/Ketsji/KX_VertexProxy.cpp @@ -500,7 +500,7 @@ PyObject* KX_VertexProxy::PyGetRGBA() PyObject* KX_VertexProxy::PySetRGBA(PyObject* value) { - if PyLong_Check(value) { + if (PyLong_Check(value)) { int rgba = PyLong_AsSsize_t(value); m_vertex->SetRGBA(rgba); m_mesh->SetMeshModified(true); diff --git a/source/gameengine/Rasterizer/RAS_IRasterizer.h b/source/gameengine/Rasterizer/RAS_IRasterizer.h index 592ddbe07d3..d6c9ddd9603 100644 --- a/source/gameengine/Rasterizer/RAS_IRasterizer.h +++ b/source/gameengine/Rasterizer/RAS_IRasterizer.h @@ -386,7 +386,7 @@ public: */ virtual void SetPolygonOffset(float mult, float add) = 0; - virtual void DrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color)=0; + virtual void DrawDebugLine(const MT_Vector3& from, const MT_Vector3& to, const MT_Vector3& color)=0; virtual void DrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color, const MT_Vector3& normal, int nsector)=0; virtual void FlushDebugShapes()=0; |