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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-06-27 22:29:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-27 22:29:47 +0400
commit32478997ec1fac6b155ffc1442312c4c33fd53df (patch)
treee5a2d8cbe02b24d14807ea18cc1ac8f6f26ade43 /source/blender
parent25a018fad09907acfbd12580e75b3091b4ef7080 (diff)
style cleanup
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/anim.c2
-rw-r--r--source/blender/blenkernel/intern/collision.c3
-rw-r--r--source/blender/blenkernel/intern/mask.c6
-rw-r--r--source/blender/blenkernel/intern/modifiers_bmesh.c4
-rw-r--r--source/blender/blenkernel/intern/sequencer.c4
-rw-r--r--source/blender/blenkernel/intern/unit.c28
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c2
-rw-r--r--source/blender/blenlib/intern/fileops.c2
-rw-r--r--source/blender/blenlib/intern/path_util.c2
-rw-r--r--source/blender/blenlib/intern/voronoi.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.c4
-rw-r--r--source/blender/collada/MeshImporter.cpp9
-rw-r--r--source/blender/collada/SceneExporter.cpp6
-rw-r--r--source/blender/collada/collada_utils.cpp3
-rw-r--r--source/blender/compositor/intern/COM_OpenCLDevice.cpp2
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h2
-rw-r--r--source/blender/editors/interface/resources.c4
-rw-r--r--source/blender/editors/io/io_collada.c34
-rw-r--r--source/blender/editors/io/io_ops.h2
-rw-r--r--source/blender/editors/screen/screen_ops.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_buttons.c2
-rw-r--r--source/blender/editors/space_text/text_ops.c6
-rw-r--r--source/blender/editors/space_userpref/space_userpref.c84
-rw-r--r--source/blender/makesdna/DNA_anim_types.h2
-rw-r--r--source/blender/makesdna/DNA_scene_types.h2
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c4
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c2
-rw-r--r--source/blender/makesrna/intern/rna_curve.c2
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c6
-rw-r--r--source/blender/makesrna/intern/rna_main.c2
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c12
-rw-r--r--source/blender/makesrna/intern/rna_mask.c14
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c4
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c28
-rw-r--r--source/blender/makesrna/intern/rna_object.c10
-rw-r--r--source/blender/makesrna/intern/rna_pose.c4
-rw-r--r--source/blender/render/intern/raytrace/rayobject_instance.cpp62
38 files changed, 184 insertions, 187 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 170638f0e8d..a0cfc4295ef 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -1490,7 +1490,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
}
/* only counts visible particles */
- ++index;
+ index++;
}
/* restore objects since they were changed in BKE_object_where_is_calc_time */
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index 1bd650ef568..d99c36b6c91 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -325,8 +325,7 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM
result = 1;
}
- else
- {
+ else {
// Apply repulse impulse if distance too short
// I_r = -min(dt*kd, max(0, 1d/dt - v_n))
// DG: this formula ineeds to be changed for this code since we apply impulses/repulses like this:
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index d85722931a7..2767a67086b 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -64,7 +64,7 @@ static MaskSplinePoint *mask_spline_point_next(MaskSpline *spline, MaskSplinePoi
if (spline->flag & MASK_SPLINE_CYCLIC) {
return &points_array[0];
}
- else {
+ else {
return NULL;
}
}
@@ -79,7 +79,7 @@ static MaskSplinePoint *mask_spline_point_prev(MaskSpline *spline, MaskSplinePoi
if (spline->flag & MASK_SPLINE_CYCLIC) {
return &points_array[spline->tot_point - 1];
}
- else {
+ else {
return NULL;
}
}
@@ -94,7 +94,7 @@ static BezTriple *mask_spline_point_next_bezt(MaskSpline *spline, MaskSplinePoin
if (spline->flag & MASK_SPLINE_CYCLIC) {
return &(points_array[0].bezt);
}
- else {
+ else {
return NULL;
}
}
diff --git a/source/blender/blenkernel/intern/modifiers_bmesh.c b/source/blender/blenkernel/intern/modifiers_bmesh.c
index 99bb3468320..72c3cda9272 100644
--- a/source/blender/blenkernel/intern/modifiers_bmesh.c
+++ b/source/blender/blenkernel/intern/modifiers_bmesh.c
@@ -72,8 +72,8 @@ void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm)
BM_data_layer_add(bm, &bm->edata, CD_BWEIGHT);
BM_data_layer_add(bm, &bm->vdata, CD_BWEIGHT);
- vtable = MEM_callocN(sizeof(void**) * totvert, "vert table in BMDM_Copy");
- etable = MEM_callocN(sizeof(void**) * totedge, "edge table in BMDM_Copy");
+ vtable = MEM_callocN(sizeof(void **) * totvert, "vert table in BMDM_Copy");
+ etable = MEM_callocN(sizeof(void **) * totedge, "edge table in BMDM_Copy");
/*do verts*/
mv = mvert = dm->dupVertArray(dm);
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 8cb47118e7d..a8aa17d3480 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -2089,7 +2089,7 @@ static ImBuf *seq_render_mask_strip(
fp_src = maskbuf;
fp_dst = ibuf->rect_float;
i = context.rectx * context.recty;
- while(--i) {
+ while (--i) {
fp_dst[0] = fp_dst[1] = fp_dst[2] = *fp_src;
fp_dst[3] = 1.0f;
@@ -2115,7 +2115,7 @@ static ImBuf *seq_render_mask_strip(
fp_src = maskbuf;
ub_dst = (unsigned char *)ibuf->rect;
i = context.rectx * context.recty;
- while(--i) {
+ while (--i) {
ub_dst[0] = ub_dst[1] = ub_dst[2] = (unsigned char)(*fp_src * 255.0f); /* already clamped */
ub_dst[3] = 255;
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index aa9cc40f71f..1180d2c72d5 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -125,7 +125,7 @@ static struct bUnitDef buMetricLenDef[] = {
#endif
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
-static struct bUnitCollection buMetricLenCollecton = {buMetricLenDef, 3, 0, sizeof(buMetricLenDef)/sizeof(bUnitDef)};
+static struct bUnitCollection buMetricLenCollecton = {buMetricLenDef, 3, 0, sizeof(buMetricLenDef) / sizeof(bUnitDef)};
static struct bUnitDef buImperialLenDef[] = {
{"mile", "miles", "mi", "m", "Miles", UN_SC_MI, 0.0, B_UNIT_DEF_NONE},
@@ -137,7 +137,7 @@ static struct bUnitDef buImperialLenDef[] = {
{"thou", "thou", "thou", "mil", "Thou", UN_SC_MIL, 0.0, B_UNIT_DEF_NONE}, /* plural for thou has no 's' */
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
-static struct bUnitCollection buImperialLenCollecton = {buImperialLenDef, 4, 0, sizeof(buImperialLenDef)/sizeof(bUnitDef)};
+static struct bUnitCollection buImperialLenCollecton = {buImperialLenDef, 4, 0, sizeof(buImperialLenDef) / sizeof(bUnitDef)};
/* Areas */
static struct bUnitDef buMetricAreaDef[] = {
@@ -151,7 +151,7 @@ static struct bUnitDef buMetricAreaDef[] = {
{"square micrometer", "square micrometers", "µm²", "um2", "Square Micrometers", UN_SC_UM*UN_SC_UM, 0.0, B_UNIT_DEF_NONE},
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
-static struct bUnitCollection buMetricAreaCollecton = {buMetricAreaDef, 3, 0, sizeof(buMetricAreaDef)/sizeof(bUnitDef)};
+static struct bUnitCollection buMetricAreaCollecton = {buMetricAreaDef, 3, 0, sizeof(buMetricAreaDef) / sizeof(bUnitDef)};
static struct bUnitDef buImperialAreaDef[] = {
{"square mile", "square miles", "sq mi", "sq m","Square Miles", UN_SC_MI*UN_SC_MI, 0.0, B_UNIT_DEF_NONE},
@@ -163,7 +163,7 @@ static struct bUnitDef buImperialAreaDef[] = {
{"square thou", "square thous", "sq mil",NULL, "Square Thous", UN_SC_MIL*UN_SC_MIL, 0.0, B_UNIT_DEF_NONE},
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
-static struct bUnitCollection buImperialAreaCollecton = {buImperialAreaDef, 4, 0, sizeof(buImperialAreaDef)/sizeof(bUnitDef)};
+static struct bUnitCollection buImperialAreaCollecton = {buImperialAreaDef, 4, 0, sizeof(buImperialAreaDef) / sizeof(bUnitDef)};
/* Volumes */
static struct bUnitDef buMetricVolDef[] = {
@@ -177,7 +177,7 @@ static struct bUnitDef buMetricVolDef[] = {
{"cubic micrometer", "cubic micrometers", "µm³", "um3", "Cubic Micrometers", UN_SC_UM*UN_SC_UM*UN_SC_UM, 0.0, B_UNIT_DEF_NONE},
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
-static struct bUnitCollection buMetricVolCollecton = {buMetricVolDef, 3, 0, sizeof(buMetricVolDef)/sizeof(bUnitDef)};
+static struct bUnitCollection buMetricVolCollecton = {buMetricVolDef, 3, 0, sizeof(buMetricVolDef) / sizeof(bUnitDef)};
static struct bUnitDef buImperialVolDef[] = {
{"cubic mile", "cubic miles", "cu mi", "cu m","Cubic Miles", UN_SC_MI*UN_SC_MI*UN_SC_MI, 0.0, B_UNIT_DEF_NONE},
@@ -189,7 +189,7 @@ static struct bUnitDef buImperialVolDef[] = {
{"cubic thou", "cubic thous", "cu mil",NULL, "Cubic Thous", UN_SC_MIL*UN_SC_MIL*UN_SC_MIL, 0.0, B_UNIT_DEF_NONE},
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
-static struct bUnitCollection buImperialVolCollecton = {buImperialVolDef, 4, 0, sizeof(buImperialVolDef)/sizeof(bUnitDef)};
+static struct bUnitCollection buImperialVolCollecton = {buImperialVolDef, 4, 0, sizeof(buImperialVolDef) / sizeof(bUnitDef)};
/* Mass */
static struct bUnitDef buMetricMassDef[] = {
@@ -201,7 +201,7 @@ static struct bUnitDef buMetricMassDef[] = {
{"gram", "grams", "g", NULL, "Grams", UN_SC_G, 0.0, B_UNIT_DEF_NONE},
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
-static struct bUnitCollection buMetricMassCollecton = {buMetricMassDef, 2, 0, sizeof(buMetricMassDef)/sizeof(bUnitDef)};
+static struct bUnitCollection buMetricMassCollecton = {buMetricMassDef, 2, 0, sizeof(buMetricMassDef) / sizeof(bUnitDef)};
static struct bUnitDef buImperialMassDef[] = {
{"ton", "tonnes", "ton", "t", "Tonnes", UN_SC_ITON, 0.0, B_UNIT_DEF_NONE},
@@ -211,7 +211,7 @@ static struct bUnitDef buImperialMassDef[] = {
{"ounce", "ounces", "oz", NULL, "Ounces", UN_SC_OZ, 0.0, B_UNIT_DEF_NONE},
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
-static struct bUnitCollection buImperialMassCollecton = {buImperialMassDef, 3, 0, sizeof(buImperialMassDef)/sizeof(bUnitDef)};
+static struct bUnitCollection buImperialMassCollecton = {buImperialMassDef, 3, 0, sizeof(buImperialMassDef) / sizeof(bUnitDef)};
/* Even if user scales the system to a point where km^3 is used, velocity and
* acceleration aren't scaled: that's why we have so few units for them */
@@ -222,27 +222,27 @@ static struct bUnitDef buMetricVelDef[] = {
{"kilometer per hour", "kilometers per hour", "km/h", NULL, "Kilometers per hour", UN_SC_KM/3600.0f, 0.0, B_UNIT_DEF_SUPPRESS},
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
-static struct bUnitCollection buMetricVelCollecton = {buMetricVelDef, 0, 0, sizeof(buMetricVelDef)/sizeof(bUnitDef)};
+static struct bUnitCollection buMetricVelCollecton = {buMetricVelDef, 0, 0, sizeof(buMetricVelDef) / sizeof(bUnitDef)};
static struct bUnitDef buImperialVelDef[] = {
{"foot per second", "feet per second", "ft/s", "fps", "Feet per second", UN_SC_FT, 0.0, B_UNIT_DEF_NONE}, /* base unit */
{"mile per hour", "miles per hour", "mph", NULL, "Miles per hour", UN_SC_MI/3600.0f, 0.0,B_UNIT_DEF_SUPPRESS},
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
-static struct bUnitCollection buImperialVelCollecton = {buImperialVelDef, 0, 0, sizeof(buImperialVelDef)/sizeof(bUnitDef)};
+static struct bUnitCollection buImperialVelCollecton = {buImperialVelDef, 0, 0, sizeof(buImperialVelDef) / sizeof(bUnitDef)};
/* Acceleration */
static struct bUnitDef buMetricAclDef[] = {
{"meter per second squared", "meters per second squared", "m/s²", "m/s2", "Meters per second squared", UN_SC_M, 0.0, B_UNIT_DEF_NONE}, /* base unit */
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
-static struct bUnitCollection buMetricAclCollecton = {buMetricAclDef, 0, 0, sizeof(buMetricAclDef)/sizeof(bUnitDef)};
+static struct bUnitCollection buMetricAclCollecton = {buMetricAclDef, 0, 0, sizeof(buMetricAclDef) / sizeof(bUnitDef)};
static struct bUnitDef buImperialAclDef[] = {
{"foot per second squared", "feet per second squared", "ft/s²", "ft/s2", "Feet per second squared", UN_SC_FT, 0.0, B_UNIT_DEF_NONE}, /* base unit */
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
-static struct bUnitCollection buImperialAclCollecton = {buImperialAclDef, 0, 0, sizeof(buImperialAclDef)/sizeof(bUnitDef)};
+static struct bUnitCollection buImperialAclCollecton = {buImperialAclDef, 0, 0, sizeof(buImperialAclDef) / sizeof(bUnitDef)};
/* Time */
static struct bUnitDef buNaturalTimeDef[] = {
@@ -255,7 +255,7 @@ static struct bUnitDef buNaturalTimeDef[] = {
{"microsecond", "microseconds", "µs", "us", "Microseconds", 0.000001, 0.0, B_UNIT_DEF_NONE},
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
-static struct bUnitCollection buNaturalTimeCollecton = {buNaturalTimeDef, 3, 0, sizeof(buNaturalTimeDef)/sizeof(bUnitDef)};
+static struct bUnitCollection buNaturalTimeCollecton = {buNaturalTimeDef, 3, 0, sizeof(buNaturalTimeDef) / sizeof(bUnitDef)};
static struct bUnitDef buNaturalRotDef[] = {
@@ -264,7 +264,7 @@ static struct bUnitDef buNaturalRotDef[] = {
// {"turn", "turns", "t", NULL, "Turns", 1.0/(M_PI*2.0), 0.0,B_UNIT_DEF_NONE},
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
-static struct bUnitCollection buNaturalRotCollection = {buNaturalRotDef, 0, 0, sizeof(buNaturalRotDef)/sizeof(bUnitDef)};
+static struct bUnitCollection buNaturalRotCollection = {buNaturalRotDef, 0, 0, sizeof(buNaturalRotDef) / sizeof(bUnitDef)};
#define UNIT_SYSTEM_TOT (((sizeof(bUnitSystems) / 9) / sizeof(void *)) - 1)
static struct bUnitCollection *bUnitSystems[][9] = {
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index b3101638a4e..f72942df8b3 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -924,7 +924,7 @@ void BKE_ffmpeg_filepath_get(char *string, RenderData *rd)
fe++;
}
- if (!*fe) {
+ if (*fe == NULL) {
strcat(string, autosplit);
BLI_path_frame_range(string, rd->sfra, rd->efra, 4);
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index ec7b59702bd..5f564f71646 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -401,7 +401,7 @@ static void join_dirfile_alloc(char **dst, size_t *alloc_len, const char *dir, c
{
size_t len = strlen(dir) + strlen(file) + 1;
- if (!*dst)
+ if (*dst == NULL)
*dst = MEM_callocN(len + 1, "join_dirfile_alloc path");
else if (*alloc_len < len)
*dst = MEM_reallocN(*dst, len + 1);
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 46a0ac630c1..55428893963 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -806,7 +806,7 @@ void BLI_getlastdir(const char *dir, char *last, const size_t maxlen)
const char *BLI_getDefaultDocumentFolder(void)
{
#ifndef WIN32
- const char *xdg_documents_dir= getenv("XDG_DOCUMENTS_DIR");
+ const char *xdg_documents_dir = getenv("XDG_DOCUMENTS_DIR");
if (xdg_documents_dir)
return xdg_documents_dir;
diff --git a/source/blender/blenlib/intern/voronoi.c b/source/blender/blenlib/intern/voronoi.c
index accfbfc8c3c..eeb0187b74c 100644
--- a/source/blender/blenlib/intern/voronoi.c
+++ b/source/blender/blenlib/intern/voronoi.c
@@ -28,7 +28,7 @@
* http://blog.ivank.net/fortunes-algorithm-and-implementation.html
*/
-/** \file blender/blenkernel/intern/tracking.c
+/** \file blender/blenkernel/intern/voronoi.c
* \ingroup bli
*/
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c
index 0b2c3040df3..094b5af9a00 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.c
+++ b/source/blender/bmesh/intern/bmesh_polygon.c
@@ -699,14 +699,18 @@ static BMLoop *find_ear(BMFace *f, float (*verts)[3], const int nvert, const int
if (cos1 > cos_threshold) {
if (cos1 > fabsf(cos_v3v3v3(larr[i]->v->co, larr[i4]->v->co, larr[i + 2]->v->co)) &&
cos1 > fabsf(cos_v3v3v3(larr[i]->v->co, larr[i + 1]->v->co, larr[i + 2]->v->co)))
+ {
i = !i;
+ }
}
/* Last check we do not get overlapping triangles
* (as much as possible, ther are some cases with no good solution!) */
i4 = (i + 3) % 4;
if (!bm_face_goodline((float const (*)[3])verts, f, BM_elem_index_get(larr[i4]->v), BM_elem_index_get(larr[i]->v),
BM_elem_index_get(larr[i + 1]->v), nvert))
+ {
i = !i;
+ }
/* printf("%d\n", i);*/
bestear = larr[i];
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index 59927e961bf..ded937bf8f3 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -294,8 +294,7 @@ bool MeshImporter::is_nice_mesh(COLLADAFW::Mesh *mesh) // checks if mesh has su
}
- else if (type == COLLADAFW::MeshPrimitive::LINES)
- {
+ else if (type == COLLADAFW::MeshPrimitive::LINES) {
// TODO: Add Checker for line syntax here
}
@@ -582,8 +581,7 @@ void MeshImporter::read_lines(COLLADAFW::Mesh *mesh, Mesh *me)
COLLADAFW::MeshPrimitive *mp = prim_arr[i];
int type = mp->getPrimitiveType();
- if (type == COLLADAFW::MeshPrimitive::LINES)
- {
+ if (type == COLLADAFW::MeshPrimitive::LINES) {
unsigned int edge_count = mp->getFaceCount();
unsigned int *indices = mp->getPositionIndices().getData();
@@ -857,8 +855,7 @@ void MeshImporter::read_faces(COLLADAFW::Mesh *mesh, Mesh *me, int new_tris) //T
indices += vcount;
}
}
- else if (type == COLLADAFW::MeshPrimitive::LINES)
- {
+ else if (type == COLLADAFW::MeshPrimitive::LINES) {
continue; // read the lines later after all the rest is done
}
diff --git a/source/blender/collada/SceneExporter.cpp b/source/blender/collada/SceneExporter.cpp
index 65f552d5d0c..4aaff024cac 100644
--- a/source/blender/collada/SceneExporter.cpp
+++ b/source/blender/collada/SceneExporter.cpp
@@ -57,8 +57,7 @@ void SceneExporter::exportHierarchy(Scene *sce)
// Now find all exportable base ojects (highest in export hierarchy)
for (node = this->export_settings->export_set; node; node = node->next) {
Object *ob = (Object *) node->link;
- if (bc_is_base_node(this->export_settings->export_set, ob))
- {
+ if (bc_is_base_node(this->export_settings->export_set, ob)) {
switch (ob->type) {
case OB_MESH:
case OB_CAMERA:
@@ -86,8 +85,7 @@ void SceneExporter::writeNodes(Object *ob, Scene *sce)
// Add associated armature first if available
bool armature_exported = false;
Object *ob_arm = bc_get_assigned_armature(ob);
- if (ob_arm != NULL)
- {
+ if (ob_arm != NULL) {
armature_exported = bc_is_in_Export_set(this->export_settings->export_set, ob_arm);
if (armature_exported && bc_is_marked(ob_arm)) {
bc_remove_mark(ob_arm);
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index cb9da9918be..955d699d96c 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -187,8 +187,7 @@ Object *bc_get_assigned_armature(Object *ob)
Object *bc_get_highest_selected_ancestor_or_self(LinkNode *export_set, Object *ob)
{
Object *ancestor = ob;
- while (ob->parent && bc_is_marked(ob->parent))
- {
+ while (ob->parent && bc_is_marked(ob->parent)) {
ob = ob->parent;
ancestor = ob;
}
diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.cpp b/source/blender/compositor/intern/COM_OpenCLDevice.cpp
index 2dd44f8140f..eae1ffeb08a 100644
--- a/source/blender/compositor/intern/COM_OpenCLDevice.cpp
+++ b/source/blender/compositor/intern/COM_OpenCLDevice.cpp
@@ -23,7 +23,7 @@
#include "COM_OpenCLDevice.h"
#include "COM_WorkScheduler.h"
-typedef enum COM_VendorID {NVIDIA=0x10DE, AMD=0x1002} COM_VendorID;
+typedef enum COM_VendorID {NVIDIA = 0x10DE, AMD = 0x1002} COM_VendorID;
OpenCLDevice::OpenCLDevice(cl_context context, cl_device_id device, cl_program program, cl_int vendorId)
{
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h
index f992b22f300..c658d66429a 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h
@@ -61,7 +61,7 @@ public:
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
- void updateDispersion(MemoryBuffer** inputBuffers);
+ void updateDispersion(MemoryBuffer **inputBuffers);
};
#endif
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h
index d990651dd7d..7e4fda0f755 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h
@@ -68,7 +68,7 @@ public:
private:
void determineUV(float *result, float x, float y) const;
- void updateDispersionAndDistortion(MemoryBuffer** inputBuffers);
+ void updateDispersionAndDistortion(MemoryBuffer **inputBuffers);
};
#endif
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index fe46a5dc9c5..407b2308af8 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1888,8 +1888,8 @@ void init_userdef_do_versions(void)
rgba_char_args_set(btheme->tact.anim_active, 204, 112, 26, 102);
/* NLA Colors */
- rgba_char_args_set(btheme->tnla.anim_active, 204, 112, 26, 102); /* same as dopesheet above */
- rgba_char_args_set(btheme->tnla.anim_non_active,153, 135, 97, 77);
+ rgba_char_args_set(btheme->tnla.anim_active, 204, 112, 26, 102); /* same as dopesheet above */
+ rgba_char_args_set(btheme->tnla.anim_non_active, 153, 135, 97, 77);
rgba_char_args_set(btheme->tnla.nla_tweaking, 77, 243, 26, 77);
rgba_char_args_set(btheme->tnla.nla_tweakdupli, 217, 0, 0, 255);
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c
index dca38e53934..20ac3333115 100644
--- a/source/blender/editors/io/io_collada.c
+++ b/source/blender/editors/io/io_collada.c
@@ -24,7 +24,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/editors/io/collada.c
+/** \file blender/editors/io/io_collada.c
* \ingroup collada
*/
#ifdef WITH_COLLADA
@@ -157,59 +157,59 @@ void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
row = uiLayoutRow(box, 0);
split = uiLayoutSplit(row, 0.6f, UI_LAYOUT_ALIGN_RIGHT);
- col = uiLayoutColumn(split,0);
+ col = uiLayoutColumn(split, FALSE);
uiItemR(col, imfptr, "apply_modifiers", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(split,0);
+ col = uiLayoutColumn(split, FALSE);
uiItemR(col, imfptr, "export_mesh_type_selection", 0, "", ICON_NONE);
uiLayoutSetEnabled(col, RNA_boolean_get(imfptr, "apply_modifiers"));
- row = uiLayoutRow(box, 0);
+ row = uiLayoutRow(box, FALSE);
uiItemR(row, imfptr, "selected", 0, NULL, ICON_NONE);
- row = uiLayoutRow(box, 0);
+ row = uiLayoutRow(box, FALSE);
uiItemR(row, imfptr, "include_children", 0, NULL, ICON_NONE);
uiLayoutSetEnabled(row, RNA_boolean_get(imfptr, "selected"));
- row = uiLayoutRow(box, 0);
+ row = uiLayoutRow(box, FALSE);
uiItemR(row, imfptr, "include_armatures", 0, NULL, ICON_NONE);
uiLayoutSetEnabled(row, RNA_boolean_get(imfptr, "selected"));
// Texture options
box = uiLayoutBox(layout);
- row = uiLayoutRow(box, 0);
+ row = uiLayoutRow(box, FALSE);
uiItemL(row, IFACE_("Texture Options:"), ICON_TEXTURE_DATA);
- row = uiLayoutRow(box, 0);
+ row = uiLayoutRow(box, FALSE);
uiItemR(row, imfptr, "active_uv_only", 0, NULL, ICON_NONE);
- row = uiLayoutRow(box, 0);
+ row = uiLayoutRow(box, FALSE);
uiItemR(row, imfptr, "include_uv_textures", 0, NULL, ICON_NONE);
- row = uiLayoutRow(box, 0);
+ row = uiLayoutRow(box, FALSE);
uiItemR(row, imfptr, "include_material_textures", 0, NULL, ICON_NONE);
- row = uiLayoutRow(box, 0);
+ row = uiLayoutRow(box, FALSE);
uiItemR(row, imfptr, "use_texture_copies", 1, NULL, ICON_NONE);
// Armature options
box = uiLayoutBox(layout);
- row = uiLayoutRow(box, 0);
+ row = uiLayoutRow(box, FALSE);
uiItemL(row, IFACE_("Armature Options:"), ICON_ARMATURE_DATA);
- row = uiLayoutRow(box, 0);
+ row = uiLayoutRow(box, FALSE);
uiItemR(row, imfptr, "deform_bones_only", 0, NULL, ICON_NONE);
- row = uiLayoutRow(box, 0);
+ row = uiLayoutRow(box, FALSE);
uiItemR(row, imfptr, "second_life", 0, NULL, ICON_NONE);
/* Collada options: */
box = uiLayoutBox(layout);
- row = uiLayoutRow(box, 0);
+ row = uiLayoutRow(box, FALSE);
uiItemL(row, IFACE_("Collada Options:"), ICON_MODIFIER);
- row = uiLayoutRow(box, 0);
+ row = uiLayoutRow(box, FALSE);
uiItemR(row, imfptr, "use_object_instantiation", 0, NULL, ICON_NONE);
- row = uiLayoutRow(box, 0);
+ row = uiLayoutRow(box, FALSE);
uiItemR(row, imfptr, "sort_by_name", 0, NULL, ICON_NONE);
}
diff --git a/source/blender/editors/io/io_ops.h b/source/blender/editors/io/io_ops.h
index 1e2c4443e43..4c04b349655 100644
--- a/source/blender/editors/io/io_ops.h
+++ b/source/blender/editors/io/io_ops.h
@@ -24,7 +24,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/editor/io/io_collada.h
+/** \file blender/editor/io/io_ops.h
* \ingroup editor/io
*/
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index cacd6d01291..6782cd55a8b 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -458,7 +458,7 @@ int ED_operator_editmball(bContext *C)
int ED_operator_mask(bContext *C)
{
- SpaceClip *sc= CTX_wm_space_clip(C);
+ SpaceClip *sc = CTX_wm_space_clip(C);
return ED_space_clip_check_show_maskedit(sc);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_buttons.c b/source/blender/editors/space_sequencer/sequencer_buttons.c
index 1e452f2052d..7dbcabedccc 100644
--- a/source/blender/editors/space_sequencer/sequencer_buttons.c
+++ b/source/blender/editors/space_sequencer/sequencer_buttons.c
@@ -58,7 +58,7 @@ void sequencer_buttons_register(ARegionType *art)
pt = MEM_callocN(sizeof(PanelType), "spacetype sequencer panel gpencil");
strcpy(pt->idname, "SEQUENCER_PT_gpencil");
strcpy(pt->label, N_("Grease Pencil"));
- pt->draw= gpencil_panel_standard;
+ pt->draw = gpencil_panel_standard;
BLI_addtail(&art->paneltypes, pt);
}
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 3ebc4eb974c..f0275fb6584 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -830,7 +830,7 @@ void TEXT_OT_paste(wmOperatorType *ot)
static int text_duplicate_line_exec(bContext *C, wmOperator *UNUSED(op))
{
- Text *text= CTX_data_edit_text(C);
+ Text *text = CTX_data_edit_text(C);
txt_duplicate_line(text);
@@ -1341,7 +1341,7 @@ static int move_lines_exec(bContext *C, wmOperator *op)
txt_move_lines(text, direction);
text_update_cursor_moved(C);
- WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text);
+ WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text);
/* run the script while editing, evil but useful */
if (CTX_wm_space_text(C)->live_edit)
@@ -1352,7 +1352,7 @@ static int move_lines_exec(bContext *C, wmOperator *op)
void TEXT_OT_move_lines(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[]= {
+ static EnumPropertyItem direction_items[] = {
{TXT_MOVE_LINE_UP, "UP", 0, "Up", ""},
{TXT_MOVE_LINE_DOWN, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/space_userpref/space_userpref.c b/source/blender/editors/space_userpref/space_userpref.c
index 248f73b9ab6..5376b82f24c 100644
--- a/source/blender/editors/space_userpref/space_userpref.c
+++ b/source/blender/editors/space_userpref/space_userpref.c
@@ -57,23 +57,23 @@ static SpaceLink *userpref_new(const bContext *UNUSED(C))
{
ARegion *ar;
SpaceUserPref *spref;
-
- spref= MEM_callocN(sizeof(SpaceUserPref), "inituserpref");
- spref->spacetype= SPACE_USERPREF;
-
+
+ spref = MEM_callocN(sizeof(SpaceUserPref), "inituserpref");
+ spref->spacetype = SPACE_USERPREF;
+
/* header */
- ar= MEM_callocN(sizeof(ARegion), "header for userpref");
-
+ ar = MEM_callocN(sizeof(ARegion), "header for userpref");
+
BLI_addtail(&spref->regionbase, ar);
- ar->regiontype= RGN_TYPE_HEADER;
- ar->alignment= RGN_ALIGN_BOTTOM;
-
+ ar->regiontype = RGN_TYPE_HEADER;
+ ar->alignment = RGN_ALIGN_BOTTOM;
+
/* main area */
- ar= MEM_callocN(sizeof(ARegion), "main area for userpref");
-
+ ar = MEM_callocN(sizeof(ARegion), "main area for userpref");
+
BLI_addtail(&spref->regionbase, ar);
- ar->regiontype= RGN_TYPE_WINDOW;
-
+ ar->regiontype = RGN_TYPE_WINDOW;
+
return (SpaceLink *)spref;
}
@@ -93,10 +93,10 @@ static void userpref_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa
static SpaceLink *userpref_duplicate(SpaceLink *sl)
{
- SpaceUserPref *sprefn= MEM_dupallocN(sl);
-
+ SpaceUserPref *sprefn = MEM_dupallocN(sl);
+
/* clear or remove stuff from old */
-
+
return (SpaceLink *)sprefn;
}
@@ -155,41 +155,41 @@ static void userpref_header_listener(ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn
/* only called once, from space/spacetypes.c */
void ED_spacetype_userpref(void)
{
- SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype userpref");
+ SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype userpref");
ARegionType *art;
-
- st->spaceid= SPACE_USERPREF;
+
+ st->spaceid = SPACE_USERPREF;
strncpy(st->name, "Userpref", BKE_ST_MAXNAME);
-
- st->new= userpref_new;
- st->free= userpref_free;
- st->init= userpref_init;
- st->duplicate= userpref_duplicate;
- st->operatortypes= userpref_operatortypes;
- st->keymap= userpref_keymap;
-
+
+ st->new = userpref_new;
+ st->free = userpref_free;
+ st->init = userpref_init;
+ st->duplicate = userpref_duplicate;
+ st->operatortypes = userpref_operatortypes;
+ st->keymap = userpref_keymap;
+
/* regions: main window */
- art= MEM_callocN(sizeof(ARegionType), "spacetype userpref region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype userpref region");
art->regionid = RGN_TYPE_WINDOW;
- art->init= userpref_main_area_init;
- art->draw= userpref_main_area_draw;
- art->listener= userpref_main_area_listener;
- art->keymapflag= ED_KEYMAP_UI;
+ art->init = userpref_main_area_init;
+ art->draw = userpref_main_area_draw;
+ art->listener = userpref_main_area_listener;
+ art->keymapflag = ED_KEYMAP_UI;
BLI_addhead(&st->regiontypes, art);
-
+
/* regions: header */
- art= MEM_callocN(sizeof(ARegionType), "spacetype userpref region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype userpref region");
art->regionid = RGN_TYPE_HEADER;
- art->prefsizey= HEADERY;
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_HEADER;
- art->listener= userpref_header_listener;
- art->init= userpref_header_area_init;
- art->draw= userpref_header_area_draw;
-
+ art->prefsizey = HEADERY;
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER;
+ art->listener = userpref_header_listener;
+ art->init = userpref_header_area_init;
+ art->draw = userpref_header_area_draw;
+
BLI_addhead(&st->regiontypes, art);
-
-
+
+
BKE_spacetype_register(st);
}
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index 55fb3322806..17ee8723e53 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -891,7 +891,7 @@ typedef enum eAnimData_Flag {
typedef enum eAnimData_Recalc {
ADT_RECALC_DRIVERS = (1<<0),
ADT_RECALC_ANIM = (1<<1),
- ADT_RECALC_ALL = (ADT_RECALC_DRIVERS|ADT_RECALC_ANIM)
+ ADT_RECALC_ALL = (ADT_RECALC_DRIVERS | ADT_RECALC_ANIM)
} eAnimData_Recalc;
/* Base Struct for Anim ------------------------------------- */
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 3bceb0277d5..6a8022c07a5 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -625,7 +625,7 @@ typedef struct GameData {
short ticrate, maxlogicstep, physubstep, maxphystep;
short obstacleSimulation, pad1;
float levelHeight;
- float deactivationtime, lineardeactthreshold, angulardeactthreshold,pad2;
+ float deactivationtime, lineardeactthreshold, angulardeactthreshold, pad2;
} GameData;
#define STEREO_NOSTEREO 1
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index 2498cba42ef..8be743335cc 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -659,10 +659,10 @@ static eSDNA_Type sdna_type_nr(const char *dna_type)
if ((strcmp(dna_type, "char") == 0) || (strcmp(dna_type, "const char") == 0)) return SDNA_TYPE_CHAR;
else if ((strcmp(dna_type, "uchar") == 0) || (strcmp(dna_type, "unsigned char") == 0)) return SDNA_TYPE_UCHAR;
else if ( strcmp(dna_type, "short") == 0) return SDNA_TYPE_SHORT;
- else if ((strcmp(dna_type, "ushort") == 0)||(strcmp(dna_type, "unsigned short") == 0)) return SDNA_TYPE_USHORT;
+ else if ((strcmp(dna_type, "ushort") == 0) || (strcmp(dna_type, "unsigned short") == 0)) return SDNA_TYPE_USHORT;
else if ( strcmp(dna_type, "int") == 0) return SDNA_TYPE_INT;
else if ( strcmp(dna_type, "long") == 0) return SDNA_TYPE_LONG;
- else if ((strcmp(dna_type, "ulong") == 0)||(strcmp(dna_type, "unsigned long") == 0)) return SDNA_TYPE_ULONG;
+ else if ((strcmp(dna_type, "ulong") == 0) || (strcmp(dna_type, "unsigned long") == 0)) return SDNA_TYPE_ULONG;
else if ( strcmp(dna_type, "float") == 0) return SDNA_TYPE_FLOAT;
else if ( strcmp(dna_type, "double") == 0) return SDNA_TYPE_DOUBLE;
else if ( strcmp(dna_type, "int64_t") == 0) return SDNA_TYPE_INT64;
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index ae8b0c51544..e44d6a11136 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -1116,7 +1116,7 @@ static void rna_def_constraint_action(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object Action",
"Bones only: apply the object's transformation channels of the action "
"to the constrained bone, instead of bone's channels");
- RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+ RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "start");
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index f70fe9082af..86d06b7e062 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -1187,7 +1187,7 @@ static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_ui_description(func, "Remove a spline from a curve");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
#endif
}
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 333f6878413..144b8a7f90c 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -1136,9 +1136,9 @@ static void rna_def_drivertarget(BlenderRNA *brna)
{0, "WORLD_SPACE", 0, "World Space", "Transforms include effects of parenting/restpose and constraints"},
{DTAR_FLAG_LOCALSPACE, "TRANSFORM_SPACE", 0, "Transform Space",
"Transforms don't include parenting/restpose or constraints"},
- {DTAR_FLAG_LOCALSPACE|DTAR_FLAG_LOCAL_CONSTS, "LOCAL_SPACE", 0, "Local Space",
- "Transforms include effects of constraints but not "
- "parenting/restpose"},
+ {DTAR_FLAG_LOCALSPACE | DTAR_FLAG_LOCAL_CONSTS, "LOCAL_SPACE", 0, "Local Space",
+ "Transforms include effects of constraints but not "
+ "parenting/restpose"},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index 6ac032e5d99..c98e1f3312b 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -255,7 +255,7 @@ static void rna_Main_movieclips_begin(CollectionPropertyIterator *iter, PointerR
static void rna_Main_masks_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->mask, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 98b3c0ab9f4..c702972b3b7 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -1548,12 +1548,12 @@ void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "BlendDataMasks");
- srna= RNA_def_struct(brna, "BlendDataMasks", NULL);
+ srna = RNA_def_struct(brna, "BlendDataMasks", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Masks", "Collection of masks");
- func= RNA_def_function(srna, "tag", "rna_Main_masks_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_masks_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* new func */
@@ -1565,10 +1565,10 @@ void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_return(func, parm);
/* remove func */
- func= RNA_def_function(srna, "remove", "rna_Main_masks_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_masks_remove");
RNA_def_function_ui_description(func, "Remove a masks from the current blendfile.");
- parm= RNA_def_pointer(func, "mask", "Mask", "", "Mask to remove");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+ parm = RNA_def_pointer(func, "mask", "Mask", "", "Mask to remove");
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c
index 51dfa020bea..b879d2b19f7 100644
--- a/source/blender/makesrna/intern/rna_mask.c
+++ b/source/blender/makesrna/intern/rna_mask.c
@@ -66,7 +66,7 @@ static void rna_Mask_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin
{
Mask *mask = ptr->id.data;
- WM_main_add_notifier(NC_MASK|ND_DATA, mask);
+ WM_main_add_notifier(NC_MASK | ND_DATA, mask);
DAG_id_tag_update( &mask->id, 0);
}
@@ -327,7 +327,7 @@ static MaskLayer *rna_Mask_layer_new(Mask *mask, const char *name)
{
MaskLayer *masklay = BKE_mask_layer_new(mask, name);
- WM_main_add_notifier(NC_MASK|NA_EDITED, mask);
+ WM_main_add_notifier(NC_MASK | NA_EDITED, mask);
return masklay;
}
@@ -336,7 +336,7 @@ void rna_Mask_layer_remove(Mask *mask, MaskLayer *masklay)
{
BKE_mask_layer_remove(mask, masklay);
- WM_main_add_notifier(NC_MASK|NA_EDITED, mask);
+ WM_main_add_notifier(NC_MASK | NA_EDITED, mask);
}
static void rna_MaskLayer_spline_add(ID *id, MaskLayer *masklay, int number)
@@ -347,7 +347,7 @@ static void rna_MaskLayer_spline_add(ID *id, MaskLayer *masklay, int number)
for (i = 0; i < number; i++)
BKE_mask_spline_add(masklay);
- WM_main_add_notifier(NC_MASK|NA_EDITED, mask);
+ WM_main_add_notifier(NC_MASK | NA_EDITED, mask);
}
static void rna_Mask_start_frame_set(PointerRNA *ptr, int value)
@@ -526,14 +526,14 @@ static void rna_def_mask_splines(BlenderRNA *brna)
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MaskSpline");
RNA_def_property_pointer_funcs(prop, "rna_MaskLayer_active_spline_get", "rna_MaskLayer_active_spline_set", NULL, NULL);
- RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_UNLINK);
+ RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK);
RNA_def_property_ui_text(prop, "Active Spline", "Active spline of masking layer");
/* active point */
prop = RNA_def_property(srna, "active_point", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MaskSplinePoint");
RNA_def_property_pointer_funcs(prop, "rna_MaskLayer_active_spline_point_get", "rna_MaskLayer_active_spline_point_set", NULL, NULL);
- RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_UNLINK);
+ RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK);
RNA_def_property_ui_text(prop, "Active Spline", "Active spline of masking layer");
}
@@ -675,7 +675,7 @@ static void rna_def_masklayers(BlenderRNA *brna, PropertyRNA *cprop)
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MaskLayer");
RNA_def_property_pointer_funcs(prop, "rna_Mask_layer_active_get", "rna_Mask_layer_active_set", NULL, NULL);
- RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_UNLINK);
+ RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK);
RNA_def_property_ui_text(prop, "Active Shape", "Active layer in this mask");
}
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 7daa0d97834..f13cf65b7b7 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -2374,7 +2374,7 @@ static void rna_def_loop_colors(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_ui_description(func, "Remove a vertex color layer");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm = RNA_def_pointer(func, "layer", "Layer", "", "The layer to remove");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
#endif
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED);
@@ -2551,7 +2551,7 @@ static void rna_def_uv_textures(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_ui_description(func, "Remove a vertex color layer");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm = RNA_def_pointer(func, "layer", "Layer", "", "The layer to remove");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
#endif
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED);
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 33eb755a96d..d7970bf3d40 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -2049,10 +2049,10 @@ static void def_cmp_dilate_erode(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem type_items[] = {
- {CMP_NODE_DILATEERODE_STEP, "STEP", 0, "Step", ""},
- {CMP_NODE_DILATEERODE_DISTANCE_THRESH, "THRESHOLD", 0, "Threshold", ""},
- {CMP_NODE_DILATEERODE_DISTANCE, "DISTANCE", 0, "Distance", ""},
- {CMP_NODE_DILATEERODE_DISTANCE_FEATHER,"FEATHER", 0, "Feather", ""},
+ {CMP_NODE_DILATEERODE_STEP, "STEP", 0, "Step", ""},
+ {CMP_NODE_DILATEERODE_DISTANCE_THRESH, "THRESHOLD", 0, "Threshold", ""},
+ {CMP_NODE_DILATEERODE_DISTANCE, "DISTANCE", 0, "Distance", ""},
+ {CMP_NODE_DILATEERODE_DISTANCE_FEATHER, "FEATHER", 0, "Feather", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -3551,14 +3551,14 @@ static void def_cmp_keyingscreen(StructRNA *srna)
RNA_def_property_struct_type(prop, "MovieClip");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Movie Clip", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
RNA_def_struct_sdna_from(srna, "NodeKeyingScreenData", "storage");
prop = RNA_def_property(srna, "tracking_object", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "tracking_object");
RNA_def_property_ui_text(prop, "Tracking Object", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
}
static void def_cmp_keying(StructRNA *srna)
@@ -3571,19 +3571,19 @@ static void def_cmp_keying(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "screen_balance");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Screen Balance", "Balance between two non-primary channels primary channel is comparing against");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "despill_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "despill_factor");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Despill", "Factor of despilling screen color from image");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "clip_black", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "clip_black");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clip Black", "Value of non-scaled matte pixel which considers as fully background pixel");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "clip_white", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "clip_white");
@@ -3595,31 +3595,31 @@ static void def_cmp_keying(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "blur_pre");
RNA_def_property_range(prop, 0, 2048);
RNA_def_property_ui_text(prop, "Pre Blur", "Chroma pre-blur size which applies before running keyer");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "blur_post", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "blur_post");
RNA_def_property_range(prop, 0, 2048);
RNA_def_property_ui_text(prop, "Post Blur", "Matte blur size which applies after clipping and dilate/eroding");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "dilate_distance", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dilate_distance");
RNA_def_property_range(prop, -100, 100);
RNA_def_property_ui_text(prop, "Dilate/Erode", "Matte dilate/erode side");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "edge_kernel_radius", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "edge_kernel_radius");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Edge Kernel Radius", "Radius of kernel used to detect whether pixel belongs to edge");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "edge_kernel_tolerance", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "edge_kernel_tolerance");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Edge Kernel Tolerance", "Tolerance to pixels inside kernel which are treating as belonging to the same plane");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "feather_falloff", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "feather_falloff");
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 5072bda7508..51c49cf9e53 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -952,8 +952,8 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value)
break;
case OB_BODY_TYPE_CHARACTER:
ob->gameflag |= OB_COLLISION | OB_GHOST | OB_CHARACTER;
- ob->gameflag &= ~(OB_SENSOR | OB_OCCLUDER | OB_DYNAMIC | OB_RIGID_BODY | OB_SOFT_BODY | OB_ACTOR
- | OB_ANISOTROPIC_FRICTION | OB_DO_FH | OB_ROT_FH | OB_COLLISION_RESPONSE | OB_NAVMESH);
+ ob->gameflag &= ~(OB_SENSOR | OB_OCCLUDER | OB_DYNAMIC | OB_RIGID_BODY | OB_SOFT_BODY | OB_ACTOR |
+ OB_ANISOTROPIC_FRICTION | OB_DO_FH | OB_ROT_FH | OB_COLLISION_RESPONSE | OB_NAVMESH);
break;
case OB_BODY_TYPE_STATIC:
ob->gameflag |= OB_COLLISION;
@@ -1544,17 +1544,17 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Velocity Max", "Clamp velocity to this maximum speed");
- prop= RNA_def_property(srna, "step_height", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "step_height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "step_height");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Step Height", "Maximum height of steps the character can run over");
- prop= RNA_def_property(srna, "jump_speed", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "jump_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "jump_speed");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Jump Force", "Upward velocity applied to the character when jumping (with the Motion actuator)");
- prop= RNA_def_property(srna, "fall_speed", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fall_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fall_speed");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Fall Speed Max", "Maximum speed at which the character will fall");
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index eaf1ae09524..bb8a29f8fe4 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -1118,8 +1118,8 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
{ITASC_INITIAL_REITERATION, "INITIAL", 0, "Initial",
"The solver reiterates (converges) on the first frame but not on "
"subsequent frame"},
- {ITASC_INITIAL_REITERATION|ITASC_REITERATION, "ALWAYS", 0, "Always",
- "The solver reiterates (converges) on all frames"},
+ {ITASC_INITIAL_REITERATION | ITASC_REITERATION, "ALWAYS", 0, "Always",
+ "The solver reiterates (converges) on all frames"},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/render/intern/raytrace/rayobject_instance.cpp b/source/blender/render/intern/raytrace/rayobject_instance.cpp
index 92a412103ba..bfbc1c64133 100644
--- a/source/blender/render/intern/raytrace/rayobject_instance.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_instance.cpp
@@ -77,32 +77,32 @@ typedef struct InstanceRayObject {
RayObject *RE_rayobject_instance_create(RayObject *target, float transform[][4], void *ob, void *target_ob)
{
- InstanceRayObject *obj= (InstanceRayObject*)MEM_callocN(sizeof(InstanceRayObject), "InstanceRayObject");
- assert( RE_rayobject_isAligned(obj) ); /* RayObject API assumes real data to be 4-byte aligned */
-
+ InstanceRayObject *obj = (InstanceRayObject *)MEM_callocN(sizeof(InstanceRayObject), "InstanceRayObject");
+ assert(RE_rayobject_isAligned(obj) ); /* RayObject API assumes real data to be 4-byte aligned */
+
obj->rayobj.api = &instance_api;
obj->target = target;
obj->ob = ob;
obj->target_ob = target_ob;
-
+
copy_m4_m4(obj->target2global, transform);
invert_m4_m4(obj->global2target, obj->target2global);
-
- return RE_rayobject_unalignRayAPI((RayObject*) obj);
+
+ return RE_rayobject_unalignRayAPI((RayObject *) obj);
}
static int RE_rayobject_instance_intersect(RayObject *o, Isect *isec)
{
- InstanceRayObject *obj = (InstanceRayObject*)o;
+ InstanceRayObject *obj = (InstanceRayObject *)o;
float start[3], dir[3], idot_axis[3], dist;
int changed = 0, i, res;
-
+
// TODO - this is disabling self intersection on instances
if (isec->orig.ob == obj->ob && obj->ob) {
changed = 1;
isec->orig.ob = obj->target_ob;
}
-
+
// backup old values
copy_v3_v3(start, isec->start);
copy_v3_v3(dir, isec->dir);
@@ -113,16 +113,16 @@ static int RE_rayobject_instance_intersect(RayObject *o, Isect *isec)
mul_m4_v3(obj->global2target, isec->start);
mul_mat3_m4_v3(obj->global2target, isec->dir);
isec->dist *= normalize_v3(isec->dir);
-
+
// update idot_axis and bv_index
- for (i=0; i<3; i++) {
- isec->idot_axis[i] = 1.0f / isec->dir[i];
-
- isec->bv_index[2*i] = isec->idot_axis[i] < 0.0 ? 1 : 0;
- isec->bv_index[2*i+1] = 1 - isec->bv_index[2*i];
-
- isec->bv_index[2*i] = i+3*isec->bv_index[2*i];
- isec->bv_index[2*i+1] = i+3*isec->bv_index[2*i+1];
+ for (i = 0; i < 3; i++) {
+ isec->idot_axis[i] = 1.0f / isec->dir[i];
+
+ isec->bv_index[2 * i] = isec->idot_axis[i] < 0.0 ? 1 : 0;
+ isec->bv_index[2 * i + 1] = 1 - isec->bv_index[2 * i];
+
+ isec->bv_index[2 * i] = i + 3 * isec->bv_index[2 * i];
+ isec->bv_index[2 * i + 1] = i + 3 * isec->bv_index[2 * i + 1];
}
// raycast
@@ -143,11 +143,11 @@ static int RE_rayobject_instance_intersect(RayObject *o, Isect *isec)
isec->dist = len_v3(vec);
isec->hit.ob = obj->ob;
-#ifdef RT_USE_LAST_HIT
+#ifdef RT_USE_LAST_HIT
// TODO support for last hit optimization in instances that can jump
// directly to the last hit face.
// For now it jumps directly to the last-hit instance root node.
- isec->last_hit = RE_rayobject_unalignRayAPI((RayObject*) obj);
+ isec->last_hit = RE_rayobject_unalignRayAPI((RayObject *) obj);
#endif
}
@@ -155,19 +155,19 @@ static int RE_rayobject_instance_intersect(RayObject *o, Isect *isec)
copy_v3_v3(isec->start, start);
copy_v3_v3(isec->dir, dir);
copy_v3_v3(isec->idot_axis, idot_axis);
-
+
if (changed)
isec->orig.ob = obj->ob;
// restore bv_index
- for (i=0; i<3; i++) {
- isec->bv_index[2*i] = isec->idot_axis[i] < 0.0 ? 1 : 0;
- isec->bv_index[2*i+1] = 1 - isec->bv_index[2*i];
-
- isec->bv_index[2*i] = i+3*isec->bv_index[2*i];
- isec->bv_index[2*i+1] = i+3*isec->bv_index[2*i+1];
+ for (i = 0; i < 3; i++) {
+ isec->bv_index[2 * i] = isec->idot_axis[i] < 0.0 ? 1 : 0;
+ isec->bv_index[2 * i + 1] = 1 - isec->bv_index[2 * i];
+
+ isec->bv_index[2 * i] = i + 3 * isec->bv_index[2 * i];
+ isec->bv_index[2 * i + 1] = i + 3 * isec->bv_index[2 * i + 1];
}
-
+
return res;
}
@@ -188,7 +188,7 @@ static void RE_rayobject_instance_bb(RayObject *o, float *min, float *max)
//TODO:
// *better bb.. calculated without rotations of bb
// *maybe cache that better-fitted-BB at the InstanceRayObject
- InstanceRayObject *obj = (InstanceRayObject*)o;
+ InstanceRayObject *obj = (InstanceRayObject *)o;
float m[3], M[3], t[3];
int i, j;
@@ -196,8 +196,8 @@ static void RE_rayobject_instance_bb(RayObject *o, float *min, float *max)
RE_rayobject_merge_bb(obj->target, m, M);
//There must be a faster way than rotating all the 8 vertexs of the BB
- for (i=0; i<8; i++) {
- for (j=0; j<3; j++) t[j] = i&(1<<j) ? M[j] : m[j];
+ for (i = 0; i < 8; i++) {
+ for (j = 0; j < 3; j++) t[j] = i & (1 << j) ? M[j] : m[j];
mul_m4_v3(obj->target2global, t);
DO_MINMAX(t, min, max);
}