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-04-29 21:11:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-29 21:11:40 +0400
commit343edf2722a9e114b98944c1147676e630e699b7 (patch)
tree7b969239ccab922b6390e040f85e96afa956932a /source/blender/blenkernel/intern
parentb6c1850fd35c040c9d489eb42c2190f38564d381 (diff)
style cleanup: function calls & whitespace.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c30
-rw-r--r--source/blender/blenkernel/intern/action.c20
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c36
-rw-r--r--source/blender/blenkernel/intern/armature.c6
-rw-r--r--source/blender/blenkernel/intern/blender.c2
-rw-r--r--source/blender/blenkernel/intern/bmfont.c4
-rw-r--r--source/blender/blenkernel/intern/bvhutils.c2
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c34
-rw-r--r--source/blender/blenkernel/intern/cloth.c42
-rw-r--r--source/blender/blenkernel/intern/collision.c88
-rw-r--r--source/blender/blenkernel/intern/constraint.c32
-rw-r--r--source/blender/blenkernel/intern/curve.c41
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c6
-rw-r--r--source/blender/blenkernel/intern/displist.c14
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c29
-rw-r--r--source/blender/blenkernel/intern/fcurve.c50
-rw-r--r--source/blender/blenkernel/intern/fluidsim.c4
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c16
-rw-r--r--source/blender/blenkernel/intern/gpencil.c16
-rw-r--r--source/blender/blenkernel/intern/group.c2
-rw-r--r--source/blender/blenkernel/intern/implicit.c8
-rw-r--r--source/blender/blenkernel/intern/ipo.c2
-rw-r--r--source/blender/blenkernel/intern/material.c2
-rw-r--r--source/blender/blenkernel/intern/mball.c18
-rw-r--r--source/blender/blenkernel/intern/nla.c74
-rw-r--r--source/blender/blenkernel/intern/particle.c18
-rw-r--r--source/blender/blenkernel/intern/particle_system.c20
-rw-r--r--source/blender/blenkernel/intern/scene.c2
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c10
-rw-r--r--source/blender/blenkernel/intern/shrinkwrap.c18
-rw-r--r--source/blender/blenkernel/intern/smoke.c2
-rw-r--r--source/blender/blenkernel/intern/softbody.c22
-rw-r--r--source/blender/blenkernel/intern/text.c42
-rw-r--r--source/blender/blenkernel/intern/texture.c2
34 files changed, 357 insertions, 357 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 4406ca62e26..74373d28c14 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -371,7 +371,7 @@ void DM_ensure_tessface(DerivedMesh *dm)
const int numTessFaces = dm->getNumTessFaces(dm);
const int numPolys = dm->getNumPolys(dm);
- if ( (numTessFaces == 0) && (numPolys != 0)) {
+ if ((numTessFaces == 0) && (numPolys != 0)) {
dm->recalcTessellation(dm);
if (dm->getNumTessFaces(dm) != 0) {
@@ -2413,7 +2413,7 @@ static void GetTextureCoordinate(const SMikkTSpaceContext * pContext, float fUV[
}
else {
const float *orco= pMesh->orco[(&pMesh->mface[face_num].v1)[vert_index]];
- map_to_sphere( &fUV[0], &fUV[1], orco[0], orco[1], orco[2]);
+ map_to_sphere(&fUV[0], &fUV[1], orco[0], orco[1], orco[2]);
}
}
@@ -2551,11 +2551,11 @@ void DM_add_tangent_layer(DerivedMesh *dm)
}
else {
uv1= uv[0]; uv2= uv[1]; uv3= uv[2]; uv4= uv[3];
- map_to_sphere( &uv[0][0], &uv[0][1], orco[mf->v1][0], orco[mf->v1][1], orco[mf->v1][2]);
- map_to_sphere( &uv[1][0], &uv[1][1], orco[mf->v2][0], orco[mf->v2][1], orco[mf->v2][2]);
- map_to_sphere( &uv[2][0], &uv[2][1], orco[mf->v3][0], orco[mf->v3][1], orco[mf->v3][2]);
+ map_to_sphere(&uv[0][0], &uv[0][1], orco[mf->v1][0], orco[mf->v1][1], orco[mf->v1][2]);
+ map_to_sphere(&uv[1][0], &uv[1][1], orco[mf->v2][0], orco[mf->v2][1], orco[mf->v2][2]);
+ map_to_sphere(&uv[2][0], &uv[2][1], orco[mf->v3][0], orco[mf->v3][1], orco[mf->v3][2]);
if (v4)
- map_to_sphere( &uv[3][0], &uv[3][1], orco[mf->v4][0], orco[mf->v4][1], orco[mf->v4][2]);
+ map_to_sphere(&uv[3][0], &uv[3][1], orco[mf->v4][0], orco[mf->v4][1], orco[mf->v4][2]);
}
tangent_from_uv(uv1, uv2, uv3, v1->co, v2->co, v3->co, fno, tang);
@@ -2578,11 +2578,11 @@ void DM_add_tangent_layer(DerivedMesh *dm)
len= (mf->v4)? 4 : 3;
if (mtface == NULL) {
- map_to_sphere( &uv[0][0], &uv[0][1], orco[mf->v1][0], orco[mf->v1][1], orco[mf->v1][2]);
- map_to_sphere( &uv[1][0], &uv[1][1], orco[mf->v2][0], orco[mf->v2][1], orco[mf->v2][2]);
- map_to_sphere( &uv[2][0], &uv[2][1], orco[mf->v3][0], orco[mf->v3][1], orco[mf->v3][2]);
+ map_to_sphere(&uv[0][0], &uv[0][1], orco[mf->v1][0], orco[mf->v1][1], orco[mf->v1][2]);
+ map_to_sphere(&uv[1][0], &uv[1][1], orco[mf->v2][0], orco[mf->v2][1], orco[mf->v2][2]);
+ map_to_sphere(&uv[2][0], &uv[2][1], orco[mf->v3][0], orco[mf->v3][1], orco[mf->v3][2]);
if (len==4)
- map_to_sphere( &uv[3][0], &uv[3][1], orco[mf->v4][0], orco[mf->v4][1], orco[mf->v4][2]);
+ map_to_sphere(&uv[3][0], &uv[3][1], orco[mf->v4][0], orco[mf->v4][1], orco[mf->v4][2]);
}
mf_vi[0]= mf->v1;
@@ -2616,7 +2616,7 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
int nr_accumulated = 0;
int f;
- for ( f=0; f < totface; f++ ) {
+ for (f=0; f < totface; f++ ) {
{
float * verts[4], * tex_coords[4];
const int nr_verts = mface[f].v4!=0 ? 4 : 3;
@@ -2632,7 +2632,7 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
// discard degenerate faces
is_degenerate = 0;
if ( equals_v3v3(verts[0], verts[1]) || equals_v3v3(verts[0], verts[2]) || equals_v3v3(verts[1], verts[2]) ||
- equals_v2v2(tex_coords[0], tex_coords[1]) || equals_v2v2(tex_coords[0], tex_coords[2]) || equals_v2v2(tex_coords[1], tex_coords[2]) )
+ equals_v2v2(tex_coords[0], tex_coords[1]) || equals_v2v2(tex_coords[0], tex_coords[2]) || equals_v2v2(tex_coords[1], tex_coords[2]))
{
is_degenerate = 1;
}
@@ -2640,7 +2640,7 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
// verify last vertex as well if this is a quad
if (is_degenerate == 0 && nr_verts == 4) {
if (equals_v3v3(verts[3], verts[0]) || equals_v3v3(verts[3], verts[1]) || equals_v3v3(verts[3], verts[2]) ||
- equals_v2v2(tex_coords[3], tex_coords[0]) || equals_v2v2(tex_coords[3], tex_coords[1]) || equals_v2v2(tex_coords[3], tex_coords[2]) )
+ equals_v2v2(tex_coords[3], tex_coords[0]) || equals_v2v2(tex_coords[3], tex_coords[1]) || equals_v2v2(tex_coords[3], tex_coords[2]))
{
is_degenerate = 1;
}
@@ -2705,7 +2705,7 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
if (nr_tris_to_pile==1 || nr_tris_to_pile==2) {
const int indices[] = {offs+0, offs+1, offs+2, offs+0, offs+2, (offs+3)&0x3 };
int t;
- for ( t=0; t<nr_tris_to_pile; t++ ) {
+ for (t=0; t<nr_tris_to_pile; t++ ) {
float f2x_area_uv;
float * p0 = verts[indices[t*3+0]];
float * p1 = verts[indices[t*3+1]];
@@ -2936,7 +2936,7 @@ static void navmesh_drawColored(DerivedMesh *dm)
glDisable(GL_LIGHTING);
/* if (GPU_buffer_legacy(dm) ) */ { /* TODO - VBO draw code, not high priority - campbell */
- DEBUG_VBO( "Using legacy code. drawNavMeshColored\n" );
+ DEBUG_VBO("Using legacy code. drawNavMeshColored\n");
//glShadeModel(GL_SMOOTH);
glBegin(glmode = GL_QUADS);
for (a = 0; a < dm->numTessFaceData; a++, mface++) {
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 93401a528ab..5a2407ca56b 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -157,7 +157,7 @@ void make_local_action(bAction *act)
/* .................................. */
-void free_action (bAction *act)
+void free_action(bAction *act)
{
/* sanity check */
if (act == NULL)
@@ -235,7 +235,7 @@ bActionGroup *get_active_actiongroup (bAction *act)
}
/* Make the given Action-Group the active one */
-void set_active_action_group (bAction *act, bActionGroup *agrp, short select)
+void set_active_action_group(bAction *act, bActionGroup *agrp, short select)
{
bActionGroup *grp;
@@ -280,7 +280,7 @@ bActionGroup *action_groups_add_new (bAction *act, const char name[])
* - assumes that channel is not linked to anything anymore
* - always adds at the end of the group
*/
-void action_groups_add_channel (bAction *act, bActionGroup *agrp, FCurve *fcurve)
+void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve)
{
/* sanity checks */
if (ELEM3(NULL, act, agrp, fcurve))
@@ -346,7 +346,7 @@ void action_groups_add_channel (bAction *act, bActionGroup *agrp, FCurve *fcurve
}
/* Remove the given channel from all groups */
-void action_groups_remove_channel (bAction *act, FCurve *fcu)
+void action_groups_remove_channel(bAction *act, FCurve *fcu)
{
/* sanity checks */
if (ELEM(NULL, act, fcu))
@@ -394,7 +394,7 @@ bActionGroup *action_groups_find_named (bAction *act, const char name[])
}
/* Clear all 'temp' flags on all groups */
-void action_groups_clear_tempflags (bAction *act)
+void action_groups_clear_tempflags(bAction *act)
{
bActionGroup *agrp;
@@ -491,7 +491,7 @@ const char *get_ikparam_name(bPose *pose)
return NULL;
}
/* dst should be freed already, makes entire duplicate */
-void copy_pose (bPose **dst, bPose *src, int copycon)
+void copy_pose(bPose **dst, bPose *src, int copycon)
{
bPose *outPose;
bPoseChannel *pchan;
@@ -792,7 +792,7 @@ void framechange_poses_clear_unkeyed(void)
/* ************************** Bone Groups ************************** */
/* Adds a new bone-group */
-void pose_add_group (Object *ob)
+void pose_add_group(Object *ob)
{
bPose *pose= (ob) ? ob->pose : NULL;
bActionGroup *grp;
@@ -809,7 +809,7 @@ void pose_add_group (Object *ob)
}
/* Remove the active bone-group */
-void pose_remove_group (Object *ob)
+void pose_remove_group(Object *ob)
{
bPose *pose= (ob) ? ob->pose : NULL;
bActionGroup *grp = NULL;
@@ -946,7 +946,7 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_
/* Return flags indicating which transforms the given object/posechannel has
* - if 'curves' is provided, a list of links to these curves are also returned
*/
-short action_get_item_transforms (bAction *act, Object *ob, bPoseChannel *pchan, ListBase *curves)
+short action_get_item_transforms(bAction *act, Object *ob, bPoseChannel *pchan, ListBase *curves)
{
PointerRNA ptr;
FCurve *fcu;
@@ -1134,7 +1134,7 @@ void copy_pose_result(bPose *to, bPose *from)
/* For the calculation of the effects of an Action at the given frame on an object
* This is currently only used for the Action Constraint
*/
-void what_does_obaction (Object *ob, Object *workob, bPose *pose, bAction *act, char groupname[], float cframe)
+void what_does_obaction(Object *ob, Object *workob, bPose *pose, bAction *act, char groupname[], float cframe)
{
bActionGroup *agrp= action_groups_find_named(act, groupname);
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index be53e3ddcba..f3a7ff90373 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -71,7 +71,7 @@
/* Getter/Setter -------------------------------------------- */
/* Check if ID can have AnimData */
-short id_type_can_have_animdata (ID *id)
+short id_type_can_have_animdata(ID *id)
{
/* sanity check */
if (id == NULL)
@@ -152,7 +152,7 @@ AnimData *BKE_id_add_animdata (ID *id)
/* Action Setter --------------------------------------- */
/* Called when user tries to change the active action of an AnimData block (via RNA, Outliner, etc.) */
-short BKE_animdata_set_action (ReportList *reports, ID *id, bAction *act)
+short BKE_animdata_set_action(ReportList *reports, ID *id, bAction *act)
{
AnimData *adt = BKE_animdata_from_id(id);
short ok = 0;
@@ -205,7 +205,7 @@ short BKE_animdata_set_action (ReportList *reports, ID *id, bAction *act)
/* Freeing -------------------------------------------- */
/* Free AnimData used by the nominated ID-block, and clear ID-block's AnimData pointer */
-void BKE_free_animdata (ID *id)
+void BKE_free_animdata(ID *id)
{
/* Only some ID-blocks have this info for now, so we cast the
* types that do to be of type IdAdtTemplate
@@ -274,7 +274,7 @@ AnimData *BKE_copy_animdata (AnimData *adt, const short do_action)
return dadt;
}
-int BKE_copy_animdata_id (ID *id_to, ID *id_from, const short do_action)
+int BKE_copy_animdata_id(ID *id_to, ID *id_from, const short do_action)
{
AnimData *adt;
@@ -344,7 +344,7 @@ void BKE_animdata_make_local(AnimData *adt)
/* When duplicating data (i.e. objects), drivers referring to the original data will
* get updated to point to the duplicated data (if drivers belong to the new data)
*/
-void BKE_relink_animdata (AnimData *adt)
+void BKE_relink_animdata(AnimData *adt)
{
/* sanity check */
if (adt == NULL)
@@ -393,7 +393,7 @@ static short animpath_matches_basepath (const char path[], const char basepath[]
* - This is used when data moves from one datablock to another, causing the
* F-Curves to need to be moved over too
*/
-void action_move_fcurves_by_basepath (bAction *srcAct, bAction *dstAct, const char basepath[])
+void action_move_fcurves_by_basepath(bAction *srcAct, bAction *dstAct, const char basepath[])
{
FCurve *fcu, *fcn=NULL;
@@ -473,7 +473,7 @@ void action_move_fcurves_by_basepath (bAction *srcAct, bAction *dstAct, const ch
* animation data is based off "basepath", creating new AnimData and
* associated data as necessary
*/
-void BKE_animdata_separate_by_basepath (ID *srcID, ID *dstID, ListBase *basepaths)
+void BKE_animdata_separate_by_basepath(ID *srcID, ID *dstID, ListBase *basepaths)
{
AnimData *srcAdt=NULL, *dstAdt=NULL;
LinkData *ld;
@@ -735,7 +735,7 @@ void BKE_animdata_fix_paths_rename(ID *owner_id, AnimData *adt, ID *ref_id, cons
/* Whole Database Ops -------------------------------------------- */
/* apply the given callback function on all data in main database */
-void BKE_animdata_main_cb (Main *mainptr, ID_AnimData_Edit_Callback func, void *user_data)
+void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *user_data)
{
ID *id;
@@ -1028,7 +1028,7 @@ KS_Path *BKE_keyingset_add_path (KeyingSet *ks, ID *id, const char group_name[],
}
/* Free the given Keying Set path */
-void BKE_keyingset_free_path (KeyingSet *ks, KS_Path *ksp)
+void BKE_keyingset_free_path(KeyingSet *ks, KS_Path *ksp)
{
/* sanity check */
if (ELEM(NULL, ks, ksp))
@@ -1043,7 +1043,7 @@ void BKE_keyingset_free_path (KeyingSet *ks, KS_Path *ksp)
}
/* Copy all KeyingSets in the given list */
-void BKE_keyingsets_copy (ListBase *newlist, ListBase *list)
+void BKE_keyingsets_copy(ListBase *newlist, ListBase *list)
{
KeyingSet *ksn;
KS_Path *kspn;
@@ -1061,7 +1061,7 @@ void BKE_keyingsets_copy (ListBase *newlist, ListBase *list)
/* Freeing Tools --------------------------- */
/* Free data for KeyingSet but not set itself */
-void BKE_keyingset_free (KeyingSet *ks)
+void BKE_keyingset_free(KeyingSet *ks)
{
KS_Path *ksp, *kspn;
@@ -1077,7 +1077,7 @@ void BKE_keyingset_free (KeyingSet *ks)
}
/* Free all the KeyingSets in the given list */
-void BKE_keyingsets_free (ListBase *list)
+void BKE_keyingsets_free(ListBase *list)
{
KeyingSet *ks, *ksn;
@@ -1334,7 +1334,7 @@ static void action_idcode_patch_check (ID *id, bAction *act)
/* ----------------------------------------- */
/* Evaluate Action Group */
-void animsys_evaluate_action_group (PointerRNA *ptr, bAction *act, bActionGroup *agrp, AnimMapper *remap, float ctime)
+void animsys_evaluate_action_group(PointerRNA *ptr, bAction *act, bActionGroup *agrp, AnimMapper *remap, float ctime)
{
FCurve *fcu;
@@ -1359,7 +1359,7 @@ void animsys_evaluate_action_group (PointerRNA *ptr, bAction *act, bActionGroup
}
/* Evaluate Action (F-Curve Bag) */
-void animsys_evaluate_action (PointerRNA *ptr, bAction *act, AnimMapper *remap, float ctime)
+void animsys_evaluate_action(PointerRNA *ptr, bAction *act, AnimMapper *remap, float ctime)
{
/* check if mapper is appropriate for use here (we set to NULL if it's inappropriate) */
if (act == NULL) return;
@@ -1916,7 +1916,7 @@ static void nlastrip_evaluate_meta (PointerRNA *ptr, ListBase *channels, ListBas
}
/* evaluates the given evaluation strip */
-void nlastrip_evaluate (PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes)
+void nlastrip_evaluate(PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes)
{
NlaStrip *strip= nes->strip;
@@ -1949,7 +1949,7 @@ void nlastrip_evaluate (PointerRNA *ptr, ListBase *channels, ListBase *modifiers
}
/* write the accumulated settings to */
-void nladata_flush_channels (ListBase *channels)
+void nladata_flush_channels(ListBase *channels)
{
NlaEvalChannel *nec;
@@ -2176,7 +2176,7 @@ static void animsys_evaluate_overrides (PointerRNA *ptr, AnimData *adt)
* and that the flags for which parts of the anim-data settings need to be recalculated
* have been set already by the depsgraph. Now, we use the recalc
*/
-void BKE_animsys_evaluate_animdata (Scene *scene, ID *id, AnimData *adt, float ctime, short recalc)
+void BKE_animsys_evaluate_animdata(Scene *scene, ID *id, AnimData *adt, float ctime, short recalc)
{
PointerRNA id_ptr;
@@ -2246,7 +2246,7 @@ void BKE_animsys_evaluate_animdata (Scene *scene, ID *id, AnimData *adt, float c
* 'local' (i.e. belonging in the nearest ID-block that setting is related to, not a
* standard 'root') block are overridden by a larger 'user'
*/
-void BKE_animsys_evaluate_all_animation (Main *main, Scene *scene, float ctime)
+void BKE_animsys_evaluate_all_animation(Main *main, Scene *scene, float ctime)
{
ID *id;
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 48ba9caf947..b0d0ace2a7e 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -1360,13 +1360,13 @@ void armature_mat_pose_to_delta(float delta_mat[][4], float pose_mat[][4], float
/* Called from RNA when rotation mode changes
* - the result should be that the rotations given in the provided pointers have had conversions
* applied (as appropriate), such that the rotation of the element hasn't 'visually' changed */
-void BKE_rotMode_change_values (float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode)
+void BKE_rotMode_change_values(float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode)
{
/* check if any change - if so, need to convert data */
if (newMode > 0) { /* to euler */
if (oldMode == ROT_MODE_AXISANGLE) {
/* axis-angle to euler */
- axis_angle_to_eulO( eul, newMode, axis, *angle);
+ axis_angle_to_eulO(eul, newMode, axis, *angle);
}
else if (oldMode == ROT_MODE_QUAT) {
/* quat to euler */
@@ -2435,7 +2435,7 @@ void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float cti
/* This only reads anim data from channels, and writes to channels */
/* This is the only function adding poses */
-void where_is_pose (Scene *scene, Object *ob)
+void where_is_pose(Scene *scene, Object *ob)
{
bArmature *arm;
Bone *bone;
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 471f09a338e..198d644b211 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -431,7 +431,7 @@ int BKE_read_file_from_memfile(bContext *C, MemFile *memfile, ReportList *report
/* ***************** testing for break ************* */
-static void (*blender_test_break_cb)(void)= NULL;
+static void (*blender_test_break_cb)(void) = NULL;
void set_blender_test_break_cb(void (*func)(void) )
{
diff --git a/source/blender/blenkernel/intern/bmfont.c b/source/blender/blenkernel/intern/bmfont.c
index 04ac6cbfb4c..e1f4e45e9c3 100644
--- a/source/blender/blenkernel/intern/bmfont.c
+++ b/source/blender/blenkernel/intern/bmfont.c
@@ -65,8 +65,8 @@ void printfGlyph(bmGlyph * glyph)
printf(" advan: %3d reser: %3d\n", glyph->advance, glyph->reserved);
}
-#define MAX2(x,y) ( (x)>(y) ? (x) : (y) )
-#define MAX3(x,y,z) MAX2( MAX2((x),(y)) , (z) )
+#define MAX2(x,y) ((x) > (y) ? (x) : (y))
+#define MAX3(x,y,z) MAX2(MAX2((x), (y)), (z))
void calcAlpha(ImBuf * ibuf)
{
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index d66dcd8ae7e..f0bc2dddbad 100644
--- a/source/blender/blenkernel/intern/bvhutils.c
+++ b/source/blender/blenkernel/intern/bvhutils.c
@@ -106,7 +106,7 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
B0 = dot_v3v3(diff, e0 );
B1 = dot_v3v3(diff, e1 );
C = dot_v3v3(diff, diff );
- Det = fabs( A00 * A11 - A01 * A01 );
+ Det = fabs(A00 * A11 - A01 * A01);
S = A01 * B1 - A11 * B0;
T = A01 * B0 - A00 * B1;
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 2a6dbf84e56..6ff612e3367 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -409,7 +409,7 @@ static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges
int i;
if ( GPU_buffer_legacy(dm) ) {
- DEBUG_VBO( "Using legacy code. cdDM_drawEdges\n" );
+ DEBUG_VBO("Using legacy code. cdDM_drawEdges\n");
glBegin(GL_LINES);
for (i = 0; i < dm->numEdgeData; i++, medge++) {
if ((drawAllEdges || (medge->flag & ME_EDGEDRAW)) &&
@@ -461,7 +461,7 @@ static void cdDM_drawLooseEdges(DerivedMesh *dm)
int i;
if ( GPU_buffer_legacy(dm) ) {
- DEBUG_VBO( "Using legacy code. cdDM_drawLooseEdges\n" );
+ DEBUG_VBO("Using legacy code. cdDM_drawLooseEdges\n");
glBegin(GL_LINES);
for (i = 0; i < dm->numEdgeData; i++, medge++) {
if (medge->flag&ME_LOOSEEDGE) {
@@ -531,7 +531,7 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm,
}
if ( GPU_buffer_legacy(dm) ) {
- DEBUG_VBO( "Using legacy code. cdDM_drawFacesSolid\n" );
+ DEBUG_VBO("Using legacy code. cdDM_drawFacesSolid\n");
glBegin(glmode = GL_QUADS);
for (a = 0; a < dm->numTessFaceData; a++, mface++) {
int new_glmode, new_matnr, new_shademodel;
@@ -580,8 +580,8 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm,
glEnd();
}
else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
- GPU_vertex_setup( dm );
- GPU_normal_setup( dm );
+ GPU_vertex_setup(dm);
+ GPU_normal_setup(dm);
if ( !GPU_buffer_legacy(dm) ) {
glShadeModel(GL_SMOOTH);
for (a = 0; a < dm->drawObject->totmaterial; a++) {
@@ -591,7 +591,7 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm,
}
}
}
- GPU_buffer_unbind( );
+ GPU_buffer_unbind();
}
#undef PASSVERT
@@ -619,7 +619,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
cdDM_update_normals_from_pbvh(dm);
if ( GPU_buffer_legacy(dm) ) {
- DEBUG_VBO( "Using legacy code. cdDM_drawFacesTex_common\n" );
+ DEBUG_VBO("Using legacy code. cdDM_drawFacesTex_common\n");
for (i = 0; i < dm->numTessFaceData; i++, mf++) {
MVert *mvert;
DMDrawOption draw_option;
@@ -697,9 +697,9 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
if (!col)
col = mcol;
- GPU_vertex_setup( dm );
- GPU_normal_setup( dm );
- GPU_uv_setup( dm );
+ GPU_vertex_setup(dm);
+ GPU_normal_setup(dm);
+ GPU_uv_setup(dm);
if ( col != NULL ) {
#if 0
if ( realcol && dm->drawObject->colType == CD_TEXTURE_MCOL ) {
@@ -728,14 +728,14 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
else if (mcol)
dm->drawObject->colType = CD_MCOL;
}
- GPU_color_setup( dm );
+ GPU_color_setup(dm);
}
if ( !GPU_buffer_legacy(dm) ) {
int tottri = dm->drawObject->tot_triangle_point/3;
int next_actualFace= dm->drawObject->triangle_to_mface[0];
- glShadeModel( GL_SMOOTH );
+ glShadeModel(GL_SMOOTH);
/* lastFlag = 0; */ /* UNUSED */
for (i = 0; i < tottri; i++) {
int actualFace = next_actualFace;
@@ -789,7 +789,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
}
GPU_buffer_unbind();
- glShadeModel( GL_FLAT );
+ glShadeModel(GL_FLAT);
}
}
@@ -826,7 +826,7 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm,
/* back-buffer always uses legacy since VBO's would need the
* color array temporarily overwritten for drawing, then reset. */
if ( GPU_buffer_legacy(dm) || G.f & G_BACKBUFSEL) {
- DEBUG_VBO( "Using legacy code. cdDM_drawMappedFaces\n" );
+ DEBUG_VBO("Using legacy code. cdDM_drawMappedFaces\n");
for (i = 0; i < dm->numTessFaceData; i++, mf++) {
int drawSmooth = (flag & DM_DRAW_ALWAYS_SMOOTH) ? 1 : (mf->flag & ME_SMOOTH);
DMDrawOption draw_option= DM_DRAW_OPTION_NORMAL;
@@ -1045,7 +1045,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
glShadeModel(GL_SMOOTH);
if ( GPU_buffer_legacy(dm) || setDrawOptions != NULL ) {
- DEBUG_VBO( "Using legacy code. cdDM_drawMappedFacesGLSL\n" );
+ DEBUG_VBO("Using legacy code. cdDM_drawMappedFacesGLSL\n");
memset(&attribs, 0, sizeof(attribs));
glBegin(GL_QUADS);
@@ -1186,8 +1186,8 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
numdata++;
}
if ( numdata != 0 ) {
- elementsize = GPU_attrib_element_size( datatypes, numdata );
- buffer = GPU_buffer_alloc( elementsize*dm->drawObject->tot_triangle_point);
+ elementsize = GPU_attrib_element_size(datatypes, numdata);
+ buffer = GPU_buffer_alloc(elementsize * dm->drawObject->tot_triangle_point);
if ( buffer == NULL ) {
GPU_buffer_unbind();
dm->drawObject->legacy = 1;
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index d262dffd517..b521285c626 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -51,9 +51,9 @@
#include "BKE_pointcache.h"
#ifdef _WIN32
-void tstart ( void )
+void tstart( void )
{}
-void tend ( void )
+void tend( void )
{
}
double tval( void )
@@ -64,11 +64,11 @@ double tval( void )
#include <sys/time.h>
static struct timeval _tstart, _tend;
static struct timezone tz;
-void tstart ( void )
+void tstart( void )
{
gettimeofday(&_tstart, &tz);
}
-void tend (void)
+void tend(void)
{
gettimeofday(&_tend, &tz);
}
@@ -111,7 +111,7 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm );
* 1. create object
* 2. fill object with standard values or with the GUI settings if given
*/
-void cloth_init ( ClothModifierData *clmd )
+void cloth_init(ClothModifierData *clmd )
{
/* Initialize our new data structure to reasonable values. */
clmd->sim_parms->gravity[0] = 0.0;
@@ -605,7 +605,7 @@ void cloth_free_modifier(ClothModifierData *clmd )
}
/* frees all */
-void cloth_free_modifier_extern ( ClothModifierData *clmd )
+void cloth_free_modifier_extern(ClothModifierData *clmd )
{
Cloth *cloth = NULL;
if (G.rt > 0)
@@ -728,7 +728,7 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm )
clothObj = clmd->clothObject;
- numverts = dm->getNumVerts ( dm );
+ numverts = dm->getNumVerts (dm);
verts = clothObj->verts;
@@ -818,20 +818,20 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
if ( clmd->sim_parms->shapekey_rest )
shapekey_rest = dm->getVertDataArray ( dm, CD_CLOTH_ORCO );
- mvert = dm->getVertArray ( dm );
+ mvert = dm->getVertArray (dm);
verts = clmd->clothObject->verts;
// set initial values
for ( i = 0; i < dm->getNumVerts(dm); i++, verts++ ) {
if (first) {
- copy_v3_v3( verts->x, mvert[i].co );
+ copy_v3_v3(verts->x, mvert[i].co);
- mul_m4_v3( ob->obmat, verts->x );
+ mul_m4_v3(ob->obmat, verts->x);
if ( shapekey_rest ) {
verts->xrest= shapekey_rest[i];
- mul_m4_v3( ob->obmat, verts->xrest );
+ mul_m4_v3(ob->obmat, verts->xrest);
}
else
verts->xrest = verts->x;
@@ -851,7 +851,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
copy_v3_v3 ( verts->xconst, verts->x );
copy_v3_v3 ( verts->txold, verts->x );
copy_v3_v3 ( verts->tx, verts->x );
- mul_v3_fl( verts->v, 0.0f );
+ mul_v3_fl(verts->v, 0.0f);
verts->impulse_count = 0;
copy_v3_v3 ( verts->impulse, tnull );
@@ -895,9 +895,9 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
static void cloth_from_mesh ( ClothModifierData *clmd, DerivedMesh *dm )
{
- unsigned int numverts = dm->getNumVerts ( dm );
- unsigned int numfaces = dm->getNumTessFaces ( dm );
- MFace *mface = dm->getTessFaceArray( dm );
+ unsigned int numverts = dm->getNumVerts (dm);
+ unsigned int numfaces = dm->getNumTessFaces (dm);
+ MFace *mface = dm->getTessFaceArray(dm);
unsigned int i = 0;
/* Allocate our vertices. */
@@ -936,7 +936,7 @@ static void cloth_from_mesh ( ClothModifierData *clmd, DerivedMesh *dm )
// be careful: implicit solver has to be resettet when using this one!
// --> only for implicit handling of this spring!
-int cloth_add_spring ( ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type)
+int cloth_add_spring(ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type)
{
Cloth *cloth = clmd->clothObject;
ClothSpring *spring = NULL;
@@ -1000,11 +1000,11 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
ClothSpring *spring = NULL, *tspring = NULL, *tspring2 = NULL;
unsigned int struct_springs = 0, shear_springs=0, bend_springs = 0;
unsigned int i = 0;
- unsigned int numverts = (unsigned int)dm->getNumVerts ( dm );
- unsigned int numedges = (unsigned int)dm->getNumEdges ( dm );
- unsigned int numfaces = (unsigned int)dm->getNumTessFaces ( dm );
- MEdge *medge = dm->getEdgeArray ( dm );
- MFace *mface = dm->getTessFaceArray ( dm );
+ unsigned int numverts = (unsigned int)dm->getNumVerts (dm);
+ unsigned int numedges = (unsigned int)dm->getNumEdges (dm);
+ unsigned int numfaces = (unsigned int)dm->getNumTessFaces (dm);
+ MEdge *medge = dm->getEdgeArray (dm);
+ MFace *mface = dm->getTessFaceArray (dm);
int index2 = 0; // our second vertex index
LinkNode **edgelist = NULL;
EdgeHash *edgehash = NULL;
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index 530fa1d5431..609b2d3496c 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -81,10 +81,10 @@ void collision_move_object(CollisionModifierData *collmd, float step, float prev
unsigned int i = 0;
for ( i = 0; i < collmd->numverts; i++ ) {
- sub_v3_v3v3 ( tv, collmd->xnew[i].co, collmd->x[i].co );
- VECADDS ( collmd->current_x[i].co, collmd->x[i].co, tv, prevstep );
- VECADDS ( collmd->current_xnew[i].co, collmd->x[i].co, tv, step );
- sub_v3_v3v3 ( collmd->current_v[i].co, collmd->current_xnew[i].co, collmd->current_x[i].co );
+ sub_v3_v3v3(tv, collmd->xnew[i].co, collmd->x[i].co);
+ VECADDS(collmd->current_x[i].co, collmd->x[i].co, tv, prevstep);
+ VECADDS(collmd->current_xnew[i].co, collmd->x[i].co, tv, step);
+ sub_v3_v3v3(collmd->current_v[i].co, collmd->current_xnew[i].co, collmd->current_x[i].co);
}
bvhtree_update_from_mvert ( collmd->bvhtree, collmd->mfaces, collmd->numfaces, collmd->current_x, collmd->current_xnew, collmd->numverts, 1 );
@@ -116,7 +116,7 @@ BVHTree *bvhtree_build_from_mvert ( MFace *mfaces, unsigned int numfaces, MVert
return tree;
}
-void bvhtree_update_from_mvert ( BVHTree * bvhtree, MFace *faces, int numfaces, MVert *x, MVert *xnew, int UNUSED(numverts), int moving )
+void bvhtree_update_from_mvert(BVHTree * bvhtree, MFace *faces, int numfaces, MVert *x, MVert *xnew, int UNUSED(numverts), int moving )
{
int i;
MFace *mfaces = faces;
@@ -521,10 +521,10 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM
collision_interpolateOnTriangle ( v2, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, collmd->current_v[collpair->bp3].co, u1, u2, u3 );
- sub_v3_v3v3 ( relativeVelocity, v2, v1 );
+ sub_v3_v3v3(relativeVelocity, v2, v1);
// Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal').
- magrelVel = dot_v3v3( relativeVelocity, collpair->normal );
+ magrelVel = dot_v3v3(relativeVelocity, collpair->normal);
// printf("magrelVel: %f\n", magrelVel);
@@ -541,16 +541,16 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM
// calculate tangential velocity
copy_v3_v3 ( temp, collpair->normal );
- mul_v3_fl( temp, magrelVel );
- sub_v3_v3v3 ( vrel_t_pre, relativeVelocity, temp );
+ mul_v3_fl(temp, magrelVel);
+ sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
// Decrease in magnitude of relative tangential velocity due to coulomb friction
// in original formula "magrelVel" should be the "change of relative velocity in normal direction"
- magtangent = MIN2 ( clmd->coll_parms->friction * 0.01f * magrelVel, sqrtf( dot_v3v3( vrel_t_pre, vrel_t_pre ) ) );
+ magtangent = MIN2(clmd->coll_parms->friction * 0.01f * magrelVel, sqrtf(dot_v3v3(vrel_t_pre, vrel_t_pre)));
// Apply friction impulse.
if ( magtangent > ALMOST_ZERO ) {
- normalize_v3( vrel_t_pre );
+ normalize_v3(vrel_t_pre);
impulse = magtangent / ( 1.0f + w1*w1 + w2*w2 + w3*w3 ); // 2.0 *
VECADDMUL ( cloth1->verts[collpair->ap1].impulse, vrel_t_pre, w1 * impulse );
@@ -839,7 +839,7 @@ static int cloth_edge_collision_response_moving ( ClothModifierData *clmd, Colli
VECADDFAC(v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, w1);
VECADDFAC(v2, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, w2);
- sub_v3_v3v3 ( relativeVelocity, v2, v1);
+ sub_v3_v3v3(relativeVelocity, v2, v1);
// Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal').
magrelVel = dot_v3v3 ( relativeVelocity, collpair->normal );
@@ -856,8 +856,8 @@ static int cloth_edge_collision_response_moving ( ClothModifierData *clmd, Colli
// calculate tangential velocity
copy_v3_v3 ( temp, collpair->normal );
- mul_v3_fl( temp, magrelVel );
- sub_v3_v3v3 ( vrel_t_pre, relativeVelocity, temp );
+ mul_v3_fl(temp, magrelVel);
+ sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
// Decrease in magnitude of relative tangential velocity due to coulomb friction
// in original formula "magrelVel" should be the "change of relative velocity in normal direction"
@@ -865,7 +865,7 @@ static int cloth_edge_collision_response_moving ( ClothModifierData *clmd, Colli
// Apply friction impulse.
if ( magtangent > ALMOST_ZERO ) {
- normalize_v3( vrel_t_pre );
+ normalize_v3(vrel_t_pre);
impulse = magtangent;
VECADDMUL ( pimpulse, vrel_t_pre, impulse);
@@ -937,7 +937,7 @@ static int cloth_collision_response_moving ( ClothModifierData *clmd, CollisionM
// Calculate relative "velocity".
collision_interpolateOnTriangle ( v1, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, collmd->current_v[collpair->bp3].co, w1, w2, w3);
- sub_v3_v3v3 ( relativeVelocity, v1, cloth1->verts[collpair->collp].tv);
+ sub_v3_v3v3(relativeVelocity, v1, cloth1->verts[collpair->collp].tv);
// Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal').
magrelVel = dot_v3v3 ( relativeVelocity, collpair->normal );
@@ -952,8 +952,8 @@ static int cloth_collision_response_moving ( ClothModifierData *clmd, CollisionM
// calculate tangential velocity
copy_v3_v3 ( temp, collpair->normal );
- mul_v3_fl( temp, magrelVel );
- sub_v3_v3v3 ( vrel_t_pre, relativeVelocity, temp );
+ mul_v3_fl(temp, magrelVel);
+ sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
// Decrease in magnitude of relative tangential velocity due to coulomb friction
// in original formula "magrelVel" should be the "change of relative velocity in normal direction"
@@ -961,7 +961,7 @@ static int cloth_collision_response_moving ( ClothModifierData *clmd, CollisionM
// Apply friction impulse.
if ( magtangent > ALMOST_ZERO ) {
- normalize_v3( vrel_t_pre );
+ normalize_v3(vrel_t_pre);
impulse = magtangent; // 2.0 *
VECADDMUL ( cloth1->verts[collpair->collp].impulse, vrel_t_pre, impulse);
@@ -1001,7 +1001,7 @@ static int cloth_collision_response_moving ( ClothModifierData *clmd, CollisionM
// Calculate relative "velocity".
collision_interpolateOnTriangle ( v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, cloth1->verts[collpair->ap3].tv, w1, w2, w3 );
- sub_v3_v3v3 ( relativeVelocity, collmd->current_v[collpair->collp].co, v1);
+ sub_v3_v3v3(relativeVelocity, collmd->current_v[collpair->collp].co, v1);
// Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal').
magrelVel = dot_v3v3 ( relativeVelocity, collpair->normal );
@@ -1016,8 +1016,8 @@ static int cloth_collision_response_moving ( ClothModifierData *clmd, CollisionM
// calculate tangential velocity
copy_v3_v3 ( temp, collpair->normal );
- mul_v3_fl( temp, magrelVel );
- sub_v3_v3v3 ( vrel_t_pre, relativeVelocity, temp );
+ mul_v3_fl(temp, magrelVel);
+ sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
// Decrease in magnitude of relative tangential velocity due to coulomb friction
// in original formula "magrelVel" should be the "change of relative velocity in normal direction"
@@ -1025,7 +1025,7 @@ static int cloth_collision_response_moving ( ClothModifierData *clmd, CollisionM
// Apply friction impulse.
if ( magtangent > ALMOST_ZERO ) {
- normalize_v3( vrel_t_pre );
+ normalize_v3(vrel_t_pre);
impulse = magtangent; // 2.0 *
VECADDMUL ( pimpulse, vrel_t_pre, impulse);
@@ -1467,8 +1467,8 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2,
distance = 2.0 * (double)( epsilon1 + epsilon2 + ALMOST_ZERO );
#endif
- if ( distance <= ( epsilon1 + epsilon2 + ALMOST_ZERO ) ) {
- normalize_v3_v3( collpair->normal, collpair->vector );
+ if (distance <= (epsilon1 + epsilon2 + ALMOST_ZERO)) {
+ normalize_v3_v3(collpair->normal, collpair->vector);
collpair->distance = distance;
collpair->flag = 0;
@@ -1500,7 +1500,7 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2,
collision_interpolateOnTriangle ( v2, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, collmd->current_v[collpair->bp3].co, u1, u2, u3 );
- sub_v3_v3v3 ( relativeVelocity, v2, v1 );
+ sub_v3_v3v3(relativeVelocity, v2, v1);
if (sqrt(dot_v3v3(relativeVelocity, relativeVelocity)) >= distance)
{
@@ -1547,7 +1547,7 @@ static int cloth_collision_response_moving( ClothModifierData *clmd, CollisionMo
collision_interpolateOnTriangle ( v2, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, collmd->current_v[collpair->bp3].co, u1, u2, u3 );
- sub_v3_v3v3 ( relativeVelocity, v2, v1 );
+ sub_v3_v3v3(relativeVelocity, v2, v1);
// Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal').
magrelVel = dot_v3v3 ( relativeVelocity, collpair->normal );
@@ -1568,8 +1568,8 @@ static int cloth_collision_response_moving( ClothModifierData *clmd, CollisionMo
// calculate tangential velocity
copy_v3_v3 ( temp, collpair->normal );
- mul_v3_fl( temp, magrelVel );
- sub_v3_v3v3 ( vrel_t_pre, relativeVelocity, temp );
+ mul_v3_fl(temp, magrelVel);
+ sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
// Decrease in magnitude of relative tangential velocity due to coulomb friction
// in original formula "magrelVel" should be the "change of relative velocity in normal direction"
@@ -1578,7 +1578,7 @@ static int cloth_collision_response_moving( ClothModifierData *clmd, CollisionMo
// Apply friction impulse.
if ( magtangent > ALMOST_ZERO )
{
- normalize_v3( vrel_t_pre );
+ normalize_v3(vrel_t_pre);
impulse = 2.0 * magtangent / ( 1.0 + w1*w1 + w2*w2 + w3*w3 );
VECADDMUL ( cloth1->verts[collpair->ap1].impulse, vrel_t_pre, w1 * impulse );
@@ -1961,14 +1961,14 @@ static int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModi
// if ( !cloth_are_edges_adjacent ( clmd, collmd, &edgecollpair ) )
{
// always put coll points in p21/p22
- sub_v3_v3v3 ( x1, verts1[edgecollpair.p12].txold, verts1[edgecollpair.p11].txold );
- sub_v3_v3v3 ( v1, verts1[edgecollpair.p12].tv, verts1[edgecollpair.p11].tv );
+ sub_v3_v3v3(x1, verts1[edgecollpair.p12].txold, verts1[edgecollpair.p11].txold);
+ sub_v3_v3v3(v1, verts1[edgecollpair.p12].tv, verts1[edgecollpair.p11].tv);
- sub_v3_v3v3 ( x2, verts2[edgecollpair.p21].co, verts1[edgecollpair.p11].txold );
- sub_v3_v3v3 ( v2, velocity2[edgecollpair.p21].co, verts1[edgecollpair.p11].tv );
+ sub_v3_v3v3(x2, verts2[edgecollpair.p21].co, verts1[edgecollpair.p11].txold);
+ sub_v3_v3v3(v2, velocity2[edgecollpair.p21].co, verts1[edgecollpair.p11].tv);
- sub_v3_v3v3 ( x3, verts2[edgecollpair.p22].co, verts1[edgecollpair.p11].txold );
- sub_v3_v3v3 ( v3, velocity2[edgecollpair.p22].co, verts1[edgecollpair.p11].tv );
+ sub_v3_v3v3(x3, verts2[edgecollpair.p22].co, verts1[edgecollpair.p11].txold);
+ sub_v3_v3v3(v3, velocity2[edgecollpair.p22].co, verts1[edgecollpair.p11].tv);
numsolutions = cloth_get_collision_time ( x1, v1, x2, v2, x3, v3, solution );
@@ -2306,7 +2306,7 @@ static int cloth_bvh_objcollisions_resolve ( ClothModifierData * clmd, Collision
}
// cloth - object collisions
-int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, float dt )
+int cloth_bvh_objcollision(Object *ob, ClothModifierData * clmd, float step, float dt )
{
Cloth *cloth= clmd->clothObject;
BVHTree *cloth_bvh= cloth->bvhtree;
@@ -2444,7 +2444,7 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
}
}
- sub_v3_v3v3 ( temp, verts[i].tx, verts[j].tx );
+ sub_v3_v3v3(temp, verts[i].tx, verts[j].tx);
if ( ( ABS ( temp[0] ) > mindistance ) || ( ABS ( temp[1] ) > mindistance ) || ( ABS ( temp[2] ) > mindistance ) ) continue;
@@ -2453,24 +2453,24 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
continue;
}
- length = normalize_v3( temp );
+ length = normalize_v3(temp );
if ( length < mindistance ) {
float correction = mindistance - length;
if ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) {
- mul_v3_fl( temp, -correction );
+ mul_v3_fl(temp, -correction);
VECADD ( verts[j].tx, verts[j].tx, temp );
}
else if ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) {
- mul_v3_fl( temp, correction );
+ mul_v3_fl(temp, correction);
VECADD ( verts[i].tx, verts[i].tx, temp );
}
else {
- mul_v3_fl( temp, correction * -0.5 );
+ mul_v3_fl(temp, correction * -0.5);
VECADD ( verts[j].tx, verts[j].tx, temp );
- sub_v3_v3v3 ( verts[i].tx, verts[i].tx, temp );
+ sub_v3_v3v3(verts[i].tx, verts[i].tx, temp);
}
ret = 1;
ret2 += ret;
@@ -2493,7 +2493,7 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
if ( ret2 ) {
for ( i = 0; i < cloth->numverts; i++ ) {
if ( ! ( verts [i].flags & CLOTH_VERT_FLAG_PINNED ) ) {
- sub_v3_v3v3 ( verts[i].tv, verts[i].tx, verts[i].txold );
+ sub_v3_v3v3(verts[i].tv, verts[i].tx, verts[i].txold);
}
}
}
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 04c10de9c55..47b497188ec 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -104,7 +104,7 @@
/* -------------- Naming -------------- */
/* Find the first available, non-duplicate name for a given constraint */
-void unique_constraint_name (bConstraint *con, ListBase *list)
+void unique_constraint_name(bConstraint *con, ListBase *list)
{
BLI_uniquename(list, con, "Const", '.', offsetof(bConstraint, name), sizeof(con->name));
}
@@ -177,7 +177,7 @@ bConstraintOb *constraints_make_evalob (Scene *scene, Object *ob, void *subdata,
}
/* cleanup after constraint evaluation */
-void constraints_clear_evalob (bConstraintOb *cob)
+void constraints_clear_evalob(bConstraintOb *cob)
{
float delta[4][4], imat[4][4];
@@ -272,7 +272,7 @@ static void constraint_pchan_diff_mat(bPoseChannel *pchan, float diff_mat[4][4])
* of a matrix from one space to another for constraint evaluation.
* For now, this is only implemented for Objects and PoseChannels.
*/
-void constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, float mat[][4], short from, short to)
+void constraint_mat_convertspace(Object *ob, bPoseChannel *pchan, float mat[][4], short from, short to)
{
float diff_mat[4][4];
float imat[4][4];
@@ -4321,7 +4321,7 @@ bConstraintTypeInfo *constraint_get_typeinfo (bConstraint *con)
/* Free data of a specific constraint if it has any info.
* be sure to run BIK_clear_data() when freeing an IK constraint,
* unless DAG_scene_sort is called. */
-void free_constraint_data (bConstraint *con)
+void free_constraint_data(bConstraint *con)
{
if (con->data) {
bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
@@ -4336,7 +4336,7 @@ void free_constraint_data (bConstraint *con)
}
/* Free all constraints from a constraint-stack */
-void free_constraints (ListBase *list)
+void free_constraints(ListBase *list)
{
bConstraint *con;
@@ -4350,7 +4350,7 @@ void free_constraints (ListBase *list)
/* Remove the specified constraint from the given constraint stack */
-int remove_constraint (ListBase *list, bConstraint *con)
+int remove_constraint(ListBase *list, bConstraint *con)
{
if (con) {
free_constraint_data(con);
@@ -4362,7 +4362,7 @@ int remove_constraint (ListBase *list, bConstraint *con)
}
/* Remove all the constraints of the specified type from the given constraint stack */
-void remove_constraints_type (ListBase *list, short type, short last_only)
+void remove_constraints_type(ListBase *list, short type, short last_only)
{
bConstraint *con, *conp;
@@ -4488,7 +4488,7 @@ bConstraint *add_ob_constraint(Object *ob, const char *name, short type)
/* ......... */
/* Reassign links that constraints have to other data (called during file loading?) */
-void relink_constraints (ListBase *conlist)
+void relink_constraints(ListBase *conlist)
{
bConstraint *con;
bConstraintTarget *ct;
@@ -4518,7 +4518,7 @@ void relink_constraints (ListBase *conlist)
}
/* Run the given callback on all ID-blocks in list of constraints */
-void id_loop_constraints (ListBase *conlist, ConstraintIDFunc func, void *userdata)
+void id_loop_constraints(ListBase *conlist, ConstraintIDFunc func, void *userdata)
{
bConstraint *con;
@@ -4542,7 +4542,7 @@ static void con_extern_cb(bConstraint *UNUSED(con), ID **idpoin, void *UNUSED(us
}
/* duplicate all of the constraints in a constraint stack */
-void copy_constraints (ListBase *dst, const ListBase *src, int do_extern)
+void copy_constraints(ListBase *dst, const ListBase *src, int do_extern)
{
bConstraint *con, *srccon;
@@ -4596,7 +4596,7 @@ bConstraint *constraints_get_active (ListBase *list)
}
/* Set the given constraint as the active one (clearing all the others) */
-void constraints_set_active (ListBase *list, bConstraint *con)
+void constraints_set_active(ListBase *list, bConstraint *con)
{
bConstraint *c;
@@ -4613,7 +4613,7 @@ void constraints_set_active (ListBase *list, bConstraint *con)
/* -------- Constraints and Proxies ------- */
/* Rescue all constraints tagged as being CONSTRAINT_PROXY_LOCAL (i.e. added to bone that's proxy-synced in this file) */
-void extract_proxylocal_constraints (ListBase *dst, ListBase *src)
+void extract_proxylocal_constraints(ListBase *dst, ListBase *src)
{
bConstraint *con, *next;
@@ -4630,7 +4630,7 @@ void extract_proxylocal_constraints (ListBase *dst, ListBase *src)
}
/* Returns if the owner of the constraint is proxy-protected */
-short proxylocked_constraints_owner (Object *ob, bPoseChannel *pchan)
+short proxylocked_constraints_owner(Object *ob, bPoseChannel *pchan)
{
/* Currently, constraints can only be on object or bone level */
if (ob && ob->proxy) {
@@ -4659,7 +4659,7 @@ short proxylocked_constraints_owner (Object *ob, bPoseChannel *pchan)
* None of the actual calculations of the matrices should be done here! Also, this function is
* not to be used by any new constraints, particularly any that have multiple targets.
*/
-void get_constraint_target_matrix (struct Scene *scene, bConstraint *con, int n, short ownertype, void *ownerdata, float mat[][4], float ctime)
+void get_constraint_target_matrix(struct Scene *scene, bConstraint *con, int n, short ownertype, void *ownerdata, float mat[][4], float ctime)
{
bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
@@ -4728,7 +4728,7 @@ void get_constraint_target_matrix (struct Scene *scene, bConstraint *con, int n,
}
/* Get the list of targets required for solving a constraint */
-void get_constraint_targets_for_solving (bConstraint *con, bConstraintOb *cob, ListBase *targets, float ctime)
+void get_constraint_targets_for_solving(bConstraint *con, bConstraintOb *cob, ListBase *targets, float ctime)
{
bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
@@ -4763,7 +4763,7 @@ void get_constraint_targets_for_solving (bConstraint *con, bConstraintOb *cob, L
* constraints_make_evalob and constraints_clear_evalob should be called before and
* after running this function, to sort out cob
*/
-void solve_constraints (ListBase *conlist, bConstraintOb *cob, float ctime)
+void solve_constraints(ListBase *conlist, bConstraintOb *cob, float ctime)
{
bConstraint *con;
float oldmat[4][4];
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 1349a19a8e4..906757bdd62 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -121,7 +121,7 @@ void BKE_curve_editNurb_keyIndex_free(EditNurb *editnurb)
editnurb->keyindex= NULL;
}
-void BKE_curve_editNurb_free (Curve *cu)
+void BKE_curve_editNurb_free(Curve *cu)
{
if (cu->editnurb) {
BKE_nurbList_free(&cu->editnurb->nurbs);
@@ -194,7 +194,7 @@ Curve *BKE_curve_copy(Curve *cu)
cun= copy_libblock(&cu->id);
cun->nurb.first= cun->nurb.last= NULL;
- BKE_nurbList_duplicate( &(cun->nurb), &(cu->nurb));
+ BKE_nurbList_duplicate(&(cun->nurb), &(cu->nurb));
cun->mat= MEM_dupallocN(cu->mat);
for (a=0; a<cun->totcol; a++) {
@@ -2201,24 +2201,23 @@ void BKE_curve_bevelList_make(Object *ob)
/* BevPoint must stay aligned to 4 so sizeof(BevPoint)/sizeof(float) works */
for (j=0; j<3; j++) {
- BKE_curve_forward_diff_bezier( prevbezt->vec[1][j], prevbezt->vec[2][j],
- bezt->vec[0][j], bezt->vec[1][j],
- &(bevp->vec[j]), resolu, sizeof(BevPoint));
+ BKE_curve_forward_diff_bezier(prevbezt->vec[1][j], prevbezt->vec[2][j],
+ bezt->vec[0][j], bezt->vec[1][j],
+ &(bevp->vec[j]), resolu, sizeof(BevPoint));
}
/* if both arrays are NULL do nothiong */
- alfa_bezpart( prevbezt, bezt, nu,
- do_tilt ? &bevp->alfa : NULL,
- do_radius ? &bevp->radius : NULL,
- do_weight ? &bevp->weight : NULL,
- resolu, sizeof(BevPoint));
+ alfa_bezpart(prevbezt, bezt, nu,
+ do_tilt ? &bevp->alfa : NULL,
+ do_radius ? &bevp->radius : NULL,
+ do_weight ? &bevp->weight : NULL,
+ resolu, sizeof(BevPoint));
if (cu->twist_mode==CU_TWIST_TANGENT) {
- forward_diff_bezier_cotangent(
- prevbezt->vec[1], prevbezt->vec[2],
- bezt->vec[0], bezt->vec[1],
- bevp->tan, resolu, sizeof(BevPoint));
+ forward_diff_bezier_cotangent(prevbezt->vec[1], prevbezt->vec[2],
+ bezt->vec[0], bezt->vec[1],
+ bevp->tan, resolu, sizeof(BevPoint));
}
/* indicate with handlecodes double points */
@@ -2256,11 +2255,11 @@ void BKE_curve_bevelList_make(Object *ob)
else bl->poly= -1;
bevp= (BevPoint *)(bl+1);
- BKE_nurb_makeCurve( nu, &bevp->vec[0],
- do_tilt ? &bevp->alfa : NULL,
- do_radius ? &bevp->radius : NULL,
- do_weight ? &bevp->weight : NULL,
- resolu, sizeof(BevPoint));
+ BKE_nurb_makeCurve(nu, &bevp->vec[0],
+ do_tilt ? &bevp->alfa : NULL,
+ do_radius ? &bevp->radius : NULL,
+ do_weight ? &bevp->weight : NULL,
+ resolu, sizeof(BevPoint));
}
}
}
@@ -2795,7 +2794,7 @@ void BKE_nurb_handles_autocalc(Nurb *nu, int flag)
if (flag==0 || (bezt1->f1 & flag) ) {
bezt1->h1= 0;
/* distance too short: vectorhandle */
- if ( len_v3v3( bezt1->vec[1], bezt0->vec[1] ) < 0.0001f) {
+ if (len_v3v3(bezt1->vec[1], bezt0->vec[1]) < 0.0001f) {
bezt1->h1= HD_VECT;
leftsmall= 1;
}
@@ -2815,7 +2814,7 @@ void BKE_nurb_handles_autocalc(Nurb *nu, int flag)
if (flag==0 || (bezt1->f3 & flag) ) {
bezt1->h2= 0;
/* distance too short: vectorhandle */
- if ( len_v3v3( bezt1->vec[1], bezt2->vec[1] ) < 0.0001f) {
+ if (len_v3v3(bezt1->vec[1], bezt2->vec[1]) < 0.0001f) {
bezt1->h2= HD_VECT;
rightsmall= 1;
}
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index e5ef9878295..d8cdd728c16 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -1598,7 +1598,7 @@ short are_obs_related(struct DagForest *dag, void *ob1, void *ob2)
}
#endif
-int is_acyclic( DagForest *dag)
+int is_acyclic(DagForest *dag)
{
return dag->is_acyclic;
}
@@ -1722,8 +1722,8 @@ static void scene_sort_groups(Main *bmain, Scene *sce)
if (base->object->id.newid) {
go= (GroupObject *)base->object->id.newid;
base->object->id.newid= NULL;
- BLI_remlink( &group->gobject, go);
- BLI_addtail( &listb, go);
+ BLI_remlink(&group->gobject, go);
+ BLI_addtail(&listb, go);
}
}
/* copy the newly sorted listbase */
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 4e900794173..3e8727897f3 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -321,7 +321,7 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase, i
dl= MEM_callocN(sizeof(DispList), "makeDispListbez");
/* len+1 because of 'forward_diff_bezier' function */
- dl->verts= MEM_callocN( (len+1)*3*sizeof(float), "dlverts");
+ dl->verts= MEM_callocN((len+1)*3*sizeof(float), "dlverts");
BLI_addtail(dispbase, dl);
dl->parts= 1;
dl->nr= len;
@@ -352,11 +352,11 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase, i
else {
int j;
for (j=0; j<3; j++) {
- BKE_curve_forward_diff_bezier( prevbezt->vec[1][j],
- prevbezt->vec[2][j],
- bezt->vec[0][j],
- bezt->vec[1][j],
- data+j, resolu, 3*sizeof(float));
+ BKE_curve_forward_diff_bezier(prevbezt->vec[1][j],
+ prevbezt->vec[2][j],
+ bezt->vec[0][j],
+ bezt->vec[1][j],
+ data + j, resolu, 3 * sizeof(float));
}
data+= 3*resolu;
@@ -970,7 +970,7 @@ static void displist_surf_indices(DispList *dl)
dl->totindex= 0;
- index=dl->index= MEM_mallocN( 4*sizeof(int)*(dl->parts+1)*(dl->nr+1), "index array nurbs");
+ index=dl->index= MEM_mallocN(4*sizeof(int)*(dl->parts+1)*(dl->nr+1), "index array nurbs");
for (a=0; a<dl->parts; a++) {
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 636788e20e8..c334a6f42a4 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -1428,8 +1428,8 @@ void dynamicPaint_setInitialColor(DynamicPaintSurface *surface)
}
/* interpolate final uv pos */
- interp_v3_v3v3v3( uv_final, &uv[0], &uv[3], &uv[6],
- f_data->barycentricWeights[i*samples].v);
+ interp_v3_v3v3v3(uv_final, &uv[0], &uv[3], &uv[6],
+ f_data->barycentricWeights[i*samples].v);
/* remap to -1.0 to 1.0 */
uv_final[0] = uv_final[0]*2.0f - 1.0f;
uv_final[1] = uv_final[1]*2.0f - 1.0f;
@@ -1482,8 +1482,8 @@ void dynamicPaint_setInitialColor(DynamicPaintSurface *surface)
}
/* interpolate final color */
- interp_v4_v4v4v4( final_color, colors[0], colors[1], colors[2],
- f_data->barycentricWeights[i*samples].v);
+ interp_v4_v4v4v4(final_color, colors[0], colors[1], colors[2],
+ f_data->barycentricWeights[i*samples].v);
copy_v3_v3(pPoint[i].color, final_color);
pPoint[i].alpha = final_color[3];
@@ -3424,10 +3424,10 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
* todo: perhaps implement something that handles volume movement as well */
/* interpolate vertex speed vectors to get hit point velocity */
- interp_v3_v3v3v3( brushPointVelocity,
- brushVelocity[v1].v,
- brushVelocity[v2].v,
- brushVelocity[v3].v, weights);
+ interp_v3_v3v3v3(brushPointVelocity,
+ brushVelocity[v1].v,
+ brushVelocity[v2].v,
+ brushVelocity[v3].v, weights);
/* substract canvas point velocity */
if (bData->velocity) {
@@ -4662,10 +4662,11 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, Scene *sc
/* per sample coordinates */
for (ss=0; ss<bData->s_num[index]; ss++) {
- interp_v3_v3v3v3( bData->realCoord[bData->s_pos[index]+ss].v,
- canvas_verts[tPoint->v1].v,
- canvas_verts[tPoint->v2].v,
- canvas_verts[tPoint->v3].v, f_data->barycentricWeights[index*bData->s_num[index]+ss].v);
+ interp_v3_v3v3v3(bData->realCoord[bData->s_pos[index]+ss].v,
+ canvas_verts[tPoint->v1].v,
+ canvas_verts[tPoint->v2].v,
+ canvas_verts[tPoint->v3].v,
+ f_data->barycentricWeights[index * bData->s_num[index] + ss].v);
}
/* Calculate current pixel surface normal */
@@ -4673,8 +4674,8 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, Scene *sc
normal_short_to_float_v3(n2, mvert[tPoint->v2].no);
normal_short_to_float_v3(n3, mvert[tPoint->v3].no);
- interp_v3_v3v3v3( bData->bNormal[index].invNorm,
- n1, n2, n3, f_data->barycentricWeights[index*bData->s_num[index]].v);
+ interp_v3_v3v3v3(bData->bNormal[index].invNorm,
+ n1, n2, n3, f_data->barycentricWeights[index*bData->s_num[index]].v);
mul_mat3_m4_v3(ob->obmat, bData->bNormal[index].invNorm);
normalize_v3(bData->bNormal[index].invNorm);
negate_v3(bData->bNormal[index].invNorm);
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 74513243621..0414d69785f 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -71,7 +71,7 @@
/* ---------------------- Freeing --------------------------- */
/* Frees the F-Curve itself too, so make sure BLI_remlink is called before calling this... */
-void free_fcurve (FCurve *fcu)
+void free_fcurve(FCurve *fcu)
{
if (fcu == NULL)
return;
@@ -95,7 +95,7 @@ void free_fcurve (FCurve *fcu)
}
/* Frees a list of F-Curves */
-void free_fcurves (ListBase *list)
+void free_fcurves(ListBase *list)
{
FCurve *fcu, *fcn;
@@ -151,7 +151,7 @@ FCurve *copy_fcurve (FCurve *fcu)
}
/* duplicate a list of F-Curves */
-void copy_fcurves (ListBase *dst, ListBase *src)
+void copy_fcurves(ListBase *dst, ListBase *src)
{
FCurve *dfcu, *sfcu;
@@ -270,7 +270,7 @@ FCurve *iter_step_fcurve (FCurve *fcu_iter, const char rna_path[])
* - dataPrefix: i.e. 'pose.bones[' or 'nodes['
* - dataName: name of entity within "" immediately following the prefix
*/
-int list_find_data_fcurves (ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName)
+int list_find_data_fcurves(ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName)
{
FCurve *fcu;
int matches = 0;
@@ -357,7 +357,7 @@ FCurve *rna_get_fcurve (PointerRNA *ptr, PropertyRNA *prop, int rnaindex, bActio
/* Binary search algorithm for finding where to insert BezTriple. (for use by insert_bezt_fcurve)
* Returns the index to insert at (data already at that index will be offset if replace is 0)
*/
-int binarysearch_bezt_index (BezTriple array[], float frame, int arraylen, short *replace)
+int binarysearch_bezt_index(BezTriple array[], float frame, int arraylen, short *replace)
{
int start=0, end=arraylen;
int loopbreaker= 0, maxloop= arraylen * 2;
@@ -476,8 +476,8 @@ static void get_fcurve_end_keyframes (FCurve *fcu, BezTriple **first, BezTriple
/* Calculate the extents of F-Curve's data */
-void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax,
- const short do_sel_only)
+void calc_fcurve_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax,
+ const short do_sel_only)
{
float xminv=999999999.0f, xmaxv=-999999999.0f;
float yminv=999999999.0f, ymaxv=-999999999.0f;
@@ -558,8 +558,8 @@ void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, flo
}
/* Calculate the extents of F-Curve's keyframes */
-void calc_fcurve_range (FCurve *fcu, float *start, float *end,
- const short do_sel_only, const short do_min_length)
+void calc_fcurve_range(FCurve *fcu, float *start, float *end,
+ const short do_sel_only, const short do_min_length)
{
float min=999999999.0f, max=-999999999.0f;
short foundvert= FALSE;
@@ -610,7 +610,7 @@ void calc_fcurve_range (FCurve *fcu, float *start, float *end,
* Usability of keyframes refers to whether they should be displayed,
* and also whether they will have any influence on the final result.
*/
-short fcurve_are_keyframes_usable (FCurve *fcu)
+short fcurve_are_keyframes_usable(FCurve *fcu)
{
/* F-Curve must exist */
if (fcu == NULL)
@@ -671,7 +671,7 @@ short fcurve_are_keyframes_usable (FCurve *fcu)
/* Can keyframes be added to F-Curve?
* Keyframes can only be added if they are already visible
*/
-short fcurve_is_keyframable (FCurve *fcu)
+short fcurve_is_keyframable(FCurve *fcu)
{
/* F-Curve's keyframes must be "usable" (i.e. visible + have an effect on final result) */
if (fcurve_are_keyframes_usable(fcu) == 0)
@@ -688,7 +688,7 @@ short fcurve_is_keyframable (FCurve *fcu)
/* ***************************** Keyframe Column Tools ********************************* */
/* add a BezTriple to a column */
-void bezt_add_to_cfra_elem (ListBase *lb, BezTriple *bezt)
+void bezt_add_to_cfra_elem(ListBase *lb, BezTriple *bezt)
{
CfraElem *ce, *cen;
@@ -721,7 +721,7 @@ void bezt_add_to_cfra_elem (ListBase *lb, BezTriple *bezt)
/* Basic sampling callback which acts as a wrapper for evaluate_fcurve()
* 'data' arg here is unneeded here...
*/
-float fcurve_samplingcb_evalcurve (FCurve *fcu, void *UNUSED(data), float evaltime)
+float fcurve_samplingcb_evalcurve(FCurve *fcu, void *UNUSED(data), float evaltime)
{
/* assume any interference from drivers on the curve is intended... */
return evaluate_fcurve(fcu, evaltime);
@@ -731,7 +731,7 @@ float fcurve_samplingcb_evalcurve (FCurve *fcu, void *UNUSED(data), float evalti
/* Main API function for creating a set of sampled curve data, given some callback function
* used to retrieve the values to store.
*/
-void fcurve_store_samples (FCurve *fcu, void *data, int start, int end, FcuSampleFunc sample_cb)
+void fcurve_store_samples(FCurve *fcu, void *data, int start, int end, FcuSampleFunc sample_cb)
{
FPoint *fpt, *new_fpt;
int cfra;
@@ -775,7 +775,7 @@ void fcurve_store_samples (FCurve *fcu, void *data, int start, int end, FcuSampl
/* This function recalculates the handles of an F-Curve
* If the BezTriples have been rearranged, sort them first before using this.
*/
-void calchandles_fcurve (FCurve *fcu)
+void calchandles_fcurve(FCurve *fcu)
{
BezTriple *bezt, *prev, *next;
int a= fcu->totvert;
@@ -828,7 +828,7 @@ void calchandles_fcurve (FCurve *fcu)
* -> Vector handles: become 'nothing' when (one half selected AND other not)
* - PHASE 2: recalculate handles
*/
-void testhandles_fcurve (FCurve *fcu, const short use_handle)
+void testhandles_fcurve(FCurve *fcu, const short use_handle)
{
BezTriple *bezt;
unsigned int a;
@@ -884,7 +884,7 @@ void testhandles_fcurve (FCurve *fcu, const short use_handle)
/* This function sorts BezTriples so that they are arranged in chronological order,
* as tools working on F-Curves expect that the BezTriples are in order.
*/
-void sort_time_fcurve (FCurve *fcu)
+void sort_time_fcurve(FCurve *fcu)
{
short ok= 1;
@@ -927,7 +927,7 @@ void sort_time_fcurve (FCurve *fcu)
}
/* This function tests if any BezTriples are out of order, thus requiring a sort */
-short test_time_fcurve (FCurve *fcu)
+short test_time_fcurve(FCurve *fcu)
{
unsigned int a;
@@ -1394,7 +1394,7 @@ static DriverVarTypeInfo *get_dvar_typeinfo (int type)
/* Driver API --------------------------------- */
/* This frees the driver variable itself */
-void driver_free_variable (ChannelDriver *driver, DriverVar *dvar)
+void driver_free_variable(ChannelDriver *driver, DriverVar *dvar)
{
/* sanity checks */
if (dvar == NULL)
@@ -1424,7 +1424,7 @@ void driver_free_variable (ChannelDriver *driver, DriverVar *dvar)
}
/* Change the type of driver variable */
-void driver_change_variable_type (DriverVar *dvar, int type)
+void driver_change_variable_type(DriverVar *dvar, int type)
{
DriverVarTypeInfo *dvti= get_dvar_typeinfo(type);
@@ -1547,7 +1547,7 @@ ChannelDriver *fcurve_copy_driver (ChannelDriver *driver)
/* Driver Evaluation -------------------------- */
/* Evaluate a Driver Variable to get a value that contributes to the final */
-float driver_get_variable_value (ChannelDriver *driver, DriverVar *dvar)
+float driver_get_variable_value(ChannelDriver *driver, DriverVar *dvar)
{
DriverVarTypeInfo *dvti;
@@ -2076,7 +2076,7 @@ static float fcurve_eval_samples (FCurve *fcu, FPoint *fpts, float evaltime)
/* Evaluate and return the value of the given F-Curve at the specified frame ("evaltime")
* Note: this is also used for drivers
*/
-float evaluate_fcurve (FCurve *fcu, float evaltime)
+float evaluate_fcurve(FCurve *fcu, float evaltime)
{
float cvalue= 0.0f;
float devaltime;
@@ -2116,13 +2116,13 @@ float evaluate_fcurve (FCurve *fcu, float evaltime)
}
/* Calculate the value of the given F-Curve at the given frame, and set its curval */
-void calculate_fcurve (FCurve *fcu, float ctime)
+void calculate_fcurve(FCurve *fcu, float ctime)
{
/* only calculate + set curval (overriding the existing value) if curve has
* any data which warrants this...
*/
- if ( (fcu->totvert) || (fcu->driver && !(fcu->driver->flag & DRIVER_FLAG_INVALID)) ||
- list_has_suitable_fmodifier(&fcu->modifiers, 0, FMI_TYPE_GENERATE_CURVE) )
+ if ((fcu->totvert) || (fcu->driver && !(fcu->driver->flag & DRIVER_FLAG_INVALID)) ||
+ list_has_suitable_fmodifier(&fcu->modifiers, 0, FMI_TYPE_GENERATE_CURVE))
{
/* calculate and set curval (evaluates driver too if necessary) */
fcu->curval= evaluate_fcurve(fcu, ctime);
diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c
index a930818dd15..9f7d76d251d 100644
--- a/source/blender/blenkernel/intern/fluidsim.c
+++ b/source/blender/blenkernel/intern/fluidsim.c
@@ -86,7 +86,7 @@ void initElbeemMesh(struct Scene *scene, struct Object *ob,
totface = dm->getNumTessFaces(dm);
*numVertices = totvert;
- verts = MEM_callocN( totvert*3*sizeof(float), "elbeemmesh_vertices");
+ verts = MEM_callocN(totvert*3*sizeof(float), "elbeemmesh_vertices");
for (i=0; i<totvert; i++) {
copy_v3_v3(&verts[i*3], mvert[i].co);
if (useGlobalCoords) { mul_m4_v3(ob->obmat, &verts[i*3]); }
@@ -98,7 +98,7 @@ void initElbeemMesh(struct Scene *scene, struct Object *ob,
if (mface[i].v4) { countTris++; }
}
*numTriangles = countTris;
- tris = MEM_callocN( countTris*3*sizeof(int), "elbeemmesh_triangles");
+ tris = MEM_callocN(countTris*3*sizeof(int), "elbeemmesh_triangles");
countTris = 0;
for (i=0; i<totface; i++) {
int face[4];
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index 0b722aabd4c..92c73b23239 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -1058,7 +1058,7 @@ FModifier *copy_fmodifier (FModifier *src)
}
/* Duplicate all of the F-Modifiers in the Modifier stacks */
-void copy_fmodifiers (ListBase *dst, ListBase *src)
+void copy_fmodifiers(ListBase *dst, ListBase *src)
{
FModifier *fcm, *srcfcm;
@@ -1081,7 +1081,7 @@ void copy_fmodifiers (ListBase *dst, ListBase *src)
}
/* Remove and free the given F-Modifier from the given stack */
-int remove_fmodifier (ListBase *modifiers, FModifier *fcm)
+int remove_fmodifier(ListBase *modifiers, FModifier *fcm)
{
FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
@@ -1112,7 +1112,7 @@ int remove_fmodifier (ListBase *modifiers, FModifier *fcm)
}
/* Remove all of a given F-Curve's modifiers */
-void free_fmodifiers (ListBase *modifiers)
+void free_fmodifiers(ListBase *modifiers)
{
FModifier *fcm, *fmn;
@@ -1147,7 +1147,7 @@ FModifier *find_active_fmodifier (ListBase *modifiers)
}
/* Set the active F-Modifier */
-void set_active_fmodifier (ListBase *modifiers, FModifier *fcm)
+void set_active_fmodifier(ListBase *modifiers, FModifier *fcm)
{
FModifier *fm;
@@ -1168,7 +1168,7 @@ void set_active_fmodifier (ListBase *modifiers, FModifier *fcm)
* - mtype - type of modifier (if 0, doesn't matter)
* - acttype - type of action to perform (if -1, doesn't matter)
*/
-short list_has_suitable_fmodifier (ListBase *modifiers, int mtype, short acttype)
+short list_has_suitable_fmodifier(ListBase *modifiers, int mtype, short acttype)
{
FModifier *fcm;
@@ -1252,7 +1252,7 @@ static float eval_fmodifier_influence (FModifier *fcm, float evaltime)
* so nevaltime gets set to whatever the last time-modifying modifier likes...
* - we start from the end of the stack, as only the last one matters for now
*/
-float evaluate_time_fmodifiers (ListBase *modifiers, FCurve *fcu, float cvalue, float evaltime)
+float evaluate_time_fmodifiers(ListBase *modifiers, FCurve *fcu, float cvalue, float evaltime)
{
FModifier *fcm;
@@ -1301,7 +1301,7 @@ float evaluate_time_fmodifiers (ListBase *modifiers, FCurve *fcu, float cvalue,
/* Evalautes the given set of F-Curve Modifiers using the given data
* Should only be called after evaluate_time_fmodifiers() has been called...
*/
-void evaluate_value_fmodifiers (ListBase *modifiers, FCurve *fcu, float *cvalue, float evaltime)
+void evaluate_value_fmodifiers(ListBase *modifiers, FCurve *fcu, float *cvalue, float evaltime)
{
FModifier *fcm;
@@ -1338,7 +1338,7 @@ void evaluate_value_fmodifiers (ListBase *modifiers, FCurve *fcu, float *cvalue,
/* Bake modifiers for given F-Curve to curve sample data, in the frame range defined
* by start and end (inclusive).
*/
-void fcurve_bake_modifiers (FCurve *fcu, int start, int end)
+void fcurve_bake_modifiers(FCurve *fcu, int start, int end)
{
ChannelDriver *driver;
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 811cb881f6e..9ea4eafdd73 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -54,7 +54,7 @@
/* --------- Memory Management ------------ */
/* Free strokes belonging to a gp-frame */
-void free_gpencil_strokes (bGPDframe *gpf)
+void free_gpencil_strokes(bGPDframe *gpf)
{
bGPDstroke *gps, *gpsn;
@@ -72,7 +72,7 @@ void free_gpencil_strokes (bGPDframe *gpf)
}
/* Free all of a gp-layer's frames */
-void free_gpencil_frames (bGPDlayer *gpl)
+void free_gpencil_frames(bGPDlayer *gpl)
{
bGPDframe *gpf, *gpfn;
@@ -90,7 +90,7 @@ void free_gpencil_frames (bGPDlayer *gpl)
}
/* Free all of the gp-layers for a viewport (list should be &gpd->layers or so) */
-void free_gpencil_layers (ListBase *list)
+void free_gpencil_layers(ListBase *list)
{
bGPDlayer *gpl, *gpln;
@@ -108,7 +108,7 @@ void free_gpencil_layers (ListBase *list)
}
/* Free all of GPencil datablock's related data, but not the block itself */
-void free_gpencil_data (bGPdata *gpd)
+void free_gpencil_data(bGPdata *gpd)
{
/* free layers */
free_gpencil_layers(&gpd->layers);
@@ -299,7 +299,7 @@ bGPdata *gpencil_data_duplicate (bGPdata *src)
/* -------- GP-Frame API ---------- */
/* delete the last stroke of the given frame */
-void gpencil_frame_delete_laststroke (bGPDlayer *gpl, bGPDframe *gpf)
+void gpencil_frame_delete_laststroke(bGPDlayer *gpl, bGPDframe *gpf)
{
bGPDstroke *gps= (gpf) ? gpf->strokes.last : NULL;
int cfra = (gpf) ? gpf->framenum : 0; /* assume that the current frame was not locked */
@@ -447,7 +447,7 @@ bGPDframe *gpencil_layer_getframe (bGPDlayer *gpl, int cframe, short addnew)
}
/* delete the given frame from a layer */
-void gpencil_layer_delframe (bGPDlayer *gpl, bGPDframe *gpf)
+void gpencil_layer_delframe(bGPDlayer *gpl, bGPDframe *gpf)
{
/* error checking */
if (ELEM(NULL, gpl, gpf))
@@ -479,7 +479,7 @@ bGPDlayer *gpencil_layer_getactive (bGPdata *gpd)
}
/* set the active gp-layer */
-void gpencil_layer_setactive (bGPdata *gpd, bGPDlayer *active)
+void gpencil_layer_setactive(bGPdata *gpd, bGPDlayer *active)
{
bGPDlayer *gpl;
@@ -496,7 +496,7 @@ void gpencil_layer_setactive (bGPdata *gpd, bGPDlayer *active)
}
/* delete the active gp-layer */
-void gpencil_layer_delactive (bGPdata *gpd)
+void gpencil_layer_delactive(bGPdata *gpd)
{
bGPDlayer *gpl= gpencil_layer_getactive(gpd);
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c
index b20a59ed6f8..079d157e41d 100644
--- a/source/blender/blenkernel/intern/group.c
+++ b/source/blender/blenkernel/intern/group.c
@@ -170,7 +170,7 @@ static int add_to_group_internal(Group *group, Object *ob)
}
go= MEM_callocN(sizeof(GroupObject), "groupobject");
- BLI_addtail( &group->gobject, go);
+ BLI_addtail(&group->gobject, go);
go->ob= ob;
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index cd6ac327f4a..8e0b4215756 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -701,7 +701,7 @@ typedef struct Implicit_Data
fmatrix3x3 *A, *dFdV, *dFdX, *S, *P, *Pinv, *bigI, *M;
} Implicit_Data;
-int implicit_init (Object *UNUSED(ob), ClothModifierData *clmd)
+int implicit_init(Object *UNUSED(ob), ClothModifierData *clmd)
{
unsigned int i = 0;
unsigned int pinned = 0;
@@ -785,7 +785,7 @@ int implicit_init (Object *UNUSED(ob), ClothModifierData *clmd)
return 1;
}
-int implicit_free (ClothModifierData *clmd)
+int implicit_free(ClothModifierData *clmd)
{
Implicit_Data *id;
Cloth *cloth;
@@ -1768,7 +1768,7 @@ int cloth_calc_helper_forces(Object *UNUSED(ob), ClothModifierData * clmd, float
return 1;
}
-int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors)
+int implicit_solver(Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors)
{
unsigned int i=0;
float step=0.0f, tf=clmd->sim_parms->timescale;
@@ -1908,7 +1908,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
return 1;
}
-void implicit_set_positions (ClothModifierData *clmd)
+void implicit_set_positions(ClothModifierData *clmd)
{
Cloth *cloth = clmd->clothObject;
ClothVertex *verts = cloth->verts;
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index c33bb973385..c2d101f9d3b 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -81,7 +81,7 @@
/* Free data from old IPO-Blocks (those which haven't been converted), but not IPO block itself */
// XXX this shouldn't be necessary anymore, but may occur while not all data is converted yet
-void free_ipo (Ipo *ipo)
+void free_ipo(Ipo *ipo)
{
IpoCurve *icu, *icn;
int n= 0;
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 95ec14e12fb..e52a9217673 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -800,7 +800,7 @@ void assign_material(Object *ob, Material *ma, short act)
matar= MEM_callocN(sizeof(void *)*act, "matarray2");
matbits= MEM_callocN(sizeof(char)*act, "matbits1");
if ( ob->totcol) {
- memcpy(matar, ob->mat, sizeof(void *)*( ob->totcol ));
+ memcpy(matar, ob->mat, sizeof(void *) * ob->totcol);
memcpy(matbits, ob->matbits, sizeof(char)*(*totcolp));
MEM_freeN(ob->mat);
MEM_freeN(ob->matbits);
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 0f2ac2dab30..8b2e66812c7 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -453,7 +453,7 @@ int BKE_metaball_is_basis(Object *ob)
}
/* return nonzero if ob1 is a basis mball for ob */
-int BKE_metaball_is_basis_for (Object *ob1, Object *ob2)
+int BKE_metaball_is_basis_for(Object *ob1, Object *ob2)
{
int basis1nr, basis2nr;
char basis1name[MAX_ID_NAME], basis2name[MAX_ID_NAME];
@@ -881,7 +881,7 @@ static void *new_pgn_element(int size)
}
}
- cur= MEM_callocN( sizeof(struct pgn_elements), "newpgn");
+ cur= MEM_callocN(sizeof(struct pgn_elements), "newpgn");
cur->data= MEM_callocN(blocksize, "newpgn");
BLI_addtail(&lb, cur);
@@ -1774,7 +1774,7 @@ static float init_meta(Scene *scene, Object *ob) /* return totsize */
if (ml->s > 10.0f) ml->s = 10.0f;
/* Rotation of MetaElem is stored in quat */
- quat_to_mat4( temp3, ml->quat);
+ quat_to_mat4(temp3, ml->quat);
/* Translation of MetaElem */
unit_m4(temp2);
@@ -1884,11 +1884,11 @@ static float init_meta(Scene *scene, Object *ob) /* return totsize */
calc_mballco(mainb[a], vec);
- size= fabsf( vec[0] );
+ size= fabsf(vec[0]);
if ( size > totsize ) totsize= size;
- size= fabsf( vec[1] );
+ size= fabsf(vec[1]);
if ( size > totsize ) totsize= size;
- size= fabsf( vec[2] );
+ size= fabsf(vec[2]);
if ( size > totsize ) totsize= size;
vec[0]= mainb[a]->x - mainb[a]->rad;
@@ -1897,11 +1897,11 @@ static float init_meta(Scene *scene, Object *ob) /* return totsize */
calc_mballco(mainb[a], vec);
- size= fabsf( vec[0] );
+ size= fabsf(vec[0]);
if ( size > totsize ) totsize= size;
- size= fabsf( vec[1] );
+ size= fabsf(vec[1]);
if ( size > totsize ) totsize= size;
- size= fabsf( vec[2] );
+ size= fabsf(vec[2]);
if ( size > totsize ) totsize= size;
}
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 5dfeb37b2ee..96c62a32139 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -73,7 +73,7 @@
/* Remove the given NLA strip from the NLA track it occupies, free the strip's data,
* and the strip itself.
*/
-void free_nlastrip (ListBase *strips, NlaStrip *strip)
+void free_nlastrip(ListBase *strips, NlaStrip *strip)
{
NlaStrip *cs, *csn;
@@ -111,7 +111,7 @@ void free_nlastrip (ListBase *strips, NlaStrip *strip)
/* Remove the given NLA track from the set of NLA tracks, free the track's data,
* and the track itself.
*/
-void free_nlatrack (ListBase *tracks, NlaTrack *nlt)
+void free_nlatrack(ListBase *tracks, NlaTrack *nlt)
{
NlaStrip *strip, *stripn;
@@ -135,7 +135,7 @@ void free_nlatrack (ListBase *tracks, NlaTrack *nlt)
/* Free the elements of type NLA Tracks provided in the given list, but do not free
* the list itself since that is not free-standing
*/
-void free_nladata (ListBase *tracks)
+void free_nladata(ListBase *tracks)
{
NlaTrack *nlt, *nltn;
@@ -216,7 +216,7 @@ NlaTrack *copy_nlatrack (NlaTrack *nlt)
}
/* Copy all NLA data */
-void copy_nladata (ListBase *dst, ListBase *src)
+void copy_nladata(ListBase *dst, ListBase *src)
{
NlaTrack *nlt, *nlt_d;
@@ -486,7 +486,7 @@ static float nlastrip_get_frame_transition (NlaStrip *strip, float cframe, short
* only secure for 'internal' (i.e. within AnimSys evaluation) operations,
* but should not be directly relied on for stuff which interacts with editors
*/
-float nlastrip_get_frame (NlaStrip *strip, float cframe, short mode)
+float nlastrip_get_frame(NlaStrip *strip, float cframe, short mode)
{
switch (strip->type) {
case NLASTRIP_TYPE_META: /* meta - for now, does the same as transition (is really just an empty container) */
@@ -506,7 +506,7 @@ float nlastrip_get_frame (NlaStrip *strip, float cframe, short mode)
* Public API method - perform this mapping using the given AnimData block
* and perform any necessary sanity checks on the value
*/
-float BKE_nla_tweakedit_remap (AnimData *adt, float cframe, short mode)
+float BKE_nla_tweakedit_remap(AnimData *adt, float cframe, short mode)
{
NlaStrip *strip;
@@ -546,7 +546,7 @@ float BKE_nla_tweakedit_remap (AnimData *adt, float cframe, short mode)
/* (these functions are used for NLA-Tracks and also for nested/meta-strips) */
/* Check if there is any space in the given list to add the given strip */
-short BKE_nlastrips_has_space (ListBase *strips, float start, float end)
+short BKE_nlastrips_has_space(ListBase *strips, float start, float end)
{
NlaStrip *strip;
@@ -580,7 +580,7 @@ short BKE_nlastrips_has_space (ListBase *strips, float start, float end)
/* Rearrange the strips in the track so that they are always in order
* (usually only needed after a strip has been moved)
*/
-void BKE_nlastrips_sort_strips (ListBase *strips)
+void BKE_nlastrips_sort_strips(ListBase *strips)
{
ListBase tmp = {NULL, NULL};
NlaStrip *strip, *sstrip, *stripn;
@@ -624,7 +624,7 @@ void BKE_nlastrips_sort_strips (ListBase *strips)
/* Add the given NLA-Strip to the given list of strips, assuming that it
* isn't currently a member of another list
*/
-short BKE_nlastrips_add_strip (ListBase *strips, NlaStrip *strip)
+short BKE_nlastrips_add_strip(ListBase *strips, NlaStrip *strip)
{
NlaStrip *ns;
short not_added = 1;
@@ -662,7 +662,7 @@ short BKE_nlastrips_add_strip (ListBase *strips, NlaStrip *strip)
* contained within 'Meta-Strips' which act as strips which contain strips.
* temp: are the meta-strips to be created 'temporary' ones used for transforms?
*/
-void BKE_nlastrips_make_metas (ListBase *strips, short temp)
+void BKE_nlastrips_make_metas(ListBase *strips, short temp)
{
NlaStrip *mstrip = NULL;
NlaStrip *strip, *stripn;
@@ -714,7 +714,7 @@ void BKE_nlastrips_make_metas (ListBase *strips, short temp)
}
/* Split a meta-strip into a set of normal strips */
-void BKE_nlastrips_clear_metastrip (ListBase *strips, NlaStrip *strip)
+void BKE_nlastrips_clear_metastrip(ListBase *strips, NlaStrip *strip)
{
NlaStrip *cs, *csn;
@@ -739,7 +739,7 @@ void BKE_nlastrips_clear_metastrip (ListBase *strips, NlaStrip *strip)
* sel: only consider selected meta-strips, otherwise all meta-strips are removed
* onlyTemp: only remove the 'temporary' meta-strips used for transforms
*/
-void BKE_nlastrips_clear_metas (ListBase *strips, short onlySel, short onlyTemp)
+void BKE_nlastrips_clear_metas(ListBase *strips, short onlySel, short onlyTemp)
{
NlaStrip *strip, *stripn;
@@ -766,7 +766,7 @@ void BKE_nlastrips_clear_metas (ListBase *strips, short onlySel, short onlyTemp)
/* Add the given NLA-Strip to the given Meta-Strip, assuming that the
* strip isn't attached to anyy list of strips
*/
-short BKE_nlameta_add_strip (NlaStrip *mstrip, NlaStrip *strip)
+short BKE_nlameta_add_strip(NlaStrip *mstrip, NlaStrip *strip)
{
/* sanity checks */
if (ELEM(NULL, mstrip, strip))
@@ -816,7 +816,7 @@ short BKE_nlameta_add_strip (NlaStrip *mstrip, NlaStrip *strip)
/* Adjust the settings of NLA-Strips contained within a Meta-Strip (recursively),
* until the Meta-Strips children all fit within the Meta-Strip's new dimensions
*/
-void BKE_nlameta_flush_transforms (NlaStrip *mstrip)
+void BKE_nlameta_flush_transforms(NlaStrip *mstrip)
{
NlaStrip *strip;
float oStart, oEnd, offset;
@@ -915,7 +915,7 @@ NlaTrack *BKE_nlatrack_find_active (ListBase *tracks)
/* Toggle the 'solo' setting for the given NLA-track, making sure that it is the only one
* that has this status in its AnimData block.
*/
-void BKE_nlatrack_solo_toggle (AnimData *adt, NlaTrack *nlt)
+void BKE_nlatrack_solo_toggle(AnimData *adt, NlaTrack *nlt)
{
NlaTrack *nt;
@@ -947,7 +947,7 @@ void BKE_nlatrack_solo_toggle (AnimData *adt, NlaTrack *nlt)
/* Make the given NLA-track the active one for the given stack. If no track is provided,
* this function can be used to simply deactivate all the NLA tracks in the given stack too.
*/
-void BKE_nlatrack_set_active (ListBase *tracks, NlaTrack *nlt_a)
+void BKE_nlatrack_set_active(ListBase *tracks, NlaTrack *nlt_a)
{
NlaTrack *nlt;
@@ -965,7 +965,7 @@ void BKE_nlatrack_set_active (ListBase *tracks, NlaTrack *nlt_a)
}
/* Check if there is any space in the given track to add a strip of the given length */
-short BKE_nlatrack_has_space (NlaTrack *nlt, float start, float end)
+short BKE_nlatrack_has_space(NlaTrack *nlt, float start, float end)
{
/* sanity checks
* - track must exist
@@ -987,7 +987,7 @@ short BKE_nlatrack_has_space (NlaTrack *nlt, float start, float end)
/* Rearrange the strips in the track so that they are always in order
* (usually only needed after a strip has been moved)
*/
-void BKE_nlatrack_sort_strips (NlaTrack *nlt)
+void BKE_nlatrack_sort_strips(NlaTrack *nlt)
{
/* sanity checks */
if (ELEM(NULL, nlt, nlt->strips.first))
@@ -1000,7 +1000,7 @@ void BKE_nlatrack_sort_strips (NlaTrack *nlt)
/* Add the given NLA-Strip to the given NLA-Track, assuming that it
* isn't currently attached to another one
*/
-short BKE_nlatrack_add_strip (NlaTrack *nlt, NlaStrip *strip)
+short BKE_nlatrack_add_strip(NlaTrack *nlt, NlaStrip *strip)
{
/* sanity checks */
if (ELEM(NULL, nlt, strip))
@@ -1013,7 +1013,7 @@ short BKE_nlatrack_add_strip (NlaTrack *nlt, NlaStrip *strip)
/* Get the extents of the given NLA-Track including gaps between strips,
* returning whether this succeeded or not
*/
-short BKE_nlatrack_get_bounds (NlaTrack *nlt, float bounds[2])
+short BKE_nlatrack_get_bounds(NlaTrack *nlt, float bounds[2])
{
NlaStrip *strip;
@@ -1061,7 +1061,7 @@ NlaStrip *BKE_nlastrip_find_active (NlaTrack *nlt)
}
/* Make the given NLA-Strip the active one within the given block */
-void BKE_nlastrip_set_active (AnimData *adt, NlaStrip *strip)
+void BKE_nlastrip_set_active(AnimData *adt, NlaStrip *strip)
{
NlaTrack *nlt;
NlaStrip *nls;
@@ -1083,7 +1083,7 @@ void BKE_nlastrip_set_active (AnimData *adt, NlaStrip *strip)
/* Does the given NLA-strip fall within the given bounds (times)? */
-short BKE_nlastrip_within_bounds (NlaStrip *strip, float min, float max)
+short BKE_nlastrip_within_bounds(NlaStrip *strip, float min, float max)
{
const float stripLen= (strip) ? strip->end - strip->start : 0.0f;
const float boundsLen= fabsf(max - min);
@@ -1096,15 +1096,15 @@ short BKE_nlastrip_within_bounds (NlaStrip *strip, float min, float max)
* - first 2 cases cover when the strip length is less than the bounding area
* - second 2 cases cover when the strip length is greater than the bounding area
*/
- if ( (stripLen < boundsLen) &&
- !(IN_RANGE(strip->start, min, max) ||
- IN_RANGE(strip->end, min, max)) )
+ if ((stripLen < boundsLen) &&
+ !(IN_RANGE(strip->start, min, max) ||
+ IN_RANGE(strip->end, min, max)))
{
return 0;
}
- if ( (stripLen > boundsLen) &&
- !(IN_RANGE(min, strip->start, strip->end) ||
- IN_RANGE(max, strip->start, strip->end)) )
+ if ((stripLen > boundsLen) &&
+ !(IN_RANGE(min, strip->start, strip->end) ||
+ IN_RANGE(max, strip->start, strip->end)) )
{
return 0;
}
@@ -1116,7 +1116,7 @@ short BKE_nlastrip_within_bounds (NlaStrip *strip, float min, float max)
/* Recalculate the start and end frames for the current strip, after changing
* the extents of the action or the mapping (repeats or scale factor) info
*/
-void BKE_nlastrip_recalculate_bounds (NlaStrip *strip)
+void BKE_nlastrip_recalculate_bounds(NlaStrip *strip)
{
float actlen, mapping;
@@ -1171,7 +1171,7 @@ static short nlastrip_is_first (AnimData *adt, NlaStrip *strip)
/* Animated Strips ------------------------------------------- */
/* Check if the given NLA-Track has any strips with own F-Curves */
-short BKE_nlatrack_has_animated_strips (NlaTrack *nlt)
+short BKE_nlatrack_has_animated_strips(NlaTrack *nlt)
{
NlaStrip *strip;
@@ -1190,7 +1190,7 @@ short BKE_nlatrack_has_animated_strips (NlaTrack *nlt)
}
/* Check if given NLA-Tracks have any strips with own F-Curves */
-short BKE_nlatracks_have_animated_strips (ListBase *tracks)
+short BKE_nlatracks_have_animated_strips(ListBase *tracks)
{
NlaTrack *nlt;
@@ -1209,7 +1209,7 @@ short BKE_nlatracks_have_animated_strips (ListBase *tracks)
}
/* Validate the NLA-Strips 'control' F-Curves based on the flags set*/
-void BKE_nlastrip_validate_fcurves (NlaStrip *strip)
+void BKE_nlastrip_validate_fcurves(NlaStrip *strip)
{
FCurve *fcu;
@@ -1272,7 +1272,7 @@ static int nla_editbone_name_check(void *arg, const char *name)
* as we need to ensure that the name is unique over several lists of tracks,
* not just a single track.
*/
-void BKE_nlastrip_validate_name (AnimData *adt, NlaStrip *strip)
+void BKE_nlastrip_validate_name(AnimData *adt, NlaStrip *strip)
{
GHash *gh;
NlaStrip *tstrip;
@@ -1416,7 +1416,7 @@ static void BKE_nlastrip_validate_autoblends (NlaTrack *nlt, NlaStrip *nls)
}
/* Ensure that auto-blending and other settings are set correctly */
-void BKE_nla_validate_state (AnimData *adt)
+void BKE_nla_validate_state(AnimData *adt)
{
NlaStrip *strip, *fstrip=NULL;
NlaTrack *nlt;
@@ -1470,7 +1470,7 @@ void BKE_nla_validate_state (AnimData *adt)
* so no checks for this are performed.
*/
// TODO: maybe we should have checks for this too...
-void BKE_nla_action_pushdown (AnimData *adt)
+void BKE_nla_action_pushdown(AnimData *adt)
{
NlaStrip *strip;
@@ -1518,7 +1518,7 @@ void BKE_nla_action_pushdown (AnimData *adt)
/* Find the active strip + track combo, and set them up as the tweaking track,
* and return if successful or not.
*/
-short BKE_nla_tweakmode_enter (AnimData *adt)
+short BKE_nla_tweakmode_enter(AnimData *adt)
{
NlaTrack *nlt, *activeTrack=NULL;
NlaStrip *strip, *activeStrip=NULL;
@@ -1619,7 +1619,7 @@ short BKE_nla_tweakmode_enter (AnimData *adt)
}
/* Exit tweakmode for this AnimData block */
-void BKE_nla_tweakmode_exit (AnimData *adt)
+void BKE_nla_tweakmode_exit(AnimData *adt)
{
NlaStrip *strip;
NlaTrack *nlt;
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index b6136e8e83b..882d907059e 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -1024,7 +1024,7 @@ void psys_interpolate_particle(short type, ParticleKey keys[4], float dt, Partic
float t[4];
if (type<0) {
- interp_cubic_v3( result->co, result->vel, keys[1].co, keys[1].vel, keys[2].co, keys[2].vel, dt);
+ interp_cubic_v3(result->co, result->vel, keys[1].co, keys[1].vel, keys[2].co, keys[2].vel, dt);
}
else {
key_curve_position_weights(dt, t, type);
@@ -1454,11 +1454,11 @@ void psys_interpolate_face(MVert *mvert, MFace *mface, MTFace *tface, float (*or
}
else {
uv1= tuv[0]; uv2= tuv[1]; uv3= tuv[2]; uv4= tuv[3];
- map_to_sphere( uv1, uv1+1, v1[0], v1[1], v1[2]);
- map_to_sphere( uv2, uv2+1, v2[0], v2[1], v2[2]);
- map_to_sphere( uv3, uv3+1, v3[0], v3[1], v3[2]);
+ map_to_sphere(uv1, uv1+1, v1[0], v1[1], v1[2]);
+ map_to_sphere(uv2, uv2+1, v2[0], v2[1], v2[2]);
+ map_to_sphere(uv3, uv3+1, v3[0], v3[1], v3[2]);
if (v4)
- map_to_sphere( uv4, uv4+1, v4[0], v4[1], v4[2]);
+ map_to_sphere(uv4, uv4+1, v4[0], v4[1], v4[2]);
}
if (v4) {
@@ -2178,11 +2178,11 @@ int do_guides(ListBase *effectors, ParticleKey *state, int index, float time)
cross_v3_v3v3(temp, eff->guide_dir, guidedir);
angle = dot_v3v3(eff->guide_dir, guidedir)/(len_v3(eff->guide_dir));
angle = saacos(angle);
- axis_angle_to_quat( rot2, temp, angle);
+ axis_angle_to_quat(rot2, temp, angle);
mul_qt_v3(rot2, vec_to_point);
/* curve tilt */
- axis_angle_to_quat( rot2, guidedir, guidevec[3] - eff->guide_loc[3]);
+ axis_angle_to_quat(rot2, guidedir, guidevec[3] - eff->guide_loc[3]);
mul_qt_v3(rot2, vec_to_point);
}
@@ -2871,7 +2871,7 @@ static void cache_key_incremental_rotation(ParticleCacheKey *key0, ParticleCache
else {
angle= saacos(cosangle);
cross_v3_v3v3(normal, prev_tangent, tangent);
- axis_angle_to_quat( q, normal, angle);
+ axis_angle_to_quat(q, normal, angle);
mul_qt_qtqt(key1->rot, q, key2->rot);
}
@@ -4496,7 +4496,7 @@ void psys_get_dupli_path_transform(ParticleSimulationData *sim, ParticleData *pa
float phasefac = psys->part->phasefac;
if (psys->part->randphasefac != 0.0f)
phasefac += psys->part->randphasefac * PSYS_FRAND((pa-psys->particles) + 20);
- axis_angle_to_quat( q_phase, vec, phasefac*(float)M_PI);
+ axis_angle_to_quat(q_phase, vec, phasefac*(float)M_PI);
mul_qt_v3(q_phase, side);
}
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 9dbc0f3da4b..daa7f847df6 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -708,10 +708,10 @@ static void psys_uv_to_w(float u, float v, int quad, float *w)
if (quad) {
vert[3][0]= 0.0f; vert[3][1]= 1.0f; vert[3][2]= 0.0f;
- interp_weights_poly_v3( w, vert, 4, co);
+ interp_weights_poly_v3(w, vert, 4, co);
}
else {
- interp_weights_poly_v3( w, vert, 3, co);
+ interp_weights_poly_v3(w, vert, 3, co);
w[3]= 0.0f;
}
}
@@ -1720,7 +1720,7 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P
cross_v3_v3v3(mat[1], mat[2], mat[0]);
/* apply rotation */
- mat3_to_quat_is_ok( q, mat);
+ mat3_to_quat_is_ok(q, mat);
copy_qt_qt(state->rot, q);
}
else {
@@ -1814,7 +1814,7 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P
phasefac = part->phasefac;
if (part->randphasefac != 0.0f)
phasefac += part->randphasefac * PSYS_FRAND(p + 20);
- axis_angle_to_quat( q_phase, x_vec, phasefac*(float)M_PI);
+ axis_angle_to_quat(q_phase, x_vec, phasefac*(float)M_PI);
/* combine base rotation & phase */
mul_qt_qtqt(state->rot, rot, q_phase);
@@ -2537,10 +2537,10 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa
u = dot_v3v3(vec, dv);
if (u < 0.f && visc > 0.f)
- madd_v3_v3fl(force, vec, 0.5f * q * visc * u );
+ madd_v3_v3fl(force, vec, 0.5f * q * visc * u);
if (u > 0.f && stiff_visc > 0.f)
- madd_v3_v3fl(force, vec, 0.5f * q * stiff_visc * u );
+ madd_v3_v3fl(force, vec, 0.5f * q * stiff_visc * u);
}
if (spring_constant > 0.f) {
@@ -4106,23 +4106,23 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra))
for (p=0, pa=psys->particles; p<totpart; p++, pa++) {
int ptype=0;
- gzread(gzf, &ptype, sizeof( ptype ));
+ gzread(gzf, &ptype, sizeof(ptype));
if (ptype&readMask) {
activeParts++;
- gzread(gzf, &(pa->size), sizeof( float ));
+ gzread(gzf, &(pa->size), sizeof(float));
pa->size /= 10.0f;
for (j=0; j<3; j++) {
float wrf;
- gzread(gzf, &wrf, sizeof( wrf ));
+ gzread(gzf, &wrf, sizeof(wrf));
pa->state.co[j] = wrf;
//fprintf(stderr, "Rj%d ", j);
}
for (j=0; j<3; j++) {
float wrf;
- gzread(gzf, &wrf, sizeof( wrf ));
+ gzread(gzf, &wrf, sizeof(wrf));
pa->state.vel[j] = wrf;
}
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 0a8f0bcb7d6..864260833a6 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -234,7 +234,7 @@ Scene *copy_scene(Scene *sce, int type)
}
if (sce->ed) {
- scen->ed= MEM_callocN( sizeof(Editing), "addseq");
+ scen->ed= MEM_callocN(sizeof(Editing), "addseq");
scen->ed->seqbasep= &scen->ed->seqbase;
seqbase_dupli_recursive(sce, scen, &scen->ed->seqbase, &sce->ed->seqbase, SEQ_DUPE_ALL);
}
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 4e307942bbb..5983beac4ef 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -2180,9 +2180,9 @@ static struct ImBuf * do_transform_effect(
* GLOW
* ********************************************************************** */
-static void RVBlurBitmap2_byte ( unsigned char* map, int width, int height,
- float blur,
- int quality)
+static void RVBlurBitmap2_byte(unsigned char* map, int width, int height,
+ float blur,
+ int quality)
/* MUUUCCH better than the previous blur. */
/* We do the blurring in two passes which is a whole lot faster. */
/* I changed the math arount to implement an actual Gaussian */
@@ -2203,7 +2203,7 @@ static void RVBlurBitmap2_byte ( unsigned char* map, int width, int height,
return;
/* Allocate memory for the tempmap and the blur filter matrix */
- temp= MEM_mallocN( (width*height*4), "blurbitmaptemp");
+ temp= MEM_mallocN((width*height*4), "blurbitmaptemp");
if (!temp)
return;
@@ -2372,7 +2372,7 @@ static void RVBlurBitmap2_float ( float* map, int width, int height,
return;
/* Allocate memory for the tempmap and the blur filter matrix */
- temp= MEM_mallocN( (width*height*4*sizeof(float)), "blurbitmaptemp");
+ temp= MEM_mallocN((width*height*4*sizeof(float)), "blurbitmaptemp");
if (!temp)
return;
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index e201209ec3f..0cc5fe3e7a1 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -121,7 +121,7 @@ void space_transform_invert(const SpaceTransform *data, float *co)
static void space_transform_apply_normal(const SpaceTransform *data, float *no)
{
- mul_mat3_m4_v3( ((SpaceTransform*)data)->local2target, no);
+ mul_mat3_m4_v3(((SpaceTransform *)data)->local2target, no);
normalize_v3(no); // TODO: could we just determine de scale value from the matrix?
}
@@ -218,19 +218,19 @@ int normal_projection_project_vertex(char options, const float *vert, const floa
BVHTreeRayHit hit_tmp;
//Copy from hit (we need to convert hit rays from one space coordinates to the other
- memcpy( &hit_tmp, hit, sizeof(hit_tmp) );
+ memcpy(&hit_tmp, hit, sizeof(hit_tmp));
//Apply space transform (TODO readjust dist)
if (transf) {
- copy_v3_v3( tmp_co, vert );
- space_transform_apply( transf, tmp_co );
+ copy_v3_v3(tmp_co, vert);
+ space_transform_apply(transf, tmp_co);
co = tmp_co;
- copy_v3_v3( tmp_no, dir );
- space_transform_apply_normal( transf, tmp_no );
+ copy_v3_v3(tmp_no, dir);
+ space_transform_apply_normal(transf, tmp_no);
no = tmp_no;
- hit_tmp.dist *= mat4_to_scale( ((SpaceTransform*)transf)->local2target );
+ hit_tmp.dist *= mat4_to_scale(((SpaceTransform*)transf)->local2target);
}
else {
co = vert;
@@ -315,7 +315,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
auxMesh = object_get_derived_final(calc->smd->auxTarget);
if (!auxMesh)
return;
- space_transform_setup( &local2aux, calc->ob, calc->smd->auxTarget);
+ space_transform_setup(&local2aux, calc->ob, calc->smd->auxTarget);
}
//After sucessufuly build the trees, start projection vertexs
@@ -456,7 +456,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
if (dist > FLT_EPSILON)
interp_v3_v3v3(tmp_co, tmp_co, nearest.co, (dist - calc->keepDist)/dist); //linear interpolation
else
- copy_v3_v3( tmp_co, nearest.co );
+ copy_v3_v3(tmp_co, nearest.co);
}
//Convert the coordinates back to mesh coordinates
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index e4fca26a3bc..f98b6366e97 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -899,7 +899,7 @@ void smokeModifier_reset(struct SmokeModifierData *smd)
}
}
-void smokeModifier_free (SmokeModifierData *smd)
+void smokeModifier_free(SmokeModifierData *smd)
{
if(smd)
{
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 479c0393573..d179b286594 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -631,7 +631,7 @@ static void add_mesh_quad_diag_springs(Object *ob)
nofquads = count_mesh_quads(me);
if (nofquads) {
/* resize spring-array to hold additional quad springs */
- bs_new= MEM_callocN( (ob->soft->totspring + nofquads *2 )*sizeof(BodySpring), "bodyspring");
+ bs_new= MEM_callocN((ob->soft->totspring + nofquads *2 )*sizeof(BodySpring), "bodyspring");
memcpy(bs_new, ob->soft->bspring, (ob->soft->totspring )*sizeof(BodySpring));
if (ob->soft->bspring)
@@ -735,7 +735,7 @@ static void add_2nd_order_springs(Object *ob, float stiffness)
add_2nd_order_roller(ob, stiffness, &counter, 0); /* counting */
if (counter) {
/* resize spring-array to hold additional springs */
- bs_new= MEM_callocN( (ob->soft->totspring + counter )*sizeof(BodySpring), "bodyspring");
+ bs_new= MEM_callocN((ob->soft->totspring + counter )*sizeof(BodySpring), "bodyspring");
memcpy(bs_new, ob->soft->bspring, (ob->soft->totspring )*sizeof(BodySpring));
if (ob->soft->bspring)
@@ -752,7 +752,7 @@ static void add_bp_springlist(BodyPoint *bp, int springID)
int *newlist;
if (bp->springs == NULL) {
- bp->springs = MEM_callocN( sizeof(int), "bpsprings");
+ bp->springs = MEM_callocN(sizeof(int), "bpsprings");
bp->springs[0] = springID;
bp->nofsprings = 1;
}
@@ -860,9 +860,9 @@ static void renew_softbody(Scene *scene, Object *ob, int totpoint, int totspring
sb->totpoint= totpoint;
sb->totspring= totspring;
- sb->bpoint= MEM_mallocN( totpoint*sizeof(BodyPoint), "bodypoint");
+ sb->bpoint= MEM_mallocN(totpoint*sizeof(BodyPoint), "bodypoint");
if (totspring)
- sb->bspring= MEM_mallocN( totspring*sizeof(BodySpring), "bodyspring");
+ sb->bspring= MEM_mallocN(totspring*sizeof(BodySpring), "bodyspring");
/* initialize BodyPoint array */
for (i=0; i<totpoint; i++) {
@@ -1015,7 +1015,7 @@ static int query_external_colliders(Scene *scene, Object *me)
/* +++ the aabb "force" section*/
-static int sb_detect_aabb_collisionCached( float UNUSED(force[3]), unsigned int UNUSED(par_layer), struct Object *vertexowner, float UNUSED(time))
+static int sb_detect_aabb_collisionCached(float UNUSED(force[3]), unsigned int UNUSED(par_layer), struct Object *vertexowner, float UNUSED(time))
{
Object *ob;
SoftBody *sb=vertexowner->soft;
@@ -3604,19 +3604,19 @@ static void curve_surf_to_softbody(Scene *scene, Object *ob)
bs->v1= curindex-3;
bs->v2= curindex;
bs->springtype=SB_HANDLE;
- bs->len= globallen( (bezt-1)->vec[0], bezt->vec[0], ob );
+ bs->len = globallen((bezt-1)->vec[0], bezt->vec[0], ob);
bs++;
}
bs->v1= curindex;
bs->v2= curindex+1;
bs->springtype=SB_HANDLE;
- bs->len= globallen(bezt->vec[0], bezt->vec[1], ob);
+ bs->len = globallen(bezt->vec[0], bezt->vec[1], ob);
bs++;
bs->v1= curindex+1;
bs->v2= curindex+2;
bs->springtype=SB_HANDLE;
- bs->len= globallen(bezt->vec[1], bezt->vec[2], ob);
+ bs->len = globallen(bezt->vec[1], bezt->vec[2], ob);
bs++;
}
}
@@ -3825,8 +3825,8 @@ void SB_estimate_transform(Object *ob, float lloc[3], float lrot[3][3], float ls
if (!ob ||!ob->soft) return; /* why did we get here ? */
sb= ob->soft;
if (!sb || !sb->bpoint) return;
- opos= MEM_callocN( (sb->totpoint)*3*sizeof(float), "SB_OPOS");
- rpos= MEM_callocN( (sb->totpoint)*3*sizeof(float), "SB_RPOS");
+ opos= MEM_callocN((sb->totpoint)*3*sizeof(float), "SB_OPOS");
+ rpos= MEM_callocN((sb->totpoint)*3*sizeof(float), "SB_RPOS");
/* might filter vertex selection with a vertex group */
for (a=0, bp=sb->bpoint, rp=sb->scratch->Ref.ivert; a<sb->totpoint; a++, bp++, rp++) {
copy_v3_v3(rpos[a], rp->pos);
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index cb7369476c0..27501b6a589 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -598,8 +598,8 @@ void clear_text(Text *text) /* called directly from rna */
int oldstate;
oldstate = txt_get_undostate( );
- txt_set_undostate( 1 );
- txt_sel_all( text );
+ txt_set_undostate(1);
+ txt_sel_all(text);
txt_delete_sel(text);
txt_set_undostate(oldstate);
@@ -666,7 +666,7 @@ static TextLine *txt_new_linen(const char *str, int n)
return tmp;
}
-void txt_clean_text (Text *text)
+void txt_clean_text(Text *text)
{
TextLine **top, **bot;
@@ -697,7 +697,7 @@ void txt_clean_text (Text *text)
}
}
-int txt_get_span (TextLine *from, TextLine *to)
+int txt_get_span(TextLine *from, TextLine *to)
{
int ret=0;
TextLine *tmp= from;
@@ -1022,7 +1022,7 @@ void txt_jump_right(Text *text, short sel)
if (!undoing) txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, txt_get_span(text->lines.first, oldl), oldc, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
}
-void txt_move_bol (Text *text, short sel)
+void txt_move_bol(Text *text, short sel)
{
TextLine **linep;
int *charp, old;
@@ -1039,7 +1039,7 @@ void txt_move_bol (Text *text, short sel)
if (!undoing) txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, txt_get_span(text->lines.first, *linep), old, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
}
-void txt_move_eol (Text *text, short sel)
+void txt_move_eol(Text *text, short sel)
{
TextLine **linep;
int *charp, old;
@@ -1056,7 +1056,7 @@ void txt_move_eol (Text *text, short sel)
if (!undoing) txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, txt_get_span(text->lines.first, *linep), old, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
}
-void txt_move_bof (Text *text, short sel)
+void txt_move_bof(Text *text, short sel)
{
TextLine **linep;
int *charp, old;
@@ -1074,7 +1074,7 @@ void txt_move_bof (Text *text, short sel)
if (!undoing) txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, txt_get_span(text->lines.first, *linep), old, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
}
-void txt_move_eof (Text *text, short sel)
+void txt_move_eof(Text *text, short sel)
{
TextLine **linep;
int *charp, old;
@@ -1092,13 +1092,13 @@ void txt_move_eof (Text *text, short sel)
if (!undoing) txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, txt_get_span(text->lines.first, *linep), old, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
}
-void txt_move_toline (Text *text, unsigned int line, short sel)
+void txt_move_toline(Text *text, unsigned int line, short sel)
{
txt_move_to(text, line, 0, sel);
}
/* Moves to a certain byte in a line, not a certain utf8-character! */
-void txt_move_to (Text *text, unsigned int line, unsigned int ch, short sel)
+void txt_move_to(Text *text, unsigned int line, unsigned int ch, short sel)
{
TextLine **linep, *oldl;
int *charp, oldc;
@@ -1180,7 +1180,7 @@ static void txt_pop_last (Text *text)
/* never used: CVS 1.19 */
/* static void txt_pop_selr (Text *text) */
-void txt_pop_sel (Text *text)
+void txt_pop_sel(Text *text)
{
text->sell= text->curl;
text->selc= text->curc;
@@ -1268,7 +1268,7 @@ static void txt_delete_sel (Text *text)
text->selc= text->curc;
}
-void txt_sel_all (Text *text)
+void txt_sel_all(Text *text)
{
if (!text) return;
@@ -1279,7 +1279,7 @@ void txt_sel_all (Text *text)
text->selc= text->sell->len;
}
-void txt_sel_line (Text *text)
+void txt_sel_line(Text *text)
{
if (!text) return;
if (!text->curl) return;
@@ -2418,7 +2418,7 @@ void txt_do_redo(Text *text)
/* Line editing functions */
/**************************/
-void txt_split_curline (Text *text)
+void txt_split_curline(Text *text)
{
TextLine *ins;
TextMarker *mrk;
@@ -2602,13 +2602,13 @@ void txt_delete_char(Text *text)
if (!undoing) txt_undo_add_charop(text, UNDO_DEL_1, c);
}
-void txt_delete_word (Text *text)
+void txt_delete_word(Text *text)
{
txt_jump_right(text, 1);
txt_delete_sel(text);
}
-void txt_backspace_char (Text *text)
+void txt_backspace_char(Text *text)
{
unsigned int c='\n';
@@ -2671,7 +2671,7 @@ void txt_backspace_char (Text *text)
if (!undoing) txt_undo_add_charop(text, UNDO_BS_1, c);
}
-void txt_backspace_word (Text *text)
+void txt_backspace_word(Text *text)
{
txt_jump_left(text, 1);
txt_delete_sel(text);
@@ -2745,12 +2745,12 @@ static int txt_add_char_intern (Text *text, unsigned int add, int replace_tabs)
return 1;
}
-int txt_add_char (Text *text, unsigned int add)
+int txt_add_char(Text *text, unsigned int add)
{
return txt_add_char_intern(text, add, text->flags & TXT_TABSTOSPACES);
}
-int txt_add_raw_char (Text *text, unsigned int add)
+int txt_add_raw_char(Text *text, unsigned int add)
{
return txt_add_char_intern(text, add, 0);
}
@@ -2761,7 +2761,7 @@ void txt_delete_selected(Text *text)
txt_make_dirty(text);
}
-int txt_replace_char (Text *text, unsigned int add)
+int txt_replace_char(Text *text, unsigned int add)
{
unsigned int del;
size_t del_size = 0, add_size;
@@ -3020,7 +3020,7 @@ void txt_uncomment(Text *text)
}
}
-int setcurr_tab_spaces (Text *text, int space)
+int setcurr_tab_spaces(Text *text, int space)
{
int i = 0;
int test = 0;
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 7f617620642..9200b1dca18 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -342,7 +342,7 @@ ColorBand *add_colorband(int rangetype)
{
ColorBand *coba;
- coba= MEM_callocN( sizeof(ColorBand), "colorband");
+ coba= MEM_callocN(sizeof(ColorBand), "colorband");
init_colorband(coba, rangetype);
return coba;