Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-06-17 13:58:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-17 13:58:26 +0400
commitf5f25b81e8963aeba0a4c09f09358de070e0f927 (patch)
treec7fd6345d3a372845a0621e90087f88c90e4b8b8 /source
parent245c94a75e60c2c0b58c1f39d189258e2e424e29 (diff)
style cleanup:
also fix for building ghost test and fix double free in one of the tests
Diffstat (limited to 'source')
-rw-r--r--source/blender/avi/intern/avi.c4
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.c4
-rw-r--r--source/blender/blenkernel/intern/cloth.c12
-rw-r--r--source/blender/blenkernel/intern/collision.c4
-rw-r--r--source/blender/blenkernel/intern/curve.c2
-rw-r--r--source/blender/blenkernel/intern/implicit.c6
-rw-r--r--source/blender/blenkernel/intern/lattice.c2
-rw-r--r--source/blender/blenkernel/intern/mesh.c4
-rw-r--r--source/blender/blenkernel/intern/particle_system.c2
-rw-r--r--source/blender/blenkernel/intern/smoke.c2
-rw-r--r--source/blender/blenlib/intern/string_utf8.c2
-rw-r--r--source/blender/blenlib/intern/threads.c6
-rw-r--r--source/blender/blenlib/intern/voronoi.c32
-rw-r--r--source/blender/collada/AnimationExporter.cpp2
-rw-r--r--source/blender/collada/MaterialExporter.cpp2
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.cpp2
-rw-r--r--source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp2
-rw-r--r--source/blender/editors/animation/keyframes_general.c2
-rw-r--r--source/blender/editors/interface/interface_draw.c8
-rw-r--r--source/blender/editors/interface/interface_icons.c2
-rw-r--r--source/blender/editors/interface/resources.c3
-rw-r--r--source/blender/editors/object/object_lattice.c4
-rw-r--r--source/blender/editors/screen/screen_ops.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c4
-rw-r--r--source/blender/editors/space_image/space_image.c2
-rw-r--r--source/blender/editors/space_node/drawnode.c16
-rw-r--r--source/blender/editors/space_text/text_draw.c2
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c4
-rw-r--r--source/blender/editors/transform/transform_snap.c2
-rw-r--r--source/blender/gpu/intern/gpu_draw.c4
-rw-r--r--source/blender/makesrna/intern/rna_nodetree_types.h10
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c10
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c6
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_mask.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_particle_info.c12
-rw-r--r--source/blender/nodes/texture/node_texture_util.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_coord.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_hueSatVal.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_texture.c2
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.c2
-rw-r--r--source/blender/render/intern/source/volumetric.c4
-rw-r--r--source/blender/render/intern/source/zbuf.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c4
-rw-r--r--source/blender/windowmanager/intern/wm_window.c4
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp4
-rw-r--r--source/gameengine/Converter/KX_ConvertActuators.cpp2
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h2
-rw-r--r--source/gameengine/GameLogic/SCA_ILogicBrick.h7
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.cpp3
-rw-r--r--source/gameengine/Ketsji/BL_Shader.cpp10
-rw-r--r--source/gameengine/Ketsji/KX_BlenderMaterial.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_BulletPhysicsController.h2
-rw-r--r--source/gameengine/Ketsji/KX_Dome.cpp10
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp20
-rw-r--r--source/gameengine/Ketsji/KX_PyMath.h13
-rw-r--r--source/gameengine/Ketsji/KX_RadarSensor.cpp14
-rw-r--r--source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp2
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp4
59 files changed, 161 insertions, 157 deletions
diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c
index e00982bae72..3d04db56d43 100644
--- a/source/blender/avi/intern/avi.c
+++ b/source/blender/avi/intern/avi.c
@@ -452,7 +452,7 @@ AviError AVI_open_movie(const char *name, AviMovie *movie)
return AVI_ERROR_FORMAT;
}
- movie->header = (AviMainHeader *) MEM_mallocN(sizeof (AviMainHeader), "movieheader");
+ movie->header = (AviMainHeader *) MEM_mallocN(sizeof(AviMainHeader), "movieheader");
if (GET_FCC(movie->fp) != FCC("AVI ") ||
GET_FCC(movie->fp) != FCC("LIST") ||
@@ -769,7 +769,7 @@ AviError AVI_open_compress(char *name, AviMovie *movie, int streams, ...)
if (movie->fp == NULL)
return AVI_ERROR_OPEN;
- movie->offset_table = (int64_t *) MEM_mallocN((1 + streams * 2) * sizeof (int64_t), "offsettable");
+ movie->offset_table = (int64_t *) MEM_mallocN((1 + streams * 2) * sizeof(int64_t), "offsettable");
for (i = 0; i < 1 + streams * 2; i++)
movie->offset_table[i] = -1L;
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index d26a722b628..48dbd590cfe 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -1878,8 +1878,8 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
/* r = co * 0.75 + q * 0.25 */
VertDataCopy(r, co, ss);
- VertDataMulN(r, .75f, ss);
- VertDataMulN(q, .25f, ss);
+ VertDataMulN(r, 0.75f, ss);
+ VertDataMulN(q, 0.25f, ss);
VertDataAdd(r, q, ss);
/* nCo = nCo + (r - nCo) * avgSharpness */
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index b681426f8a7..a0cca25a841 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -1007,7 +1007,7 @@ int cloth_add_spring(ClothModifierData *clmd, unsigned int indexA, unsigned int
if (cloth) {
// TODO: look if this spring is already there
- spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
+ spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
if (!spring)
return 0;
@@ -1079,7 +1079,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
cloth->springs = NULL;
- edgelist = MEM_callocN ( sizeof ( LinkNode * ) * numverts, "cloth_edgelist_alloc" );
+ edgelist = MEM_callocN ( sizeof (LinkNode *) * numverts, "cloth_edgelist_alloc" );
if (!edgelist)
return 0;
@@ -1096,7 +1096,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
// structural springs
for ( i = 0; i < numedges; i++ ) {
- spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
+ spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
if ( spring ) {
spring->ij = MIN2(medge[i].v1, medge[i].v2);
@@ -1154,7 +1154,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
// if ( mface[i].v4 ) --> Quad face
- spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
+ spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
if (!spring) {
cloth_free_errorsprings(cloth, edgehash, edgelist);
@@ -1192,7 +1192,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
if (!BLI_edgehash_haskey(edgehash, MIN2(tspring2->ij, index2), MAX2(tspring2->ij, index2)) &&
(index2 != tspring2->ij))
{
- spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
+ spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
if (!spring) {
cloth_free_errorsprings(cloth, edgehash, edgelist);
@@ -1229,7 +1229,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
tspring2 = search2->link;
if (tspring->ij == tspring2->kl) {
- spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
+ spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
if (!spring) {
cloth_free_errorsprings(cloth, edgehash, edgelist);
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index 44f524304d2..71b2f6952d5 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -643,12 +643,12 @@ static void cloth_bvh_objcollisions_nearcheck ( ClothModifierData * clmd, Collis
{
int i;
- *collisions = ( CollPair* ) MEM_mallocN ( sizeof ( CollPair ) * numresult * 64, "collision array" ); //*4 since cloth_collision_static can return more than 1 collision
+ *collisions = (CollPair *) MEM_mallocN(sizeof(CollPair) * numresult * 64, "collision array" ); //*4 since cloth_collision_static can return more than 1 collision
*collisions_index = *collisions;
for ( i = 0; i < numresult; i++ ) {
*collisions_index = cloth_collision ( (ModifierData *)clmd, (ModifierData *)collmd,
- overlap+i, *collisions_index, dt );
+ overlap+i, *collisions_index, dt );
}
}
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 623d4b8a931..674a2d98d07 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -1713,7 +1713,7 @@ static void calc_bevel_sin_cos(float x1, float y1, float x2, float y2, float *si
t02 = x1 * x2 + y1 * y2;
if (fabs(t02) >= 1.0)
- t02 = .5 * M_PI;
+ t02 = 0.5 * M_PI;
else
t02 = (saacos(t02)) / 2.0f;
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index 4aef47159df..4755fccff99 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -186,7 +186,7 @@ DO_INLINE void print_lfvector(float (*fLongVector)[3], unsigned int verts)
DO_INLINE lfVector *create_lfvector(unsigned int verts)
{
// TODO: check if memory allocation was successfull */
- return (lfVector *)MEM_callocN (verts * sizeof(lfVector), "cloth_implicit_alloc_vector");
+ return (lfVector *)MEM_callocN(verts * sizeof(lfVector), "cloth_implicit_alloc_vector");
// return (lfVector *)cloth_aligned_malloc(&MEMORY_BASE, verts * sizeof(lfVector));
}
/* delete long vector */
@@ -514,7 +514,7 @@ static void print_bfmatrix(fmatrix3x3 *m3)
DO_INLINE fmatrix3x3 *create_bfmatrix(unsigned int verts, unsigned int springs)
{
// TODO: check if memory allocation was successfull */
- fmatrix3x3 *temp = (fmatrix3x3 *)MEM_callocN (sizeof (fmatrix3x3) * (verts + springs), "cloth_implicit_alloc_matrix");
+ fmatrix3x3 *temp = (fmatrix3x3 *)MEM_callocN(sizeof(fmatrix3x3) * (verts + springs), "cloth_implicit_alloc_matrix");
temp[0].vcount = verts;
temp[0].scount = springs;
return temp;
@@ -720,7 +720,7 @@ int implicit_init(Object *UNUSED(ob), ClothModifierData *clmd)
verts = cloth->verts;
// create implicit base
- id = (Implicit_Data *)MEM_callocN (sizeof(Implicit_Data), "implicit vecmat");
+ id = (Implicit_Data *)MEM_callocN(sizeof(Implicit_Data), "implicit vecmat");
cloth->implicit = id;
/* process diagonal elements */
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index e3495a15871..d5b1d3c98c8 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -212,7 +212,7 @@ Lattice *BKE_lattice_copy(Lattice *lt)
if (lt->dvert) {
int tot = lt->pntsu * lt->pntsv * lt->pntsw;
- ltn->dvert = MEM_mallocN(sizeof (MDeformVert) * tot, "Lattice MDeformVert");
+ ltn->dvert = MEM_mallocN(sizeof(MDeformVert) * tot, "Lattice MDeformVert");
copy_dverts(ltn->dvert, lt->dvert, tot);
}
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index d0b9e73e295..e3b13ca0f17 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -444,7 +444,7 @@ void copy_dverts(MDeformVert *dst, MDeformVert *src, int copycount)
for (i = 0; i < copycount; i++) {
if (src[i].dw) {
dst[i].dw = MEM_callocN(sizeof(MDeformWeight) * src[i].totweight, "copy_deformWeight");
- memcpy(dst[i].dw, src[i].dw, sizeof (MDeformWeight) * src[i].totweight);
+ memcpy(dst[i].dw, src[i].dw, sizeof(MDeformWeight) * src[i].totweight);
}
}
@@ -957,7 +957,7 @@ static void make_edges_mdata(MVert *UNUSED(allvert), MFace *allface, MLoop *alll
}
final++;
- (*alledge) = medge = MEM_callocN(sizeof (MEdge) * final, "BKE_mesh_make_edges mdge");
+ (*alledge) = medge = MEM_callocN(sizeof(MEdge) * final, "BKE_mesh_make_edges mdge");
(*_totedge) = final;
for (a = totedge, ed = edsort; a > 1; a--, ed++) {
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 6c7336958b5..569e69f2d51 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -4114,7 +4114,7 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra))
if (ptype&readMask) {
activeParts++;
- gzread(gzf, &(pa->size), sizeof( float ));
+ gzread(gzf, &(pa->size), sizeof(float));
pa->size /= 10.0f;
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index ebc31517524..32def1be647 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -1856,7 +1856,7 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
BKE_ptcache_write(&pid, framenr);
tend();
- // printf ( "Frame: %d, Time: %f\n\n", (int)smd->time, ( float ) tval() );
+ // printf ( "Frame: %d, Time: %f\n\n", (int)smd->time, (float) tval() );
}
}
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index 9795d4dea2d..ff234a971aa 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -211,7 +211,7 @@ size_t BLI_strncpy_wchar_as_utf8(char *dst, const wchar_t *src, const size_t max
{
size_t len = 0;
while (*src && len < maxcpy) { /* XXX can still run over the buffer because utf8 size isn't known :| */
- len += BLI_str_utf8_from_unicode(*src++, dst+len);
+ len += BLI_str_utf8_from_unicode(*src++, dst + len);
}
dst[len]= '\0';
diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c
index 201417b65d6..d591f98ddc0 100644
--- a/source/blender/blenlib/intern/threads.c
+++ b/source/blender/blenlib/intern/threads.c
@@ -576,7 +576,7 @@ void *BLI_thread_queue_pop(ThreadQueue *queue)
if (!BLI_gsqueue_is_empty(queue->queue)) {
BLI_gsqueue_pop(queue->queue, &work);
- if(BLI_gsqueue_is_empty(queue->queue))
+ if (BLI_gsqueue_is_empty(queue->queue))
pthread_cond_broadcast(&queue->finish_cond);
}
@@ -642,7 +642,7 @@ void *BLI_thread_queue_pop_timeout(ThreadQueue *queue, int ms)
if (!BLI_gsqueue_is_empty(queue->queue)) {
BLI_gsqueue_pop(queue->queue, &work);
- if(BLI_gsqueue_is_empty(queue->queue))
+ if (BLI_gsqueue_is_empty(queue->queue))
pthread_cond_broadcast(&queue->finish_cond);
}
@@ -678,7 +678,7 @@ void BLI_thread_queue_wait_finish(ThreadQueue *queue)
/* wait for finish condition */
pthread_mutex_lock(&queue->mutex);
- while(!BLI_gsqueue_is_empty(queue->queue))
+ while (!BLI_gsqueue_is_empty(queue->queue))
pthread_cond_wait(&queue->finish_cond, &queue->mutex);
pthread_mutex_unlock(&queue->mutex);
diff --git a/source/blender/blenlib/intern/voronoi.c b/source/blender/blenlib/intern/voronoi.c
index 0088d24d741..727e42dc8de 100644
--- a/source/blender/blenlib/intern/voronoi.c
+++ b/source/blender/blenlib/intern/voronoi.c
@@ -49,10 +49,10 @@ enum {
typedef struct VoronoiEvent {
struct VoronoiEvent *next, *prev;
- int type; /* type of event (site or circle) */
- float site[2]; /* site for which event was generated */
+ int type; /* type of event (site or circle) */
+ float site[2]; /* site for which event was generated */
- struct VoronoiParabola *parabola; /* parabola for which event was generated */
+ struct VoronoiParabola *parabola; /* parabola for which event was generated */
} VoronoiEvent;
typedef struct VoronoiParabola {
@@ -254,9 +254,9 @@ static float voronoi_getXOfEdge(VoronoiProcess *process, VoronoiParabola *par, f
b = b1 - b2;
c = c1 - c2;
- disc = b*b - 4 * a * c;
- x1 = (-b + sqrtf(disc)) / (2*a);
- x2 = (-b - sqrtf(disc)) / (2*a);
+ disc = b * b - 4 * a * c;
+ x1 = (-b + sqrtf(disc)) / (2 * a);
+ x2 = (-b - sqrtf(disc)) / (2 * a);
if (p[1] < r[1])
ry = MAX2(x1, x2);
@@ -268,7 +268,7 @@ static float voronoi_getXOfEdge(VoronoiProcess *process, VoronoiParabola *par, f
static VoronoiParabola *voronoi_getParabolaByX(VoronoiProcess *process, float xx)
{
- VoronoiParabola * par = process->root;
+ VoronoiParabola *par = process->root;
float x = 0.0f;
float ly = process->current_y;
@@ -371,7 +371,7 @@ static void voronoi_addParabola(VoronoiProcess *process, float site[2])
s[0] = (site[0] + fp[0]) / 2.0f;
s[1] = process->height;
- if(site[0] > fp[0])
+ if (site[0] > fp[0])
root->edge = voronoiEdge_new(s, fp, site);
else
root->edge = voronoiEdge_new(s, site, fp);
@@ -506,12 +506,12 @@ void voronoi_finishEdge(VoronoiProcess *process, VoronoiParabola *parabola)
void voronoi_clampEdgeVertex(int width, int height, float *coord, float *other_coord)
{
const float corners[4][2] = {{0.0f, 0.0f},
- {width - 1, 0.0f},
- {width - 1, height - 1},
- {0.0f, height - 1}};
+ {width - 1, 0.0f},
+ {width - 1, height - 1},
+ {0.0f, height - 1}};
int i;
- if (IN_RANGE_INCL(coord[0], 0, width-1) && IN_RANGE_INCL(coord[1], 0, height-1)) {
+ if (IN_RANGE_INCL(coord[0], 0, width - 1) && IN_RANGE_INCL(coord[1], 0, height - 1)) {
return;
}
@@ -609,9 +609,9 @@ static int voronoi_getNextSideCoord(ListBase *edges, float coord[2], int dim, in
static void voronoi_createBoundaryEdges(ListBase *edges, int width, int height)
{
const float corners[4][2] = {{width - 1, 0.0f},
- {width - 1, height - 1},
- {0.0f, height - 1},
- {0.0f, 0.0f}};
+ {width - 1, height - 1},
+ {0.0f, height - 1},
+ {0.0f, 0.0f}};
int i, dim = 0, dir = 1;
float coord[2] = {0.0f, 0.0f};
@@ -756,7 +756,7 @@ static void voronoi_addTriangle(int v1, int v2, int v3, int (**triangles)[3], in
*triangles = MEM_callocN(sizeof(int[3]), "trianglulation triangles");
}
- triangle = (int*)&(*triangles)[(*triangles_total)];
+ triangle = (int *)&(*triangles)[(*triangles_total)];
triangle[0] = v1;
triangle[1] = v2;
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index 9582da4fe5c..57829f777c5 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -1114,7 +1114,7 @@ bool AnimationExporter::hasAnimations(Scene *sce)
{
LinkNode *node;
- for(node=this->export_settings->export_set; node; node=node->next) {
+ for (node=this->export_settings->export_set; node; node=node->next) {
Object *ob = (Object *)node->link;
FCurve *fcu = 0;
diff --git a/source/blender/collada/MaterialExporter.cpp b/source/blender/collada/MaterialExporter.cpp
index ef22a76d28e..07e11183dd0 100644
--- a/source/blender/collada/MaterialExporter.cpp
+++ b/source/blender/collada/MaterialExporter.cpp
@@ -49,7 +49,7 @@ void MaterialsExporter::exportMaterials(Scene *sce)
bool MaterialsExporter::hasMaterials(Scene *sce)
{
LinkNode *node;
- for(node=this->export_settings->export_set; node; node = node->next) {
+ for (node=this->export_settings->export_set; node; node = node->next) {
Object *ob = (Object *)node->link;
int a;
for (a = 0; a < ob->totcol; a++) {
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp
index 80396af895d..a410c28f47d 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cpp
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp
@@ -231,7 +231,7 @@ void WorkScheduler::initialize()
cl_platform_id platform = platforms[indexPlatform];
cl_uint numberOfDevices;
clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 0, 0, &numberOfDevices);
- clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, numberOfDevices, cldevices + numberOfDevicesReceived * sizeof (cl_device_id), 0);
+ clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, numberOfDevices, cldevices + numberOfDevicesReceived * sizeof(cl_device_id), 0);
numberOfDevicesReceived += numberOfDevices;
}
if (totalNumberOfDevices > 0) {
diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
index ba54c8ad9d6..8344a4d248b 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
@@ -1216,7 +1216,7 @@ void DoubleEdgeMaskOperation::doDoubleEdgeMask(float *imask, float *omask, float
gsz = rsize[2]; // by the do_*EdgeDetection() function.
fsz = gsz + isz + osz; // calculate size of pixel index buffer needed
- gbuf = (unsigned short *)MEM_callocN(sizeof (unsigned short) * fsz * 2, "DEM"); // allocate edge/gradient pixel index buffer
+ gbuf = (unsigned short *)MEM_callocN(sizeof(unsigned short) * fsz * 2, "DEM"); // allocate edge/gradient pixel index buffer
do_createEdgeLocationBuffer(t, rw, lres, res, gbuf, &innerEdgeOffset, &outerEdgeOffset, isz, gsz);
do_fillGradientBuffer(rw, res, gbuf, isz, osz, gsz, innerEdgeOffset, outerEdgeOffset);
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index a8f8d2974e5..3883dce7671 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -156,7 +156,7 @@ void duplicate_fcurve_keys(FCurve *fcu)
memcpy(newbezt, fcu->bezt, sizeof(BezTriple) * (i + 1));
memcpy(newbezt + i + 1, fcu->bezt + i, sizeof(BezTriple));
- memcpy(newbezt + i + 2, fcu->bezt + i + 1, sizeof (BezTriple) * (fcu->totvert - (i + 1)));
+ memcpy(newbezt + i + 2, fcu->bezt + i + 1, sizeof(BezTriple) * (fcu->totvert - (i + 1)));
fcu->totvert++;
/* reassign pointers... (free old, and add new) */
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 3c802020747..0007facdf8f 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -878,7 +878,7 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol),
glPopMatrix();
/* min max */
- glColor3f(.5f, .5f, .5f);
+ glColor3f(0.5f, 0.5f, 0.5f);
min = yofs + scopes->minmax[0][0] * h;
max = yofs + scopes->minmax[0][1] * h;
CLAMP(min, rect.ymin, rect.ymax);
@@ -1012,7 +1012,9 @@ void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wco
int i, j;
float w, h, centerx, centery, diam;
float alpha;
- const float colors[6][3] = {{.75, 0, 0}, {.75, .75, 0}, {0, .75, 0}, {0, .75, .75}, {0, 0, .75}, {.75, 0, .75}};
+ const float colors[6][3] = {
+ {0.75, 0.0, 0.0}, {0.75, 0.75, 0.0}, {0.0, 0.75, 0.0},
+ {0.0, 0.75, 0.75}, {0.0, 0.0, 0.75}, {0.75, 0.0, 0.75}};
GLint scissor[4];
rect.xmin = (float)recti->xmin + 1;
@@ -1375,7 +1377,7 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
glRectf(rect->xmin, rect->ymin, rect->xmax, rect->ymax);
}
- /* grid, every .25 step */
+ /* grid, every 0.25 step */
gl_shaded_color((unsigned char *)wcol->inner, -16);
ui_draw_but_curve_grid(rect, zoomx, zoomy, offsx, offsy, 0.25f);
/* grid, every 1.0 step */
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 385f74acbd2..737c0377f27 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -347,7 +347,7 @@ static void vicon_editmode_dehlt_draw(int x, int y, int w, int h, float UNUSED(a
glColor4f(0.0f, 0.0f, 0.0f, 1);
viconutil_draw_lineloop_smooth(pts, 3);
- glColor3f(.9f, .9f, .9f);
+ glColor3f(0.9f, 0.9f, 0.9f);
viconutil_draw_points(pts, 3, 1);
}
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 02f34873ea7..fe46a5dc9c5 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -737,7 +737,8 @@ void ui_theme_init_default(void)
rgba_char_args_set(btheme->tv3d.lastsel_point, 0xff, 0xff, 0xff, 255);
rgba_char_args_set(btheme->tv3d.bone_solid, 200, 200, 200, 255);
- rgba_char_args_set(btheme->tv3d.bone_pose, 80, 200, 255, 80); // alpha 80 is not meant editable, used for wire+action draw
+ /* alpha 80 is not meant editable, used for wire+action draw */
+ rgba_char_args_set(btheme->tv3d.bone_pose, 80, 200, 255, 80);
rgba_char_args_set(btheme->tv3d.bundle_solid, 200, 200, 200, 255);
rgba_char_args_set(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255);
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index 0a9944debe1..e85f47837ef 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -102,7 +102,7 @@ void make_editLatt(Object *obedit)
if (lt->dvert) {
int tot = lt->pntsu * lt->pntsv * lt->pntsw;
- lt->editlatt->latt->dvert = MEM_mallocN(sizeof (MDeformVert) * tot, "Lattice MDeformVert");
+ lt->editlatt->latt->dvert = MEM_mallocN(sizeof(MDeformVert) * tot, "Lattice MDeformVert");
copy_dverts(lt->editlatt->latt->dvert, lt->dvert, tot);
}
@@ -162,7 +162,7 @@ void load_editLatt(Object *obedit)
if (editlt->dvert) {
tot = lt->pntsu * lt->pntsv * lt->pntsw;
- lt->dvert = MEM_mallocN(sizeof (MDeformVert) * tot, "Lattice MDeformVert");
+ lt->dvert = MEM_mallocN(sizeof(MDeformVert) * tot, "Lattice MDeformVert");
copy_dverts(lt->dvert, editlt->dvert, tot);
}
}
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 4e98d2ae967..55fb130e2c0 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -1175,7 +1175,7 @@ static int area_split_menu_init(bContext *C, wmOperator *op)
sAreaSplitData *sd;
/* custom data */
- sd = (sAreaSplitData *)MEM_callocN(sizeof (sAreaSplitData), "op_area_split");
+ sd = (sAreaSplitData *)MEM_callocN(sizeof(sAreaSplitData), "op_area_split");
op->customdata = sd;
sd->sarea = CTX_wm_area(C);
@@ -1210,7 +1210,7 @@ static int area_split_init(bContext *C, wmOperator *op)
if (dir == 'h' && sa->winy < 2 * areaminy) return 0;
/* custom data */
- sd = (sAreaSplitData *)MEM_callocN(sizeof (sAreaSplitData), "op_area_split");
+ sd = (sAreaSplitData *)MEM_callocN(sizeof(sAreaSplitData), "op_area_split");
op->customdata = sd;
sd->sarea = sa;
@@ -2180,7 +2180,7 @@ static int area_join_init(bContext *C, wmOperator *op)
return 0;
}
- jd = (sAreaJoinData *)MEM_callocN(sizeof (sAreaJoinData), "op_area_join");
+ jd = (sAreaJoinData *)MEM_callocN(sizeof(sAreaJoinData), "op_area_join");
jd->sa1 = sa1;
jd->sa1->flag |= AREA_FLAG_DRAWJOINFROM;
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 4dee83dbb82..b0867608840 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -5096,8 +5096,8 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
/* This can be removed once fixed properly in
* BKE_brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, double time, float pressure, void *user)
- * at zero pressure we should do nothing 1/2^12 is .0002 which is the sensitivity of the most sensitive pen tablet available */
- if (tablet && (pressure < .0002f) && ((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) || BKE_brush_use_alpha_pressure(scene, pop->s.brush) || BKE_brush_use_size_pressure(scene, pop->s.brush)))
+ * at zero pressure we should do nothing 1/2^12 is 0.0002 which is the sensitivity of the most sensitive pen tablet available */
+ if (tablet && (pressure < 0.0002f) && ((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) || BKE_brush_use_alpha_pressure(scene, pop->s.brush) || BKE_brush_use_size_pressure(scene, pop->s.brush)))
return;
}
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 32e6f588e27..59e47363a22 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -550,7 +550,7 @@ static void image_keymap(struct wmKeyConfig *keyconf)
/* fast switch to render slots */
for (i = 0; i < MAX2(IMA_MAX_RENDER_SLOT, 9); i++) {
- kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_int", ONEKEY+i, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_int", ONEKEY + i, KM_PRESS, 0, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.image.render_slot");
RNA_int_set(kmi->ptr, "value", i);
}
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 8aa56823baf..4ed9acf1481 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -1002,7 +1002,7 @@ static void node_draw_frame(const bContext *C, ARegion *ar, SpaceNode *snode, bN
glDisable(GL_BLEND);
/* outline active and selected emphasis */
- if (node->flag & (NODE_ACTIVE | SELECT) ) {
+ if (node->flag & (NODE_ACTIVE | SELECT)) {
glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH);
@@ -1105,7 +1105,7 @@ static void node_draw_reroute(const bContext *C, ARegion *ar, SpaceNode *UNUSED(
/* XXX only kept for debugging
* selection state is indicated by socket outline below!
*/
- #if 0
+#if 0
/* body */
uiSetRoundBox(15);
UI_ThemeColor4(TH_NODE);
@@ -1116,18 +1116,18 @@ static void node_draw_reroute(const bContext *C, ARegion *ar, SpaceNode *UNUSED(
/* outline active and selected emphasis */
if (node->flag & (NODE_ACTIVE | SELECT)) {
glEnable(GL_BLEND);
- glEnable( GL_LINE_SMOOTH );
+ glEnable(GL_LINE_SMOOTH);
/* using different shades of TH_TEXT_HI for the empasis, like triangle */
- if( node->flag & NODE_ACTIVE )
+ if (node->flag & NODE_ACTIVE)
UI_ThemeColorShadeAlpha(TH_TEXT_HI, 0, -40);
else
UI_ThemeColorShadeAlpha(TH_TEXT_HI, -20, -120);
uiDrawBox(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, size);
- glDisable( GL_LINE_SMOOTH );
+ glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
}
- #endif
+#endif
/* only draw input socket. as they all are placed on the same position.
* highlight also if node itself is selected, since we don't display the node body separately!
@@ -1194,7 +1194,7 @@ static void node_buts_image_user(uiLayout *layout, bContext *C, PointerRNA *imap
uiLayout *col;
int source;
- if(!imaptr->data)
+ if (!imaptr->data)
return;
col = uiLayoutColumn(layout, 0);
@@ -2429,7 +2429,7 @@ static void node_composit_buts_viewer_but(uiLayout *layout, bContext *UNUSED(C),
static void node_composit_buts_mask(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
uiTemplateID(layout, C, ptr, "mask", NULL, NULL, NULL);
- uiItemR(layout, ptr, "smooth_mask", 0, NULL, ICON_NONE);
+ uiItemR(layout, ptr, "smooth_mask", 0, NULL, ICON_NONE);
}
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 463a262c09c..8be5b644afb 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -825,7 +825,7 @@ typedef struct DrawCache {
static void text_drawcache_init(SpaceText *st)
{
- DrawCache *drawcache = MEM_callocN(sizeof (DrawCache), "text draw cache");
+ DrawCache *drawcache = MEM_callocN(sizeof(DrawCache), "text draw cache");
drawcache->winx = -1;
drawcache->nlines = BLI_countlist(&st->text->lines);
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index 43252111303..7d39a89a130 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -431,7 +431,7 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float min[3], float max[3], int r
}
tend();
- // printf ( "Draw Time: %f\n",( float ) tval() );
+ // printf ( "Draw Time: %f\n",(float) tval() );
if (tex_shadow)
GPU_texture_unbind(tex_shadow);
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index d632314f3ca..cc3d2d383b8 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -1669,7 +1669,7 @@ static int viewzoom_exec(bContext *C, wmOperator *op)
if (rv3d->camzoom > RV3D_CAMZOOM_MAX) rv3d->camzoom = RV3D_CAMZOOM_MAX;
}
else if (rv3d->dist > 0.001f * v3d->grid) {
- view_zoom_mouseloc(ar, .83333f, mx, my);
+ view_zoom_mouseloc(ar, 0.83333f, mx, my);
}
}
@@ -1921,7 +1921,7 @@ static int viewdolly_exec(bContext *C, wmOperator *op)
view_dolly_mouseloc(ar, rv3d->ofs, mousevec, 1.2f);
}
else {
- view_dolly_mouseloc(ar, rv3d->ofs, mousevec, .83333f);
+ view_dolly_mouseloc(ar, rv3d->ofs, mousevec, 0.83333f);
}
if (rv3d->viewlock & RV3D_BOXVIEW)
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 9ebd43cd0d1..90b67951614 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -221,7 +221,7 @@ void drawSnapping(const struct bContext *C, TransInfo *t)
setlinestyle(0);
cpack(0x0);
fdrawline(-0.020 / w, 0, -0.1 / w, 0);
- fdrawline(0.1 / w, 0, .020 / w, 0);
+ fdrawline(0.1 / w, 0, 0.020 / w, 0);
fdrawline(0, -0.020 / h, 0, -0.1 / h);
fdrawline(0, 0.1 / h, 0, 0.020 / h);
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index a1bd8dcb3a3..e718a486561 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -246,7 +246,7 @@ void GPU_set_gpu_mipmapping(int gpu_mipmap){
/* only actually enable if it's supported */
GTS.gpu_mipmap = gpu_mipmap && GLEW_EXT_framebuffer_object;
- if(old_value != GTS.gpu_mipmap) {
+ if (old_value != GTS.gpu_mipmap) {
GPU_free_images();
}
}
@@ -644,7 +644,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gpu_get_mipmap_filter(1));
}
else {
- if(GTS.gpu_mipmap) {
+ if (GTS.gpu_mipmap) {
if (use_high_bit_depth)
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16, rectw, recth, 0, GL_RGBA, GL_FLOAT, frect);
else
diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h
index 62c3051727d..20f58f4d16e 100644
--- a/source/blender/makesrna/intern/rna_nodetree_types.h
+++ b/source/blender/makesrna/intern/rna_nodetree_types.h
@@ -161,11 +161,11 @@ DefNode( CompositorNode, CMP_NODE_MOVIECLIP, def_cmp_movieclip, "MOVIE
DefNode( CompositorNode, CMP_NODE_TRANSFORM, dev_cmd_transform, "TRANSFORM", Transform, "Transform", "" )
DefNode( CompositorNode, CMP_NODE_STABILIZE2D, def_cmp_stabilize2d, "STABILIZE2D", Stabilize, "Stabilize 2D", "" )
DefNode( CompositorNode, CMP_NODE_MOVIEDISTORTION,def_cmp_moviedistortion,"MOVIEDISTORTION",MovieDistortion, "Movie Distortion", "" )
-DefNode( CompositorNode, CMP_NODE_MASK_BOX, def_cmp_boxmask, "BOXMASK" ,BoxMask, "Box mask", "" )
-DefNode( CompositorNode, CMP_NODE_MASK_ELLIPSE, def_cmp_ellipsemask, "ELLIPSEMASK" ,EllipseMask, "Ellipse mask", "" )
-DefNode( CompositorNode, CMP_NODE_BOKEHIMAGE, def_cmp_bokehimage, "BOKEHIMAGE" ,BokehImage, "Bokeh image", "" )
-DefNode( CompositorNode, CMP_NODE_BOKEHBLUR, def_cmp_bokehblur, "BOKEHBLUR" ,BokehBlur, "Bokeh Blur", "" )
-DefNode( CompositorNode, CMP_NODE_SWITCH, def_cmp_switch, "SWITCH" ,Switch, "Switch", "" )
+DefNode( CompositorNode, CMP_NODE_MASK_BOX, def_cmp_boxmask, "BOXMASK", BoxMask, "Box mask", "" )
+DefNode( CompositorNode, CMP_NODE_MASK_ELLIPSE, def_cmp_ellipsemask, "ELLIPSEMASK", EllipseMask, "Ellipse mask", "" )
+DefNode( CompositorNode, CMP_NODE_BOKEHIMAGE, def_cmp_bokehimage, "BOKEHIMAGE", BokehImage, "Bokeh image", "" )
+DefNode( CompositorNode, CMP_NODE_BOKEHBLUR, def_cmp_bokehblur, "BOKEHBLUR", BokehBlur, "Bokeh Blur", "" )
+DefNode( CompositorNode, CMP_NODE_SWITCH, def_cmp_switch, "SWITCH", Switch, "Switch", "" )
DefNode( CompositorNode, CMP_NODE_COLORCORRECTION,def_cmp_colorcorrection,"COLORCORRECTION",ColorCorrection, "ColorCorrection", "" )
DefNode( CompositorNode, CMP_NODE_MASK, def_cmp_mask, "MASK", Mask, "Mask", "" )
DefNode( CompositorNode, CMP_NODE_KEYINGSCREEN, def_cmp_keyingscreen, "KEYINGSCREEN", KeyingScreen, "KeyingScreen", "" )
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index c0efff2d179..4224b3936c6 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -117,18 +117,18 @@ static int rna_SmokeModifier_density_get_length(PointerRNA *ptr, int length[RNA_
{
SmokeDomainSettings *settings = (SmokeDomainSettings *)ptr->data;
- if (settings->fluid)
- {
+ if (settings->fluid) {
float *density = smoke_get_density(settings->fluid);
unsigned int size = settings->res[0] * settings->res[1] * settings->res[2];
- if(density)
+ if (density)
length[0] = size;
else
length[0] = 0;
}
- else
- length[0] = 0; // No smoke domain created yet
+ else {
+ length[0] = 0; /* No smoke domain created yet */
+ }
return length[0];
}
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index 85dee2617d8..801bec30ecf 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -780,21 +780,21 @@ static void rna_def_trackingCamera(BlenderRNA *brna)
prop = RNA_def_property(srna, "k1", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "k1");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_range(prop, -10, 10, .1, 3);
+ RNA_def_property_ui_range(prop, -10, 10, 0.1, 3);
RNA_def_property_ui_text(prop, "K1", "First coefficient of third order polynomial radial distortion");
RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, "rna_tracking_flushUpdate");
prop = RNA_def_property(srna, "k2", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "k2");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_range(prop, -10, 10, .1, 3);
+ RNA_def_property_ui_range(prop, -10, 10, 0.1, 3);
RNA_def_property_ui_text(prop, "K2", "Second coefficient of third order polynomial radial distortion");
RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, "rna_tracking_flushUpdate");
prop = RNA_def_property(srna, "k3", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "k3");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_range(prop, -10, 10, .1, 3);
+ RNA_def_property_ui_range(prop, -10, 10, 0.1, 3);
RNA_def_property_ui_text(prop, "K3", "Third coefficient of third order polynomial radial distortion");
RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, "rna_tracking_flushUpdate");
diff --git a/source/blender/nodes/composite/nodes/node_composite_mask.c b/source/blender/nodes/composite/nodes/node_composite_mask.c
index d323839e690..91c3e9fbaf7 100644
--- a/source/blender/nodes/composite/nodes/node_composite_mask.c
+++ b/source/blender/nodes/composite/nodes/node_composite_mask.c
@@ -72,7 +72,7 @@ static void exec(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **
BKE_mask_rasterize(mask, sx, sy, res, TRUE, node->custom1);
- if(node->custom1){
+ if (node->custom1) {
PLX_antialias_buffer(res,sx,sy);
}
/* pass on output and free */
diff --git a/source/blender/nodes/shader/nodes/node_shader_particle_info.c b/source/blender/nodes/shader/nodes/node_shader_particle_info.c
index 6456742e22b..beefc0b6eae 100644
--- a/source/blender/nodes/shader/nodes/node_shader_particle_info.c
+++ b/source/blender/nodes/shader/nodes/node_shader_particle_info.c
@@ -36,13 +36,13 @@ static bNodeSocketTemplate outputs[] = {
/* node type definition */
void register_node_type_sh_particle_info(bNodeTreeType *ttype)
{
- static bNodeType ntype;
+ static bNodeType ntype;
- node_type_base(ttype, &ntype, SH_NODE_PARTICLE_INFO, "Particle Info", NODE_CLASS_INPUT, 0);
- node_type_compatibility(&ntype, NODE_NEW_SHADING);
- node_type_socket_templates(&ntype, NULL, outputs);
- node_type_size(&ntype, 150, 60, 200);
+ node_type_base(ttype, &ntype, SH_NODE_PARTICLE_INFO, "Particle Info", NODE_CLASS_INPUT, 0);
+ node_type_compatibility(&ntype, NODE_NEW_SHADING);
+ node_type_socket_templates(&ntype, NULL, outputs);
+ node_type_size(&ntype, 150, 60, 200);
- nodeRegisterType(ttype, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/node_texture_util.c b/source/blender/nodes/texture/node_texture_util.c
index 255ed9e51fc..28d03db1687 100644
--- a/source/blender/nodes/texture/node_texture_util.c
+++ b/source/blender/nodes/texture/node_texture_util.c
@@ -88,9 +88,9 @@ void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread)
}
if (in->hasoutput && in->sockettype == SOCK_VECTOR) {
- out[0] = out[0] * .5f + .5f;
- out[1] = out[1] * .5f + .5f;
- out[2] = out[2] * .5f + .5f;
+ out[0] = out[0] * 0.5f + 0.5f;
+ out[1] = out[1] * 0.5f + 0.5f;
+ out[2] = out[2] * 0.5f + 0.5f;
out[3] = 1;
}
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_coord.c b/source/blender/nodes/texture/nodes/node_texture_coord.c
index ded3afe4c6b..2add5c820eb 100644
--- a/source/blender/nodes/texture/nodes/node_texture_coord.c
+++ b/source/blender/nodes/texture/nodes/node_texture_coord.c
@@ -40,9 +40,7 @@ static bNodeSocketTemplate outputs[]= {
static void vectorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **UNUSED(in), short UNUSED(thread))
{
- out[0] = p->co[0];
- out[1] = p->co[1];
- out[2] = p->co[2];
+ copy_v3_v3(out, p->co);
}
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
diff --git a/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
index 52455e024b4..6863eab9150 100644
--- a/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
+++ b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
@@ -80,7 +80,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
float col[4];
tex_input_rgba(col, in[4], p, thread);
- hue += 0.5f; /* [-.5, .5] -> [0, 1] */
+ hue += 0.5f; /* [-0.5, 0.5] -> [0, 1] */
do_hue_sat_fac(node, out, hue, sat, val, col, fac);
diff --git a/source/blender/nodes/texture/nodes/node_texture_texture.c b/source/blender/nodes/texture/nodes/node_texture_texture.c
index 0d985273eda..98382e24290 100644
--- a/source/blender/nodes/texture/nodes/node_texture_texture.c
+++ b/source/blender/nodes/texture/nodes/node_texture_texture.c
@@ -65,7 +65,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
if (node->custom2 || node->need_exec==0) {
/* this node refers to its own texture tree! */
- copy_v4_v4(out, (fabs(co[0] - co[1]) < .01) ? white : red);
+ copy_v4_v4(out, (fabs(co[0] - co[1]) < 0.01) ? white : red);
}
else if (nodetex) {
TexResult texres;
diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
index 54044b62e04..8fb3a3f74d6 100644
--- a/source/blender/python/mathutils/mathutils_Vector.c
+++ b/source/blender/python/mathutils/mathutils_Vector.c
@@ -1874,7 +1874,7 @@ static PyObject *Vector_richcmpr(PyObject *objectA, PyObject *objectB, int compa
{
VectorObject *vecA = NULL, *vecB = NULL;
int result = 0;
- double epsilon = .000001f;
+ double epsilon = 0.000001f;
double lenA, lenB;
if (!VectorObject_Check(objectA) || !VectorObject_Check(objectB)) {
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index e4c4e905aa6..c1f85914479 100644
--- a/source/blender/render/intern/source/volumetric.c
+++ b/source/blender/render/intern/source/volumetric.c
@@ -376,7 +376,7 @@ static float vol_get_phasefunc(ShadeInput *UNUSED(shi), float g, const float w[3
return normalize * 1.f;
}
else { /* schlick */
- const float k = 1.55f * g - .55f * g * g * g;
+ const float k = 1.55f * g - 0.55f * g * g * g;
const float kcostheta = k * dot_v3v3(w, wp);
return normalize * (1.f - k * k) / ((1.f - kcostheta) * (1.f - kcostheta));
}
@@ -394,7 +394,7 @@ static float vol_get_phasefunc(ShadeInput *UNUSED(shi), float g, const float w[3
return normalize * (1.f - g * g) / powf(1.f + g * g - 2.f * g * costheta, 1.5f);
case MA_VOL_PH_SCHLICK:
{
- const float k = 1.55f * g - .55f * g * g * g;
+ const float k = 1.55f * g - 0.55f * g * g * g;
const float kcostheta = k * costheta;
return normalize * (1.f - k * k) / ((1.f - kcostheta) * (1.f - kcostheta));
}
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index ecde9bb2de8..c88858c44da 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -2858,7 +2858,7 @@ static void quad_bezier_2d(float *result, float *v1, float *v2, float *ipodata)
p1[0]= v1[0];
p1[1]= v1[1];
- /* official formula 2*p2 - .5*p1 - .5*p3 */
+ /* official formula 2*p2 - 0.5*p1 - 0.5*p3 */
p2[0]= -0.5f*p1[0] - 0.5f*p3[0];
p2[1]= -0.5f*p1[1] - 0.5f*p3[1];
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 696def2cebe..770d621f2b5 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2295,8 +2295,8 @@ static void WM_OT_collada_export(wmOperatorType *ot)
RNA_def_int(ot->srna, "export_mesh_type", 0, INT_MIN, INT_MAX,
"Resolution", "Modifier resolution for export", INT_MIN, INT_MAX);
- RNA_def_enum(ot->srna, "export_mesh_type_selection", prop_bc_export_mesh_type,
- 0, "Resolution", "Modifier resolution for export");
+ RNA_def_enum(ot->srna, "export_mesh_type_selection", prop_bc_export_mesh_type, 0,
+ "Resolution", "Modifier resolution for export");
RNA_def_boolean(ot->srna, "selected", 0, "Selection Only",
"Export only selected elements");
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 265a3c11377..6b3735020b4 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -369,7 +369,7 @@ static void wm_window_add_ghostwindow(const char *title, wmWindow *win)
win->eventstate = MEM_callocN(sizeof(wmEvent), "window event state");
/* until screens get drawn, make it nice grey */
- glClearColor(.55, .55, .55, 0.0);
+ glClearColor(0.55, 0.55, 0.55, 0.0);
/* Crash on OSS ATI: bugs.launchpad.net/ubuntu/+source/mesa/+bug/656100 */
if (!GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE)) {
glClear(GL_COLOR_BUFFER_BIT);
@@ -987,7 +987,7 @@ void wm_window_testbreak(void)
/* only check for breaks every 50 milliseconds
* if we get called more often.
*/
- if ((curtime - ltime) > .05) {
+ if ((curtime - ltime) > 0.05) {
int hasevent = GHOST_ProcessEvents(g_system, 0); /* 0 is no wait */
if (hasevent)
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 927a0535870..3c9ca77b37e 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -446,8 +446,8 @@ static void GetRGB(short type,
c2 = KX_Mcol2uint_new(mmcol[2]);
if (mface->v4)
c3 = KX_Mcol2uint_new(mmcol[3]);
- }else // backup white
- {
+ }
+ else { // backup white
c0 = KX_rgbaint2uint_new(color);
c1 = KX_rgbaint2uint_new(color);
c2 = KX_rgbaint2uint_new(color);
diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp
index 07680297b7d..28e34769ab8 100644
--- a/source/gameengine/Converter/KX_ConvertActuators.cpp
+++ b/source/gameengine/Converter/KX_ConvertActuators.cpp
@@ -860,7 +860,7 @@ void BL_ConvertActuators(const char* maggiename,
float paraArg1 = 0.0;
float paraArg2 = 0.0;
- switch (randAct->distribution) {
+ switch (randAct->distribution) {
case ACT_RANDOM_BOOL_CONST:
modeArg = SCA_RandomActuator::KX_RANDOMACT_BOOL_CONST;
paraArg1 = (float) randAct->int_arg_1;
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index c50e42446a5..124a8e28f57 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -588,7 +588,7 @@ public:
/* These static functions are referenced by ALL PyObjectPlus_Proxy types
* they take the C++ reference from the PyObjectPlus_Proxy and call
- * its own virtual py_repr, py_base_dealloc ,etc. functions.
+ * its own virtual py_repr, py_base_dealloc, etc. functions.
*/
static PyObject* py_base_new(PyTypeObject *type, PyObject *args, PyObject *kwds); /* allows subclassing */
diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.h b/source/gameengine/GameLogic/SCA_ILogicBrick.h
index 9a23244fa96..b505353c7cd 100644
--- a/source/gameengine/GameLogic/SCA_ILogicBrick.h
+++ b/source/gameengine/GameLogic/SCA_ILogicBrick.h
@@ -94,7 +94,7 @@ public:
void InsertActiveQList(SG_QList& head)
{
SG_QList::iterator<SCA_ILogicBrick> it(head);
- for(it.begin(); !it.end() && m_Execute_Priority > (*it)->m_Execute_Priority; ++it);
+ for (it.begin(); !it.end() && m_Execute_Priority > (*it)->m_Execute_Priority; ++it);
it.add_back(this);
}
@@ -119,9 +119,8 @@ public:
// this element comes before the first
*current = this;
}
- else
- {
- for(++it; !it.end() && (*it)->m_gameobj == m_gameobj && m_Execute_Priority > (*it)->m_Execute_Priority; ++it);
+ else {
+ for (++it; !it.end() && (*it)->m_gameobj == m_gameobj && m_Execute_Priority > (*it)->m_Execute_Priority; ++it);
}
it.add_back(this);
}
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
index c82e015919d..2c6beb79fd3 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
@@ -191,7 +191,8 @@ bool SCA_JoystickSensor::Evaluate()
if (( m_bAllEvents && js->aAnyButtonPressIsPositive()) || (!m_bAllEvents && js->aButtonPressIsPositive(m_button))) {
m_istrig = 1;
result = true;
- }else {
+ }
+ else {
if (m_istrig) {
m_istrig = 0;
result = true;
diff --git a/source/gameengine/Ketsji/BL_Shader.cpp b/source/gameengine/Ketsji/BL_Shader.cpp
index 98854115d0a..c0fca88c426 100644
--- a/source/gameengine/Ketsji/BL_Shader.cpp
+++ b/source/gameengine/Ketsji/BL_Shader.cpp
@@ -835,12 +835,12 @@ KX_PYMETHODDEF_DOC( BL_Shader, isValid, "isValid()" )
return PyLong_FromSsize_t( ( mShader !=0 && mOk ) );
}
-KX_PYMETHODDEF_DOC( BL_Shader, getVertexProg ,"getVertexProg( )" )
+KX_PYMETHODDEF_DOC( BL_Shader, getVertexProg, "getVertexProg( )" )
{
return PyUnicode_FromString(vertProg?vertProg:"");
}
-KX_PYMETHODDEF_DOC( BL_Shader, getFragmentProg ,"getFragmentProg( )" )
+KX_PYMETHODDEF_DOC( BL_Shader, getFragmentProg, "getFragmentProg( )" )
{
return PyUnicode_FromString(fragProg?fragProg:"");
}
@@ -941,7 +941,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniform1f, "setUniform1f(name, fx)" )
}
-KX_PYMETHODDEF_DOC( BL_Shader, setUniform2f , "setUniform2f(name, fx, fy)")
+KX_PYMETHODDEF_DOC( BL_Shader, setUniform2f, "setUniform2f(name, fx, fy)")
{
if (mError) {
Py_RETURN_NONE;
@@ -1038,7 +1038,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniform1i, "setUniform1i(name, ix)" )
}
-KX_PYMETHODDEF_DOC( BL_Shader, setUniform2i , "setUniform2i(name, ix, iy)")
+KX_PYMETHODDEF_DOC( BL_Shader, setUniform2i, "setUniform2i(name, ix, iy)")
{
if (mError) {
Py_RETURN_NONE;
@@ -1109,7 +1109,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniform4i, "setUniform4i(name, ix,iy,iz, iw) "
return NULL;
}
-KX_PYMETHODDEF_DOC( BL_Shader, setUniformfv , "setUniformfv( float (list2 or list3 or list4) )")
+KX_PYMETHODDEF_DOC( BL_Shader, setUniformfv, "setUniformfv( float (list2 or list3 or list4) )")
{
if (mError) {
Py_RETURN_NONE;
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
index 5459ebe945c..79e6c35e6a2 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
@@ -899,8 +899,8 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getShader , "getShader()")
mMaterial->SetSharedMaterial(true);
mScene->GetBucketManager()->ReleaseDisplayLists(this);
return mShader->GetProxy();
- }else
- {
+ }
+ else {
// decref all references to the object
// then delete it!
// We will then go back to fixed functionality
diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.h b/source/gameengine/Ketsji/KX_BulletPhysicsController.h
index 3b3a1f5cbfb..5fcd591d822 100644
--- a/source/gameengine/Ketsji/KX_BulletPhysicsController.h
+++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.h
@@ -12,7 +12,7 @@
#include "CcdPhysicsController.h"
#endif
-class KX_BulletPhysicsController : public KX_IPhysicsController ,public CcdPhysicsController
+class KX_BulletPhysicsController : public KX_IPhysicsController, public CcdPhysicsController
{
private:
int m_savedCollisionFlags;
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp
index 6d57b6950f1..f149b676aa5 100644
--- a/source/gameengine/Ketsji/KX_Dome.cpp
+++ b/source/gameengine/Ketsji/KX_Dome.cpp
@@ -105,7 +105,8 @@ KX_Dome::KX_Dome (
CreateMeshDome180();
m_numfaces = 4;
- }else if (m_angle > 180) {
+ }
+ else if (m_angle > 180) {
cubetop.resize(2);
cubebottom.resize(2);
cubeleft.resize(2);
@@ -140,7 +141,8 @@ KX_Dome::KX_Dome (
CreateMeshDome180();
m_numfaces = 4;
- }else if (m_angle > 180) {
+ }
+ else if (m_angle > 180) {
cubetop.resize(2);
cubebottom.resize(2);
cubeleft.resize(2);
@@ -595,7 +597,7 @@ void KX_Dome::CreateMeshDome180(void)
/* Left face - two triangles */
cubeleft[0].verts[0][0] = -M_SQRT2 / 2.0;
- cubeleft[0].verts[0][1] = .0;
+ cubeleft[0].verts[0][1] = 0.0;
cubeleft[0].verts[0][2] = -0.5;
cubeleft[0].u[0] = 0.0;
cubeleft[0].v[0] = 0.0;
@@ -1547,7 +1549,7 @@ void KX_Dome::CalculateCameraOrientation()
m_locRot[1] = MT_Matrix3x3( // Bottom
c, s, 0.0,
- 0.0 ,0.0, 1.0,
+ 0.0, 0.0, 1.0,
s, -c, 0.0);
m_locRot[2] = MT_Matrix3x3( // 45deg - Left
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index 836005cf25e..04113607531 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -1472,18 +1472,18 @@ void KX_KetsjiEngine::RenderDebugProperties()
for (int j = tc_first; j < tc_numCategories; j++)
{
debugtxt.Format(m_profileLabels[j]);
- m_rendertools->RenderText2D(RAS_IRenderTools::RAS_TEXT_PADDED,
- debugtxt.Ptr(),
- xcoord,ycoord,
- m_canvas->GetWidth(),
- m_canvas->GetHeight());
+ m_rendertools->RenderText2D(RAS_IRenderTools::RAS_TEXT_PADDED,
+ debugtxt.Ptr(),
+ xcoord,ycoord,
+ m_canvas->GetWidth(),
+ m_canvas->GetHeight());
double time = m_logger->GetAverage((KX_TimeCategory)j);
debugtxt.Format("%.3fms (%2.2f %%)", time*1000.f, time/tottime * 100.f);
- m_rendertools->RenderText2D(RAS_IRenderTools::RAS_TEXT_PADDED,
- debugtxt.Ptr(),
- xcoord + 60 ,ycoord,
- m_canvas->GetWidth(),
- m_canvas->GetHeight());
+ m_rendertools->RenderText2D(RAS_IRenderTools::RAS_TEXT_PADDED,
+ debugtxt.Ptr(),
+ xcoord + 60, ycoord,
+ m_canvas->GetWidth(),
+ m_canvas->GetHeight());
ycoord += 14;
}
}
diff --git a/source/gameengine/Ketsji/KX_PyMath.h b/source/gameengine/Ketsji/KX_PyMath.h
index b0000405893..8924567acde 100644
--- a/source/gameengine/Ketsji/KX_PyMath.h
+++ b/source/gameengine/Ketsji/KX_PyMath.h
@@ -104,19 +104,20 @@ bool PyMatTo(PyObject* pymat, T& mat)
if (!PyErr_Occurred() && PySequence_Check(pyrow))
{
unsigned int cols = PySequence_Size(pyrow);
- if (cols != Size(mat))
+ if (cols != Size(mat)) {
noerror = false;
- else
- {
- for(unsigned int col = 0; col < cols; col++)
- {
+ }
+ else {
+ for (unsigned int col = 0; col < cols; col++) {
PyObject *item = PySequence_GetItem(pyrow, col); /* new ref */
mat[row][col] = PyFloat_AsDouble(item);
Py_DECREF(item);
}
}
- } else
+ }
+ else {
noerror = false;
+ }
Py_DECREF(pyrow);
}
} else
diff --git a/source/gameengine/Ketsji/KX_RadarSensor.cpp b/source/gameengine/Ketsji/KX_RadarSensor.cpp
index 978944c20e8..74009f51078 100644
--- a/source/gameengine/Ketsji/KX_RadarSensor.cpp
+++ b/source/gameengine/Ketsji/KX_RadarSensor.cpp
@@ -104,42 +104,42 @@ void KX_RadarSensor::SynchronizeTransform()
{
MT_Quaternion rotquatje(MT_Vector3(0,0,1),MT_radians(90));
trans.rotate(rotquatje);
- trans.translate(MT_Vector3 (0, -m_coneheight/2.0 ,0));
+ trans.translate(MT_Vector3 (0, -m_coneheight/2.0, 0));
break;
};
case SENS_RADAR_Y_AXIS: // +Y Axis
{
MT_Quaternion rotquatje(MT_Vector3(1,0,0),MT_radians(-180));
trans.rotate(rotquatje);
- trans.translate(MT_Vector3 (0, -m_coneheight/2.0 ,0));
+ trans.translate(MT_Vector3 (0, -m_coneheight/2.0, 0));
break;
};
case SENS_RADAR_Z_AXIS: // +Z Axis
{
MT_Quaternion rotquatje(MT_Vector3(1,0,0),MT_radians(-90));
trans.rotate(rotquatje);
- trans.translate(MT_Vector3 (0, -m_coneheight/2.0 ,0));
+ trans.translate(MT_Vector3 (0, -m_coneheight/2.0, 0));
break;
};
case SENS_RADAR_NEG_X_AXIS: // -X Axis
{
MT_Quaternion rotquatje(MT_Vector3(0,0,1),MT_radians(-90));
trans.rotate(rotquatje);
- trans.translate(MT_Vector3 (0, -m_coneheight/2.0 ,0));
+ trans.translate(MT_Vector3 (0, -m_coneheight/2.0, 0));
break;
};
case SENS_RADAR_NEG_Y_AXIS: // -Y Axis
{
//MT_Quaternion rotquatje(MT_Vector3(1,0,0),MT_radians(-180));
//trans.rotate(rotquatje);
- trans.translate(MT_Vector3 (0, -m_coneheight/2.0 ,0));
+ trans.translate(MT_Vector3 (0, -m_coneheight/2.0, 0));
break;
};
case SENS_RADAR_NEG_Z_AXIS: // -Z Axis
{
MT_Quaternion rotquatje(MT_Vector3(1,0,0),MT_radians(90));
trans.rotate(rotquatje);
- trans.translate(MT_Vector3 (0, -m_coneheight/2.0 ,0));
+ trans.translate(MT_Vector3 (0, -m_coneheight/2.0, 0));
break;
};
default:
@@ -154,7 +154,7 @@ void KX_RadarSensor::SynchronizeTransform()
m_cone_origin[1] = temp[1];
m_cone_origin[2] = temp[2];
- temp = trans(MT_Point3(0, -m_coneheight/2.0 ,0));
+ temp = trans(MT_Point3(0, -m_coneheight/2.0, 0));
m_cone_target[0] = temp[0];
m_cone_target[1] = temp[1];
m_cone_target[2] = temp[2];
diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
index cd6bb5a1cbc..39b7c44eda9 100644
--- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
@@ -258,7 +258,7 @@ void KX_SCA_AddObjectActuator::InstantAddObject()
// Now it needs to be added to the current scene.
SCA_IObject* replica = m_scene->AddReplicaObject(m_OriginalObject,GetParent(),m_timeProp );
KX_GameObject * game_obj = static_cast<KX_GameObject *>(replica);
- game_obj->setLinearVelocity(m_linear_velocity ,m_localLinvFlag);
+ game_obj->setLinearVelocity(m_linear_velocity, m_localLinvFlag);
game_obj->setAngularVelocity(m_angular_velocity,m_localAngvFlag);
game_obj->ResolveCombinedVelocities(m_linear_velocity, m_angular_velocity, m_localLinvFlag, m_localAngvFlag);
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
index 343cb549337..47cd4ff8da5 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
@@ -1811,8 +1811,8 @@ bool CcdPhysicsEnvironment::cullingTest(PHY_CullingCallback callback, void* user
// occlusion culling, the direction of the view is taken from the first plan which MUST be the near plane
btDbvt::collideOCL(m_cullingTree->m_sets[1].m_root,planes_n,planes_o,planes_n[0],nplanes,dispatcher);
btDbvt::collideOCL(m_cullingTree->m_sets[0].m_root,planes_n,planes_o,planes_n[0],nplanes,dispatcher);
- }else
- {
+ }
+ else {
btDbvt::collideKDOP(m_cullingTree->m_sets[1].m_root,planes_n,planes_o,nplanes,dispatcher);
btDbvt::collideKDOP(m_cullingTree->m_sets[0].m_root,planes_n,planes_o,nplanes,dispatcher);
}