From 343edf2722a9e114b98944c1147676e630e699b7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 29 Apr 2012 17:11:40 +0000 Subject: style cleanup: function calls & whitespace. --- source/blender/avi/AVI_avi.h | 36 ++++----- source/blender/avi/intern/avi.c | 28 +++---- source/blender/avi/intern/codecs.c | 8 +- source/blender/avi/intern/endian.c | 2 +- source/blender/avi/intern/options.c | 2 +- source/blender/blenfont/intern/blf_lang.c | 4 +- source/blender/blenkernel/intern/DerivedMesh.c | 30 ++++---- source/blender/blenkernel/intern/action.c | 20 ++--- source/blender/blenkernel/intern/anim_sys.c | 36 ++++----- source/blender/blenkernel/intern/armature.c | 6 +- source/blender/blenkernel/intern/blender.c | 2 +- source/blender/blenkernel/intern/bmfont.c | 4 +- source/blender/blenkernel/intern/bvhutils.c | 2 +- source/blender/blenkernel/intern/cdderivedmesh.c | 34 ++++----- source/blender/blenkernel/intern/cloth.c | 42 +++++------ source/blender/blenkernel/intern/collision.c | 88 +++++++++++----------- source/blender/blenkernel/intern/constraint.c | 32 ++++---- source/blender/blenkernel/intern/curve.c | 41 +++++----- source/blender/blenkernel/intern/depsgraph.c | 6 +- source/blender/blenkernel/intern/displist.c | 14 ++-- source/blender/blenkernel/intern/dynamicpaint.c | 29 +++---- source/blender/blenkernel/intern/fcurve.c | 50 ++++++------ source/blender/blenkernel/intern/fluidsim.c | 4 +- source/blender/blenkernel/intern/fmodifier.c | 16 ++-- source/blender/blenkernel/intern/gpencil.c | 16 ++-- source/blender/blenkernel/intern/group.c | 2 +- source/blender/blenkernel/intern/implicit.c | 8 +- source/blender/blenkernel/intern/ipo.c | 2 +- source/blender/blenkernel/intern/material.c | 2 +- source/blender/blenkernel/intern/mball.c | 18 ++--- source/blender/blenkernel/intern/nla.c | 74 +++++++++--------- source/blender/blenkernel/intern/particle.c | 18 ++--- source/blender/blenkernel/intern/particle_system.c | 20 ++--- source/blender/blenkernel/intern/scene.c | 2 +- source/blender/blenkernel/intern/seqeffects.c | 10 +-- source/blender/blenkernel/intern/shrinkwrap.c | 18 ++--- source/blender/blenkernel/intern/smoke.c | 2 +- source/blender/blenkernel/intern/softbody.c | 22 +++--- source/blender/blenkernel/intern/text.c | 42 +++++------ source/blender/blenkernel/intern/texture.c | 2 +- source/blender/blenlib/BLI_utildefines.h | 40 +++++----- source/blender/blenlib/intern/BLI_kdopbvh.c | 12 +-- source/blender/blenlib/intern/DLRB_tree.c | 8 +- source/blender/blenlib/intern/freetypefont.c | 18 ++--- source/blender/blenlib/intern/noise.c | 2 +- source/blender/blenlib/intern/path_util.c | 4 +- source/blender/blenlib/intern/threads.c | 2 +- source/blender/blenlib/intern/winstuff.c | 2 +- source/blender/blenloader/intern/readfile.c | 10 +-- source/blender/blenloader/intern/writefile.c | 2 +- source/blender/blenpluginapi/intern/pluginapi.c | 62 +++++++-------- source/blender/collada/ErrorHandler.h | 2 +- source/blender/collada/ExtraHandler.h | 2 +- source/blender/collada/ExtraTags.h | 2 +- .../editors/animation/anim_channels_defines.c | 10 +-- .../blender/editors/animation/anim_channels_edit.c | 8 +- source/blender/editors/animation/anim_deps.c | 2 +- source/blender/editors/animation/anim_draw.c | 12 +-- source/blender/editors/animation/anim_filter.c | 6 +- source/blender/editors/animation/anim_ipo_utils.c | 2 +- source/blender/editors/animation/anim_markers.c | 6 +- source/blender/editors/animation/drivers.c | 22 +++--- source/blender/editors/animation/fmodifier_ui.c | 8 +- source/blender/editors/animation/keyframes_draw.c | 8 +- .../blender/editors/animation/keyframes_general.c | 12 +-- source/blender/editors/animation/keyframing.c | 28 +++---- source/blender/editors/animation/keyingsets.c | 30 ++++---- source/blender/editors/armature/editarmature.c | 28 +++---- .../blender/editors/armature/editarmature_sketch.c | 12 +-- source/blender/editors/armature/meshlaplacian.c | 2 +- source/blender/editors/armature/poseSlide.c | 8 +- source/blender/editors/armature/poseUtils.c | 10 +-- source/blender/editors/armature/poselib.c | 16 ++-- source/blender/editors/armature/poseobject.c | 42 +++++------ source/blender/editors/curve/editcurve.c | 18 ++--- source/blender/editors/gpencil/drawgpencil.c | 6 +- .../blender/editors/gpencil/editaction_gpencil.c | 28 +++---- source/blender/editors/gpencil/gpencil_edit.c | 10 +-- source/blender/editors/gpencil/gpencil_ops.c | 2 +- source/blender/editors/gpencil/gpencil_paint.c | 2 +- source/blender/editors/interface/interface.c | 2 +- source/blender/editors/mesh/meshtools.c | 6 +- source/blender/editors/metaball/mball_edit.c | 2 +- source/blender/editors/object/object_add.c | 2 +- source/blender/editors/physics/particle_object.c | 4 +- source/blender/editors/physics/physics_fluid.c | 34 ++++----- source/blender/editors/screen/area.c | 16 ++-- source/blender/editors/space_action/action_edit.c | 38 +++++----- .../blender/editors/space_action/action_select.c | 14 ++-- source/blender/editors/space_file/filelist.c | 8 +- source/blender/editors/space_graph/graph_draw.c | 6 +- source/blender/editors/space_graph/graph_edit.c | 52 ++++++------- source/blender/editors/space_graph/graph_select.c | 14 ++-- source/blender/editors/space_graph/graph_utils.c | 8 +- source/blender/editors/space_logic/logic_window.c | 6 +- source/blender/editors/space_nla/nla_channels.c | 6 +- source/blender/editors/space_nla/nla_draw.c | 4 +- source/blender/editors/space_nla/nla_edit.c | 50 ++++++------ source/blender/editors/space_nla/nla_ops.c | 6 +- source/blender/editors/space_nla/nla_select.c | 10 +-- source/blender/editors/space_node/drawnode.c | 12 +-- source/blender/editors/space_node/node_draw.c | 16 ++-- .../blender/editors/space_outliner/outliner_draw.c | 4 +- .../editors/space_outliner/outliner_tools.c | 2 +- .../editors/space_sequencer/sequencer_draw.c | 2 +- source/blender/editors/space_text/text_python.c | 14 ---- .../editors/transform/transform_conversions.c | 6 +- .../blender/editors/transform/transform_generics.c | 6 +- .../editors/transform/transform_manipulator.c | 6 +- .../editors/transform/transform_orientations.c | 2 +- source/blender/editors/transform/transform_snap.c | 8 +- source/blender/gpu/intern/gpu_draw.c | 2 +- source/blender/gpu/intern/gpu_material.c | 84 ++++++++++----------- source/blender/imbuf/intern/anim_movie.c | 2 +- source/blender/imbuf/intern/indexer.c | 6 +- source/blender/imbuf/intern/jpeg.c | 4 +- source/blender/imbuf/intern/png.c | 10 +-- source/blender/imbuf/intern/thumbs.c | 2 +- source/blender/makesdna/intern/dna_genfile.c | 10 +-- source/blender/makesrna/intern/rna_curve.c | 2 +- source/blender/makesrna/intern/rna_object_api.c | 10 +-- source/blender/modifiers/intern/MOD_collision.c | 6 +- .../blender/modifiers/intern/MOD_fluidsim_util.c | 4 +- source/blender/modifiers/intern/MOD_mask.c | 28 +++---- source/blender/modifiers/intern/MOD_uvproject.c | 4 +- source/blender/nodes/intern/node_common.c | 2 +- .../nodes/shader/nodes/node_shader_vectMath.c | 6 +- .../nodes/texture/nodes/node_texture_bricks.c | 13 ++-- .../nodes/texture/nodes/node_texture_image.c | 2 +- .../nodes/texture/nodes/node_texture_texture.c | 2 +- source/blender/quicktime/apple/quicktime_export.c | 16 ++-- source/blender/quicktime/apple/quicktime_import.c | 12 +-- source/blender/render/intern/raytrace/bvh.h | 8 +- source/blender/render/intern/raytrace/reorganize.h | 6 +- source/blender/render/intern/raytrace/vbvh.h | 2 +- .../blender/render/intern/source/convertblender.c | 10 +-- source/blender/render/intern/source/pipeline.c | 8 +- source/blender/render/intern/source/pixelshading.c | 4 +- source/blender/render/intern/source/rayshade.c | 36 ++++----- .../blender/render/intern/source/render_texture.c | 26 +++---- source/blender/render/intern/source/shadbuf.c | 18 ++--- source/blender/render/intern/source/shadeoutput.c | 14 ++-- source/blender/render/intern/source/sunsky.c | 4 +- source/blender/render/intern/source/volumetric.c | 2 +- source/blender/windowmanager/intern/wm_operators.c | 8 +- source/blenderplayer/bad_level_call_stubs/stubs.c | 28 +++---- source/gameengine/Ketsji/BL_Shader.h | 44 +++++------ source/gameengine/Ketsji/KX_BlenderMaterial.h | 10 +-- source/gameengine/Ketsji/KX_FontObject.h | 8 +- source/gameengine/Ketsji/KX_PyMath.h | 2 +- source/gameengine/Rasterizer/RAS_ICanvas.h | 10 +-- 151 files changed, 1066 insertions(+), 1075 deletions(-) (limited to 'source') diff --git a/source/blender/avi/AVI_avi.h b/source/blender/avi/AVI_avi.h index a579bf7dfec..5f4bdf88879 100644 --- a/source/blender/avi/AVI_avi.h +++ b/source/blender/avi/AVI_avi.h @@ -235,28 +235,28 @@ typedef enum { /** * Test whether this is an avi-format. */ -int AVI_is_avi (const char *name); +int AVI_is_avi(const char *name); /** * Open a compressed file, decompress it into memory. */ -AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...); +AviError AVI_open_compress(char *name, AviMovie *movie, int streams, ...); /** * Finalize a compressed output stream. */ -AviError AVI_close_compress (AviMovie *movie); +AviError AVI_close_compress(AviMovie *movie); /** * Choose a compression option for \. Possible options are * AVI_OPTION_TYPE_MAIN, AVI_OPTION_TYPE_STRH, AVI_OPTION_TYPE_STRF */ -AviError AVI_set_compress_option (AviMovie *movie, - int option_type, - int stream, - AviOption option, - void *opt_data); +AviError AVI_set_compress_option(AviMovie *movie, + int option_type, + int stream, + AviOption option, + void *opt_data); /* Hmmm... there should be some explanantion about what these mean */ /** * Compression option, for use in avi_set_compress_option @@ -275,35 +275,35 @@ AviError AVI_set_compress_option (AviMovie *movie, * Direct the streams \ to \. Redirect \ * streams. */ -int AVI_get_stream (AviMovie *movie, int avist_type, int stream_num); +int AVI_get_stream(AviMovie *movie, int avist_type, int stream_num); /** * Open a movie stream from file. */ -AviError AVI_open_movie (const char *name, AviMovie *movie); +AviError AVI_open_movie(const char *name, AviMovie *movie); /** * Read a frame from a movie stream. */ -void *AVI_read_frame (AviMovie *movie, - AviFormat format, - int frame, - int stream); +void *AVI_read_frame(AviMovie *movie, + AviFormat format, + int frame, + int stream); /** * Close an open movie stream. */ -AviError AVI_close (AviMovie *movie); +AviError AVI_close(AviMovie *movie); /** * Write frames to a movie stream. */ -AviError AVI_write_frame (AviMovie *movie, int frame_num, ...); +AviError AVI_write_frame(AviMovie *movie, int frame_num, ...); /** * Unused but still external */ -AviError AVI_print_error (AviError error); -void AVI_set_debug (int mode); +AviError AVI_print_error(AviError error); +void AVI_set_debug(int mode); #endif /* __AVI_AVI_H__ */ diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c index ea83afb16fb..3a64a8aa8ac 100644 --- a/source/blender/avi/intern/avi.c +++ b/source/blender/avi/intern/avi.c @@ -58,8 +58,8 @@ static char DEBUG_FCC[4]; #define DEBUG_PRINT(x) if (AVI_DEBUG) { printf("AVI DEBUG: " x); } (void)0 /* local functions */ -char *fcc_to_char (unsigned int fcc); -char *tcc_to_char (unsigned int tcc); +char *fcc_to_char(unsigned int fcc); +char *tcc_to_char(unsigned int tcc); @@ -89,7 +89,7 @@ unsigned int GET_TCC (FILE *fp) return FCC (tmp); } -char *fcc_to_char (unsigned int fcc) +char *fcc_to_char(unsigned int fcc) { DEBUG_FCC[0]= (fcc)&127; DEBUG_FCC[1]= (fcc>>8)&127; @@ -99,7 +99,7 @@ char *fcc_to_char (unsigned int fcc) return DEBUG_FCC; } -char *tcc_to_char (unsigned int tcc) +char *tcc_to_char(unsigned int tcc) { DEBUG_FCC[0]= (tcc)&127; DEBUG_FCC[1]= (tcc>>8)&127; @@ -109,7 +109,7 @@ char *tcc_to_char (unsigned int tcc) return DEBUG_FCC; } -int AVI_get_stream (AviMovie *movie, int avist_type, int stream_num) +int AVI_get_stream(AviMovie *movie, int avist_type, int stream_num) { int cur_stream; @@ -157,7 +157,7 @@ static int fcc_is_data (int fcc) return 1; } -AviError AVI_print_error (AviError in_error) +AviError AVI_print_error(AviError in_error) { int error; @@ -200,12 +200,12 @@ AviError AVI_print_error (AviError in_error) return in_error; } #if 0 -void AVI_set_debug (int mode) +void AVI_set_debug(int mode) { AVI_DEBUG= mode; } -int AVI_is_avi (char *name) +int AVI_is_avi(char *name) { FILE *fp; int ret; @@ -228,7 +228,7 @@ int AVI_is_avi (char *name) } #endif -int AVI_is_avi (const char *name) +int AVI_is_avi(const char *name) { int temp, fcca, j; AviMovie movie= {NULL}; @@ -425,7 +425,7 @@ int AVI_is_avi (const char *name) } -AviError AVI_open_movie (const char *name, AviMovie *movie) +AviError AVI_open_movie(const char *name, AviMovie *movie) { int temp, fcca, size, j; @@ -714,7 +714,7 @@ void *AVI_read_frame (AviMovie *movie, AviFormat format, int frame, int stream) return buffer; } -AviError AVI_close (AviMovie *movie) +AviError AVI_close(AviMovie *movie) { int i; @@ -737,7 +737,7 @@ AviError AVI_close (AviMovie *movie) return AVI_ERROR_NONE; } -AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...) +AviError AVI_open_compress(char *name, AviMovie *movie, int streams, ...) { va_list ap; AviList list; @@ -933,7 +933,7 @@ AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...) return AVI_ERROR_NONE; } -AviError AVI_write_frame (AviMovie *movie, int frame_num, ...) +AviError AVI_write_frame(AviMovie *movie, int frame_num, ...) { AviList list; AviChunk chunk; @@ -1041,7 +1041,7 @@ AviError AVI_write_frame (AviMovie *movie, int frame_num, ...) return AVI_ERROR_NONE; } -AviError AVI_close_compress (AviMovie *movie) +AviError AVI_close_compress(AviMovie *movie) { int temp, movi_size, i; diff --git a/source/blender/avi/intern/codecs.c b/source/blender/avi/intern/codecs.c index 222900b6637..87db5915dc8 100644 --- a/source/blender/avi/intern/codecs.c +++ b/source/blender/avi/intern/codecs.c @@ -85,7 +85,7 @@ void *avi_format_convert (AviMovie *movie, int stream, void *buffer, AviFormat f return buffer; } -int avi_get_data_id (AviFormat format, int stream) +int avi_get_data_id(AviFormat format, int stream) { char fcc[5]; @@ -99,7 +99,7 @@ int avi_get_data_id (AviFormat format, int stream) return FCC(fcc); } -int avi_get_format_type (AviFormat format) +int avi_get_format_type(AviFormat format) { switch (format) { case AVI_FORMAT_RGB24: @@ -114,7 +114,7 @@ int avi_get_format_type (AviFormat format) } } -int avi_get_format_fcc (AviFormat format) +int avi_get_format_fcc(AviFormat format) { switch (format) { case AVI_FORMAT_RGB24: @@ -131,7 +131,7 @@ int avi_get_format_fcc (AviFormat format) } } -int avi_get_format_compression (AviFormat format) +int avi_get_format_compression(AviFormat format) { switch (format) { case AVI_FORMAT_RGB24: diff --git a/source/blender/avi/intern/endian.c b/source/blender/avi/intern/endian.c index eb9e586cfb0..41b8202af03 100644 --- a/source/blender/avi/intern/endian.c +++ b/source/blender/avi/intern/endian.c @@ -169,7 +169,7 @@ static void Iindexe (AviIndexEntry *indexe) } #endif /* __BIG_ENDIAN__ */ -void awrite (AviMovie *movie, void *datain, int block, int size, FILE *fp, int type) +void awrite(AviMovie *movie, void *datain, int block, int size, FILE *fp, int type) { #ifdef __BIG_ENDIAN__ void *data; diff --git a/source/blender/avi/intern/options.c b/source/blender/avi/intern/options.c index a2fd756ddaa..fb1ed24926e 100644 --- a/source/blender/avi/intern/options.c +++ b/source/blender/avi/intern/options.c @@ -44,7 +44,7 @@ /* avi_set_compress_options gets its own file... now don't WE feel important? */ -AviError AVI_set_compress_option (AviMovie *movie, int option_type, int stream, AviOption option, void *opt_data) +AviError AVI_set_compress_option(AviMovie *movie, int option_type, int stream, AviOption option, void *opt_data) { int i; int useconds; diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c index 435ca8776bc..0cec0d855db 100644 --- a/source/blender/blenfont/intern/blf_lang.c +++ b/source/blender/blenfont/intern/blf_lang.c @@ -182,9 +182,9 @@ void BLF_lang_set(const char *str) char *envStr; if (U.language == 0)/* use system setting */ - envStr = BLI_sprintfN( "LANG=%s", getenv("LANG") ); + envStr = BLI_sprintfN("LANG=%s", getenv("LANG")); else - envStr = BLI_sprintfN( "LANG=%s", short_locale ); + envStr = BLI_sprintfN("LANG=%s", short_locale); gettext_putenv(envStr); MEM_freeN(envStr); 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; tnumTessFaceData; 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 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; atotcol; 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; aparts; 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; sss_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; iobmat, &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; ilayers 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; psize), 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; isoft; @@ -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; atotpoint; 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; diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 3a533f73d9d..18c2aa3313c 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -79,36 +79,36 @@ #define MAX4(x,y,z,a) MAX2( MAX2((x),(y)) , MAX2((z),(a)) ) #define INIT_MINMAX(min, max) { \ - (min)[0]= (min)[1]= (min)[2]= 1.0e30f; \ - (max)[0]= (max)[1]= (max)[2]= -1.0e30f; \ + (min)[0] = (min)[1] = (min)[2] = 1.0e30f; \ + (max)[0] = (max)[1] = (max)[2] = -1.0e30f; \ } #define INIT_MINMAX2(min, max) { \ - (min)[0]= (min)[1]= 1.0e30f; \ - (max)[0]= (max)[1]= -1.0e30f; \ + (min)[0] = (min)[1] = 1.0e30f; \ + (max)[0] = (max)[1] = -1.0e30f; \ } (void)0 #define DO_MIN(vec, min) { \ - if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \ - if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \ - if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; \ + if ((min)[0] > (vec)[0]) (min)[0] = (vec)[0]; \ + if ((min)[1] > (vec)[1]) (min)[1] = (vec)[1]; \ + if ((min)[2] > (vec)[2]) (min)[2] = (vec)[2]; \ } (void)0 #define DO_MAX(vec, max) { \ - if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \ - if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \ - if( (max)[2]<(vec)[2] ) (max)[2]= (vec)[2]; \ + if ((max)[0] < (vec)[0]) (max)[0] = (vec)[0]; \ + if ((max)[1] < (vec)[1]) (max)[1] = (vec)[1]; \ + if ((max)[2] < (vec)[2]) (max)[2] = (vec)[2]; \ } (void)0 #define DO_MINMAX(vec, min, max) { \ - if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \ - if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \ - if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; \ - if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \ - if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \ - if( (max)[2]<(vec)[2] ) (max)[2]= (vec)[2]; \ + if ((min)[0] > (vec)[0] ) (min)[0] = (vec)[0]; \ + if ((min)[1] > (vec)[1] ) (min)[1] = (vec)[1]; \ + if ((min)[2] > (vec)[2] ) (min)[2] = (vec)[2]; \ + if ((max)[0] < (vec)[0] ) (max)[0] = (vec)[0]; \ + if ((max)[1] < (vec)[1] ) (max)[1] = (vec)[1]; \ + if ((max)[2] < (vec)[2] ) (max)[2] = (vec)[2]; \ } (void)0 #define DO_MINMAX2(vec, min, max) { \ - if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \ - if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \ - if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \ - if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \ + if ((min)[0] > (vec)[0] ) (min)[0] = (vec)[0]; \ + if ((min)[1] > (vec)[1] ) (min)[1] = (vec)[1]; \ + if ((max)[0] < (vec)[0] ) (max)[0] = (vec)[0]; \ + if ((max)[1] < (vec)[1] ) (max)[1] = (vec)[1]; \ } (void)0 /* some math and copy defines */ diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 3e1561136cc..e586c176800 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -177,7 +177,7 @@ static int ADJUST_MEMORY(void *local_memblock, void **memblock, int new_size, in if (*memblock == local_memblock) { new_memblock = malloc( size_per_item * new_max_size ); - memcpy( new_memblock, *memblock, size_per_item * *max_size ); + memcpy(new_memblock, *memblock, size_per_item * *max_size); } else new_memblock = realloc(*memblock, size_per_item * new_max_size ); @@ -1329,7 +1329,7 @@ int BLI_bvhtree_find_nearest(BVHTree *tree, const float co[3], BVHTreeNearest *n } if (nearest) { - memcpy( &data.nearest, nearest, sizeof(*nearest) ); + memcpy(&data.nearest, nearest, sizeof(*nearest)); } else { data.nearest.index = -1; @@ -1518,7 +1518,7 @@ int BLI_bvhtree_ray_cast(BVHTree *tree, const float co[3], const float dir[3], f if (hit) - memcpy( &data.hit, hit, sizeof(*hit) ); + memcpy(&data.hit, hit, sizeof(*hit)); else { data.hit.index = -1; data.hit.dist = FLT_MAX; @@ -1531,7 +1531,7 @@ int BLI_bvhtree_ray_cast(BVHTree *tree, const float co[3], const float dir[3], f if (hit) - memcpy( hit, &data.hit, sizeof(*hit) ); + memcpy(hit, &data.hit, sizeof(*hit)); return data.hit.index; } @@ -1610,7 +1610,7 @@ static void dfs_range_query(RangeQueryData *data, BVHNode *node) data->callback(data->userdata, node->children[i]->index, dist); } else - dfs_range_query( data, node->children[i] ); + dfs_range_query(data, node->children[i]); } } } @@ -1639,7 +1639,7 @@ int BLI_bvhtree_range_query(BVHTree *tree, const float co[3], float radius, BVHT data.callback(data.userdata, root->index, dist); } else - dfs_range_query( &data, root ); + dfs_range_query(&data, root); } } diff --git a/source/blender/blenlib/intern/DLRB_tree.c b/source/blender/blenlib/intern/DLRB_tree.c index 7c5ee236a35..6398bd863db 100644 --- a/source/blender/blenlib/intern/DLRB_tree.c +++ b/source/blender/blenlib/intern/DLRB_tree.c @@ -44,7 +44,7 @@ DLRBT_Tree *BLI_dlrbTree_new (void) } /* Just zero out the pointers used */ -void BLI_dlrbTree_init (DLRBT_Tree *tree) +void BLI_dlrbTree_init(DLRBT_Tree *tree) { if (tree == NULL) return; @@ -68,7 +68,7 @@ static void recursive_tree_free_nodes (DLRBT_Node *node) } /* Free the given tree's data but not the tree itself */ -void BLI_dlrbTree_free (DLRBT_Tree *tree) +void BLI_dlrbTree_free(DLRBT_Tree *tree) { if (tree == NULL) return; @@ -113,7 +113,7 @@ static void linkedlist_sync_add_node (DLRBT_Tree *tree, DLRBT_Node *node) } /* Make sure the tree's Double-Linked list representation is valid */ -void BLI_dlrbTree_linkedlist_sync (DLRBT_Tree *tree) +void BLI_dlrbTree_linkedlist_sync(DLRBT_Tree *tree) { /* sanity checks */ if (tree == NULL) @@ -486,7 +486,7 @@ static void insert_check_3 (DLRBT_Tree *tree, DLRBT_Node *node) /* Balance the tree after the given element has been added to it * (using custom code, in the Binary Tree way). */ -void BLI_dlrbTree_insert (DLRBT_Tree *tree, DLRBT_Node *node) +void BLI_dlrbTree_insert(DLRBT_Tree *tree, DLRBT_Node *node) { /* sanity checks */ if ((tree == NULL) || (node == NULL)) diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c index a26c56a16f3..c9f7b7c7e64 100644 --- a/source/blender/blenlib/intern/freetypefont.c +++ b/source/blender/blenlib/intern/freetypefont.c @@ -304,7 +304,7 @@ static int objchr_to_ftvfontdata(VFont *vfont, FT_ULong charcode) // Load the font to memory if (tf->pf) { - err= FT_New_Memory_Face( library, + err= FT_New_Memory_Face(library, tf->pf->data, tf->pf->size, 0, @@ -342,7 +342,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf) #endif // load the freetype font - err = FT_New_Memory_Face( library, + err = FT_New_Memory_Face(library, pf->data, pf->size, 0, @@ -351,10 +351,10 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf) if (err) return NULL; #if 0 - for ( n = 0; n < face->num_charmaps; n++ ) + for (n = 0; n < face->num_charmaps; n++) { charmap = face->charmaps[n]; - if ( charmap->platform_id == my_platform_id && + if (charmap->platform_id == my_platform_id && charmap->encoding_id == my_encoding_id ) { found = charmap; @@ -362,11 +362,11 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf) } } - if ( !found ) { return NULL; } + if (!found ) { return NULL; } // now, select the charmap for the face object - err = FT_Set_Charmap( face, found ); - if ( err ) { return NULL; } + err = FT_Set_Charmap(face, found); + if (err) { return NULL; } #endif // allocate blender font @@ -393,7 +393,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf) } } - err = FT_Set_Charmap( face, found ); + err = FT_Set_Charmap(face, found); if ( err ) return NULL; @@ -498,7 +498,7 @@ VFontData *BLI_vfontdata_from_freetypefont(PackedFile *pf) } //free Freetype - FT_Done_FreeType( library); + FT_Done_FreeType(library); return vfd; } diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index 5db42c35f5c..5b669c4ff1c 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -375,7 +375,7 @@ float BLI_turbulence1(float noisesize, float x, float y, float z, int nr) { float s, d= 0.5, div=1.0; - s= fabsf( (-1.0f+2.0f*BLI_hnoise(noisesize, x, y, z))); + s= fabsf((-1.0f + 2.0f * BLI_hnoise(noisesize, x, y, z))); while (nr>0) { diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index a6b851ca488..9f775028c1a 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -758,7 +758,7 @@ int BLI_path_cwd(char *path) BLI_current_working_dir(cwd, sizeof(cwd)); /* in case the full path to the blend isn't used */ if (cwd[0] == '\0') { - printf( "Could not get the current working directory - $PWD for an unknown reason."); + printf("Could not get the current working directory - $PWD for an unknown reason.\n"); } else { /* uses the blend path relative to cwd important for loading relative linked files. @@ -1787,7 +1787,7 @@ static void bli_where_am_i(char *fullname, const size_t maxlen, const char *name #ifdef WITH_BINRELOC /* linux uses binreloc since argv[0] is not reliable, call br_init( NULL ) first */ - path = br_find_exe( NULL ); + path = br_find_exe(NULL); if (path) { BLI_strncpy(fullname, path, maxlen); free((void *)path); diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c index 05d8ded7764..2d82c0989b1 100644 --- a/source/blender/blenlib/intern/threads.c +++ b/source/blender/blenlib/intern/threads.c @@ -304,7 +304,7 @@ void BLI_end_threads(ListBase *threadbase) /* System Information */ /* how many threads are native on this system? */ -int BLI_system_thread_count( void ) +int BLI_system_thread_count(void) { int t; #ifdef WIN32 diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index 6c8754eeff3..0731213d607 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -245,7 +245,7 @@ struct dirent *readdir(DIR *dp) } } -int closedir (DIR *dp) +int closedir(DIR *dp) { if (dp->direntry.d_name) MEM_freeN(dp->direntry.d_name); if (dp->handle!=INVALID_HANDLE_VALUE) FindClose(dp->handle); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 32768168e7e..b7ffa77a502 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1476,7 +1476,7 @@ static void test_pointer_array(FileData *fd, void **mat) len= MEM_allocN_len(*mat)/fd->filesdna->pointerlen; if (fd->filesdna->pointerlen==8 && fd->memsdna->pointerlen==4) { - ipoin=imat= MEM_mallocN( len*4, "newmatar"); + ipoin=imat= MEM_mallocN(len*4, "newmatar"); lpoin= *mat; while (len-- > 0) { @@ -1491,7 +1491,7 @@ static void test_pointer_array(FileData *fd, void **mat) } if (fd->filesdna->pointerlen==4 && fd->memsdna->pointerlen==8) { - lpoin=lmat= MEM_mallocN( len*8, "newmatar"); + lpoin=lmat= MEM_mallocN(len*8, "newmatar"); ipoin= *mat; while (len-- > 0) { @@ -14425,7 +14425,7 @@ static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const } if (do_it) { - base= MEM_callocN( sizeof(Base), "add_ext_base"); + base= MEM_callocN(sizeof(Base), "add_ext_base"); BLI_addtail(&(sce->base), base); base->lay= ob->lay; base->object= ob; @@ -14529,7 +14529,7 @@ static ID *append_named_part_ex(const bContext *C, Main *mainl, FileData *fd, co Base *base; Object *ob; - base= MEM_callocN( sizeof(Base), "app_nam_part"); + base= MEM_callocN(sizeof(Base), "app_nam_part"); BLI_addtail(&scene->base, base); ob= (Object *)id; @@ -14674,7 +14674,7 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in /* patch to prevent switch_endian happens twice */ if ((*fd)->flags & FD_FLAGS_SWITCH_ENDIAN) { - blo_freefiledata( *fd ); + blo_freefiledata(*fd); *fd = NULL; } } diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index a27801f62a7..43f35462c7b 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -239,7 +239,7 @@ static void writedata_free(WriteData *wd) #define MYWRITE_FLUSH NULL -static void mywrite( WriteData *wd, const void *adr, int len) +static void mywrite(WriteData *wd, const void *adr, int len) { if (wd->error) return; diff --git a/source/blender/blenpluginapi/intern/pluginapi.c b/source/blender/blenpluginapi/intern/pluginapi.c index 02166c466fa..efdd11352c6 100644 --- a/source/blender/blenpluginapi/intern/pluginapi.c +++ b/source/blender/blenpluginapi/intern/pluginapi.c @@ -268,38 +268,38 @@ LIBEXPORT float turbulence1(float noisesize, * Otherwise they will not be imported from the archive * library on Unix. -zr */ -int pluginapi_force_ref(void); +int pluginapi_force_ref(void); -int pluginapi_force_ref(void) +int pluginapi_force_ref(void) { return - GET_INT_FROM_POINTER( mallocN ) + - GET_INT_FROM_POINTER( callocN ) + - GET_INT_FROM_POINTER( freeN ) + - GET_INT_FROM_POINTER( mallocT ) + - GET_INT_FROM_POINTER( callocT ) + - GET_INT_FROM_POINTER( freeT ) + - GET_INT_FROM_POINTER( allocImBuf ) + - GET_INT_FROM_POINTER( dupImBuf ) + - GET_INT_FROM_POINTER( freeImBuf ) + - GET_INT_FROM_POINTER( saveiff ) + - GET_INT_FROM_POINTER( loadifffile ) + - GET_INT_FROM_POINTER( loadiffname ) + - GET_INT_FROM_POINTER( testiffname ) + - GET_INT_FROM_POINTER( onehalf ) + - GET_INT_FROM_POINTER( half_x ) + - GET_INT_FROM_POINTER( half_y ) + - GET_INT_FROM_POINTER( double_x ) + - GET_INT_FROM_POINTER( double_y ) + - GET_INT_FROM_POINTER( double_fast_x ) + - GET_INT_FROM_POINTER( double_fast_y ) + - GET_INT_FROM_POINTER( ispic ) + - GET_INT_FROM_POINTER( scaleImBuf ) + - GET_INT_FROM_POINTER( scalefastImBuf ) + - GET_INT_FROM_POINTER( hnoise ) + - GET_INT_FROM_POINTER( hnoisep ) + - GET_INT_FROM_POINTER( turbulence ) + - GET_INT_FROM_POINTER( turbulence1 ) + - GET_INT_FROM_POINTER( de_interlace ) + - GET_INT_FROM_POINTER( interlace ); + GET_INT_FROM_POINTER(mallocN) + + GET_INT_FROM_POINTER(callocN) + + GET_INT_FROM_POINTER(freeN) + + GET_INT_FROM_POINTER(mallocT) + + GET_INT_FROM_POINTER(callocT) + + GET_INT_FROM_POINTER(freeT) + + GET_INT_FROM_POINTER(allocImBuf) + + GET_INT_FROM_POINTER(dupImBuf) + + GET_INT_FROM_POINTER(freeImBuf) + + GET_INT_FROM_POINTER(saveiff) + + GET_INT_FROM_POINTER(loadifffile) + + GET_INT_FROM_POINTER(loadiffname) + + GET_INT_FROM_POINTER(testiffname) + + GET_INT_FROM_POINTER(onehalf) + + GET_INT_FROM_POINTER(half_x) + + GET_INT_FROM_POINTER(half_y) + + GET_INT_FROM_POINTER(double_x) + + GET_INT_FROM_POINTER(double_y) + + GET_INT_FROM_POINTER(double_fast_x) + + GET_INT_FROM_POINTER(double_fast_y) + + GET_INT_FROM_POINTER(ispic) + + GET_INT_FROM_POINTER(scaleImBuf) + + GET_INT_FROM_POINTER(scalefastImBuf) + + GET_INT_FROM_POINTER(hnoise) + + GET_INT_FROM_POINTER(hnoisep) + + GET_INT_FROM_POINTER(turbulence) + + GET_INT_FROM_POINTER(turbulence1) + + GET_INT_FROM_POINTER(de_interlace) + + GET_INT_FROM_POINTER(interlace); } diff --git a/source/blender/collada/ErrorHandler.h b/source/blender/collada/ErrorHandler.h index 07eccb713e8..3b3797e935a 100644 --- a/source/blender/collada/ErrorHandler.h +++ b/source/blender/collada/ErrorHandler.h @@ -47,7 +47,7 @@ public: bool hasError() { return mError; } private: /** Disable default copy ctor. */ - ErrorHandler( const ErrorHandler& pre ); + ErrorHandler(const ErrorHandler& pre); /** Disable default assignment operator. */ const ErrorHandler& operator= ( const ErrorHandler& pre ); /** Hold error status. */ diff --git a/source/blender/collada/ExtraHandler.h b/source/blender/collada/ExtraHandler.h index 68656dfc690..900e7b70331 100644 --- a/source/blender/collada/ExtraHandler.h +++ b/source/blender/collada/ExtraHandler.h @@ -63,7 +63,7 @@ public: const COLLADAFW::UniqueId& uniqueId ); private: /** Disable default copy constructor. */ - ExtraHandler( const ExtraHandler& pre ); + ExtraHandler(const ExtraHandler& pre); /** Disable default assignment operator. */ const ExtraHandler& operator= ( const ExtraHandler& pre ); diff --git a/source/blender/collada/ExtraTags.h b/source/blender/collada/ExtraTags.h index f8d12e6288a..03a311a7e86 100644 --- a/source/blender/collada/ExtraTags.h +++ b/source/blender/collada/ExtraTags.h @@ -59,7 +59,7 @@ public: private: /** Disable default copy constructor. */ - ExtraTags( const ExtraTags& pre ); + ExtraTags(const ExtraTags& pre); /** Disable default assignment operator. */ const ExtraTags& operator= ( const ExtraTags& pre ); diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 714a91ad0b5..b62222317bd 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -2560,7 +2560,7 @@ bAnimChannelType *ANIM_channel_get_typeinfo (bAnimListElem *ale) /* --------------------------- */ /* Print debug info string for the given channel */ -void ANIM_channel_debug_print_info (bAnimListElem *ale, short indent_level) +void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level) { bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale); @@ -2592,7 +2592,7 @@ void ANIM_channel_debug_print_info (bAnimListElem *ale, short indent_level) /* Check if some setting for a channel is enabled * Returns: 1 = On, 0 = Off, -1 = Invalid */ -short ANIM_channel_setting_get (bAnimContext *ac, bAnimListElem *ale, int setting) +short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, int setting) { bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale); @@ -2669,7 +2669,7 @@ short ANIM_channel_setting_get (bAnimContext *ac, bAnimListElem *ale, int settin * - setting: eAnimChannel_Settings * - mode: eAnimChannels_SetFlag */ -void ANIM_channel_setting_set (bAnimContext *ac, bAnimListElem *ale, int setting, short mode) +void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, int setting, short mode) { bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale); @@ -2722,7 +2722,7 @@ void ANIM_channel_setting_set (bAnimContext *ac, bAnimListElem *ale, int setting /* Draw the given channel */ // TODO: make this use UI controls for the buttons -void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc) +void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc) { bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale); View2D *v2d= &ac->ar->v2d; @@ -3151,7 +3151,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChann } /* Draw UI widgets the given channel */ -void ANIM_channel_draw_widgets (bContext *C, bAnimContext *ac, bAnimListElem *ale, uiBlock *block, float yminc, float ymaxc, size_t channel_index) +void ANIM_channel_draw_widgets(bContext *C, bAnimContext *ac, bAnimListElem *ale, uiBlock *block, float yminc, float ymaxc, size_t channel_index) { bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale); View2D *v2d= &ac->ar->v2d; diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index fb6a65a585f..e3c1aacd7ac 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -69,7 +69,7 @@ /* Set the given animation-channel as the active one for the active context */ // TODO: extend for animdata types... -void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int filter, void *channel_data, short channel_type) +void ANIM_set_active_channel(bAnimContext *ac, void *data, short datatype, int filter, void *channel_data, short channel_type) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; @@ -188,7 +188,7 @@ void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int * - test: check if deselecting instead of selecting * - sel: eAnimChannels_SetFlag; */ -void ANIM_deselect_anim_channels (bAnimContext *ac, void *data, short datatype, short test, short sel) +void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, short datatype, short test, short sel) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; @@ -372,7 +372,7 @@ void ANIM_deselect_anim_channels (bAnimContext *ac, void *data, short datatype, * - setting: type of setting to set * - on: whether the visibility setting has been enabled or disabled */ -void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bAnimListElem *ale_setting, int setting, short on) +void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAnimListElem *ale_setting, int setting, short on) { bAnimListElem *ale, *match=NULL; int prevLevel=0, matchLevel=0; @@ -504,7 +504,7 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA /* -------------------------- F-Curves ------------------------------------- */ /* Delete the given F-Curve from its AnimData block */ -void ANIM_fcurve_delete_from_animdata (bAnimContext *ac, AnimData *adt, FCurve *fcu) +void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *fcu) { /* - if no AnimData, we've got nowhere to remove the F-Curve from * (this doesn't guarantee that the F-Curve is in there, but at least we tried diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 3f0e1b1be14..b449c11ff7b 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -241,7 +241,7 @@ static void animchan_sync_fcurve (bAnimContext *UNUSED(ac), bAnimListElem *ale) /* ---------------- */ /* Main call to be exported to animation editors */ -void ANIM_sync_animchannels_to_data (const bContext *C) +void ANIM_sync_animchannels_to_data(const bContext *C) { bAnimContext ac; ListBase anim_data = {NULL, NULL}; diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index bab341ae70b..236b8d18b78 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -63,7 +63,7 @@ * - cfra: time in frames or seconds, consistent with the values shown by timecodes */ // TODO: have this in kernel instead under scene? -void ANIM_timecode_string_from_frame (char *str, Scene *scene, int power, short timecodes, float cfra) +void ANIM_timecode_string_from_frame(char *str, Scene *scene, int power, short timecodes, float cfra) { if (timecodes) { int hours=0, minutes=0, seconds=0, frames=0; @@ -212,7 +212,7 @@ static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time) } /* General call for drawing current frame indicator in animation editor */ -void ANIM_draw_cfra (const bContext *C, View2D *v2d, short flag) +void ANIM_draw_cfra(const bContext *C, View2D *v2d, short flag) { Scene *scene= CTX_data_scene(C); float vec[2]; @@ -248,7 +248,7 @@ void ANIM_draw_cfra (const bContext *C, View2D *v2d, short flag) /* Note: 'Preview Range' tools are defined in anim_ops.c */ /* Draw preview range 'curtains' for highlighting where the animation data is */ -void ANIM_draw_previewrange (const bContext *C, View2D *v2d) +void ANIM_draw_previewrange(const bContext *C, View2D *v2d) { Scene *scene= CTX_data_scene(C); @@ -335,7 +335,7 @@ static short bezt_nlamapping_apply(KeyframeEditData *ked, BezTriple *bezt) * - restore = whether to map points back to non-mapped time * - only_keys = whether to only adjust the location of the center point of beztriples */ -void ANIM_nla_mapping_apply_fcurve (AnimData *adt, FCurve *fcu, short restore, short only_keys) +void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, short restore, short only_keys) { KeyframeEditData ked= {{NULL}}; KeyframeEditFunc map_cb; @@ -361,7 +361,7 @@ void ANIM_nla_mapping_apply_fcurve (AnimData *adt, FCurve *fcu, short restore, s /* UNITS CONVERSION MAPPING (required for drawing and editing keyframes) */ /* Get unit conversion factor for given ID + F-Curve */ -float ANIM_unit_mapping_get_factor (Scene *scene, ID *id, FCurve *fcu, short restore) +float ANIM_unit_mapping_get_factor(Scene *scene, ID *id, FCurve *fcu, short restore) { /* sanity checks */ if (id && fcu && fcu->rna_path) { @@ -415,7 +415,7 @@ static short bezt_unit_mapping_apply (KeyframeEditData *ked, BezTriple *bezt) } /* Apply/Unapply units conversions to keyframes */ -void ANIM_unit_mapping_apply_fcurve (Scene *scene, ID *id, FCurve *fcu, short flag) +void ANIM_unit_mapping_apply_fcurve(Scene *scene, ID *id, FCurve *fcu, short flag) { KeyframeEditData ked; KeyframeEditFunc sel_cb; diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index e1bf4273646..cc3401da6c5 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -260,7 +260,7 @@ static short nlaedit_get_context (bAnimContext *ac, SpaceNla *snla) * - AnimContext to write to is provided as pointer to var on stack so that we don't have * allocation/freeing costs (which are not that avoidable with channels). */ -short ANIM_animdata_context_getdata (bAnimContext *ac) +short ANIM_animdata_context_getdata(bAnimContext *ac) { SpaceLink *sl = ac->sl; short ok= 0; @@ -303,7 +303,7 @@ short ANIM_animdata_context_getdata (bAnimContext *ac) * allocation/freeing costs (which are not that avoidable with channels). * - Clears data and sets the information from Blender Context which is useful */ -short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac) +short ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) { ScrArea *sa= CTX_wm_area(C); ARegion *ar= CTX_wm_region(C); @@ -2218,7 +2218,7 @@ static size_t animdata_filter_remove_duplis (ListBase *anim_data) * will be placed for use. * filter_mode: how should the data be filtered - bitmapping accessed flags */ -size_t ANIM_animdata_filter (bAnimContext *ac, ListBase *anim_data, int filter_mode, void *data, short datatype) +size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, int filter_mode, void *data, short datatype) { size_t items = 0; diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index 6f4d4c4a431..4be3f79060e 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -191,7 +191,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) /* used to determine the color of F-Curves with FCURVE_COLOR_AUTO_RAINBOW set */ //void fcurve_rainbow (unsigned int cur, unsigned int tot, float *out) -void getcolor_fcurve_rainbow (int cur, int tot, float *out) +void getcolor_fcurve_rainbow(int cur, int tot, float *out) { float hue, val, sat, fac; int grouping; diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 78c5ced60c4..2527cb7eb40 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -121,7 +121,7 @@ ListBase *ED_animcontext_get_markers(const bAnimContext *ac) * < value: from the transform code, this is t->vec[0] (which is delta transform for grab/extend, and scale factor for scale) * < side: (B/L/R) for 'extend' functionality, which side of current frame to use */ -int ED_markers_post_apply_transform (ListBase *markers, Scene *scene, int mode, float value, char side) +int ED_markers_post_apply_transform(ListBase *markers, Scene *scene, int mode, float value, char side) { TimeMarker *marker; float cfra = (float)CFRA; @@ -187,14 +187,14 @@ TimeMarker *ED_markers_find_nearest_marker (ListBase *markers, float x) } /* Return the time of the marker that occurs on a frame closest to the given time */ -int ED_markers_find_nearest_marker_time (ListBase *markers, float x) +int ED_markers_find_nearest_marker_time(ListBase *markers, float x) { TimeMarker *nearest= ED_markers_find_nearest_marker(markers, x); return (nearest) ? (nearest->frame) : (int)floor(x + 0.5f); } -void ED_markers_get_minmax (ListBase *markers, short sel, float *first, float *last) +void ED_markers_get_minmax(ListBase *markers, short sel, float *first, float *last) { TimeMarker *marker; float min, max; diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 9c4f96ebe6d..a4bc0cc854c 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -66,7 +66,7 @@ #include "anim_intern.h" /* called by WM */ -void free_anim_drivers_copybuf (void); +void free_anim_drivers_copybuf(void); /* ************************************************** */ /* Animation Data Validation */ @@ -135,7 +135,7 @@ FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_ind /* Main Driver Management API calls: * Add a new driver for the specified property on the given ID block */ -short ANIM_add_driver (ReportList *reports, ID *id, const char rna_path[], int array_index, short flag, int type) +short ANIM_add_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short flag, int type) { PointerRNA id_ptr, ptr; PropertyRNA *prop; @@ -229,7 +229,7 @@ short ANIM_add_driver (ReportList *reports, ID *id, const char rna_path[], int a /* Main Driver Management API calls: * Remove the driver for the specified property on the given ID block (if available) */ -short ANIM_remove_driver (ReportList *UNUSED(reports), ID *id, const char rna_path[], int array_index, short UNUSED(flag)) +short ANIM_remove_driver(ReportList *UNUSED(reports), ID *id, const char rna_path[], int array_index, short UNUSED(flag)) { AnimData *adt; FCurve *fcu; @@ -281,7 +281,7 @@ static FCurve *channeldriver_copypaste_buf = NULL; /* This function frees any MEM_calloc'ed copy/paste buffer data */ // XXX find some header to put this in! -void free_anim_drivers_copybuf (void) +void free_anim_drivers_copybuf(void) { /* free the buffer F-Curve if it exists, as if it were just another F-Curve */ if (channeldriver_copypaste_buf) @@ -290,7 +290,7 @@ void free_anim_drivers_copybuf (void) } /* Checks if there is a driver in the copy/paste buffer */ -short ANIM_driver_can_paste (void) +short ANIM_driver_can_paste(void) { return (channeldriver_copypaste_buf != NULL); } @@ -300,7 +300,7 @@ short ANIM_driver_can_paste (void) /* Main Driver Management API calls: * Make a copy of the driver for the specified property on the given ID block */ -short ANIM_copy_driver (ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag)) +short ANIM_copy_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag)) { PointerRNA id_ptr, ptr; PropertyRNA *prop; @@ -347,7 +347,7 @@ short ANIM_copy_driver (ReportList *reports, ID *id, const char rna_path[], int * Add a new driver for the specified property on the given ID block or replace an existing one * with the driver + driver-curve data from the buffer */ -short ANIM_paste_driver (ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag)) +short ANIM_paste_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag)) { PointerRNA id_ptr, ptr; PropertyRNA *prop; @@ -512,7 +512,7 @@ static int add_driver_button_exec (bContext *C, wmOperator *op) return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; } -void ANIM_OT_driver_button_add (wmOperatorType *ot) +void ANIM_OT_driver_button_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add Driver"; @@ -564,7 +564,7 @@ static int remove_driver_button_exec (bContext *C, wmOperator *op) return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; } -void ANIM_OT_driver_button_remove (wmOperatorType *ot) +void ANIM_OT_driver_button_remove(wmOperatorType *ot) { /* identifiers */ ot->name = "Remove Driver"; @@ -611,7 +611,7 @@ static int copy_driver_button_exec (bContext *C, wmOperator *op) return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; } -void ANIM_OT_copy_driver_button (wmOperatorType *ot) +void ANIM_OT_copy_driver_button(wmOperatorType *ot) { /* identifiers */ ot->name = "Copy Driver"; @@ -655,7 +655,7 @@ static int paste_driver_button_exec (bContext *C, wmOperator *op) return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; } -void ANIM_OT_paste_driver_button (wmOperatorType *ot) +void ANIM_OT_paste_driver_button(wmOperatorType *ot) { /* identifiers */ ot->name = "Paste Driver"; diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index d5ec98da588..9b46729b489 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -625,7 +625,7 @@ static void draw_modifier__stepped(uiLayout *layout, ID *id, FModifier *fcm, sho /* --------------- */ -void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifiers, FModifier *fcm) +void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout, ID *id, ListBase *modifiers, FModifier *fcm) { FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm); uiLayout *box, *row, *sub, *col; @@ -769,7 +769,7 @@ static ListBase fmodifier_copypaste_buf = {NULL, NULL}; /* ---------- */ /* free the copy/paste buffer */ -void free_fmodifiers_copybuf (void) +void free_fmodifiers_copybuf(void) { /* just free the whole buffer */ free_fmodifiers(&fmodifier_copypaste_buf); @@ -779,7 +779,7 @@ void free_fmodifiers_copybuf (void) * assuming that the buffer has been cleared already with free_fmodifiers_copybuf() * - active: only copy the active modifier */ -short ANIM_fmodifiers_copy_to_buf (ListBase *modifiers, short active) +short ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, short active) { short ok = 1; @@ -808,7 +808,7 @@ short ANIM_fmodifiers_copy_to_buf (ListBase *modifiers, short active) /* 'Paste' the F-Modifier(s) from the buffer to the specified list * - replace: free all the existing modifiers to leave only the pasted ones */ -short ANIM_fmodifiers_paste_from_buf (ListBase *modifiers, short replace) +short ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, short replace) { FModifier *fcm; short ok = 0; diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 0e0ff0defbb..cc5cb42a783 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -80,7 +80,7 @@ /* Comparator callback used for ActKeyColumns and cframe float-value pointer */ /* NOTE: this is exported to other modules that use the ActKeyColumns for finding keyframes */ -short compare_ak_cfraPtr (void *node, void *data) +short compare_ak_cfraPtr(void *node, void *data) { ActKeyColumn *ak= (ActKeyColumn *)node; float *cframe= data; @@ -312,7 +312,7 @@ static BezTriple *abk_get_bezt_with_value (ActBeztColumn *abk, float value) /* Comparator callback used for ActKeyBlock and cframe float-value pointer */ /* NOTE: this is exported to other modules that use the ActKeyBlocks for finding long-keyframes */ -short compare_ab_cfraPtr (void *node, void *data) +short compare_ab_cfraPtr(void *node, void *data) { ActKeyBlock *ab= (ActKeyBlock *)node; float *cframe= data; @@ -459,7 +459,7 @@ static void set_touched_actkeyblock (ActKeyBlock *ab) /* --------- */ /* Checks if ActKeyBlock should exist... */ -short actkeyblock_is_valid (ActKeyBlock *ab, DLRBT_Tree *keys) +short actkeyblock_is_valid(ActKeyBlock *ab, DLRBT_Tree *keys) { ActKeyColumn *ak; short startCurves, endCurves, totCurves; @@ -494,7 +494,7 @@ static const float _unit_diamond_shape[4][2] = { }; /* draw a simple diamond shape with OpenGL */ -void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel, short key_type, short mode, float alpha) +void draw_keyframe_shape(float x, float y, float xscale, float hsize, short sel, short key_type, short mode, float alpha) { static GLuint displist1=0; static GLuint displist2=0; diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index 831b8d21b01..c54f8c5bd25 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -282,7 +282,7 @@ typedef struct tSmooth_Bezt { /* Use a weighted moving-means method to reduce intensity of fluctuations */ // TODO: introduce scaling factor for weighting falloff -void smooth_fcurve (FCurve *fcu) +void smooth_fcurve(FCurve *fcu) { BezTriple *bezt; int i, x, totSel = 0; @@ -380,7 +380,7 @@ typedef struct tempFrameValCache { /* Evaluates the curves between each selected keyframe on each frame, and keys the value */ -void sample_fcurve (FCurve *fcu) +void sample_fcurve(FCurve *fcu) { BezTriple *bezt, *start=NULL, *end=NULL; tempFrameValCache *value_cache, *fp; @@ -477,7 +477,7 @@ typedef struct tAnimCopybufItem { /* This function frees any MEM_calloc'ed copy/paste buffer data */ // XXX find some header to put this in! -void free_anim_copybuf (void) +void free_anim_copybuf(void) { tAnimCopybufItem *aci, *acn; @@ -506,7 +506,7 @@ void free_anim_copybuf (void) /* ------------------- */ /* This function adds data to the keyframes copy/paste buffer, freeing existing data first */ -short copy_animedit_keys (bAnimContext *ac, ListBase *anim_data) +short copy_animedit_keys(bAnimContext *ac, ListBase *anim_data) { bAnimListElem *ale; Scene *scene= ac->scene; @@ -760,8 +760,8 @@ EnumPropertyItem keyframe_paste_merge_items[] = { /* This function pastes data from the keyframes copy/paste buffer * > return status code is whether the method FAILED to do anything */ -short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data, - const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode) +short paste_animedit_keys(bAnimContext *ac, ListBase *anim_data, + const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode) { bAnimListElem *ale; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index dcaa4073bae..0df68c3775c 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -86,7 +86,7 @@ /* Keyframing Setting Wrangling */ /* Get the active settings for keyframing settings from context (specifically the given scene) */ -short ANIM_get_keyframing_flags (Scene *scene, short incl_mode) +short ANIM_get_keyframing_flags(Scene *scene, short incl_mode) { short flag = 0; @@ -214,7 +214,7 @@ FCurve *verify_fcurve (bAction *act, const char group[], const char rna_path[], * NOTE: any recalculate of the F-Curve that needs to be done will need to * be done by the caller. */ -int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag) +int insert_bezt_fcurve(FCurve *fcu, BezTriple *bezt, short flag) { int i= 0; @@ -295,7 +295,7 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag) * adding a new keyframe to a curve, when the keyframe doesn't exist anywhere else yet. * It returns the index at which the keyframe was added. */ -int insert_vert_fcurve (FCurve *fcu, float x, float y, short flag) +int insert_vert_fcurve(FCurve *fcu, float x, float y, short flag) { BezTriple beztr= {{{0}}}; unsigned int oldTot = fcu->totvert; @@ -759,7 +759,7 @@ static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_ * the keyframe insertion. These include the 'visual' keyframing modes, quick refresh, * and extra keyframe filtering. */ -short insert_keyframe_direct (ReportList *reports, PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, float cfra, short flag) +short insert_keyframe_direct(ReportList *reports, PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, float cfra, short flag) { float curval= 0.0f; @@ -880,7 +880,7 @@ short insert_keyframe_direct (ReportList *reports, PointerRNA ptr, PropertyRNA * * * index of -1 keys all array indices */ -short insert_keyframe (ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag) +short insert_keyframe(ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag) { PointerRNA id_ptr, ptr; PropertyRNA *prop = NULL; @@ -971,7 +971,7 @@ short insert_keyframe (ReportList *reports, ID *id, bAction *act, const char gro * The flag argument is used for special settings that alter the behavior of * the keyframe deletion. These include the quick refresh options. */ -short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short UNUSED(flag)) +short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short UNUSED(flag)) { AnimData *adt= BKE_animdata_from_id(id); PointerRNA id_ptr, ptr; @@ -1153,7 +1153,7 @@ static int insert_key_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ANIM_OT_keyframe_insert (wmOperatorType *ot) +void ANIM_OT_keyframe_insert(wmOperatorType *ot) { PropertyRNA *prop; @@ -1214,7 +1214,7 @@ static int insert_key_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED( } } -void ANIM_OT_keyframe_insert_menu (wmOperatorType *ot) +void ANIM_OT_keyframe_insert_menu(wmOperatorType *ot) { PropertyRNA *prop; @@ -1309,7 +1309,7 @@ static int delete_key_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ANIM_OT_keyframe_delete (wmOperatorType *ot) +void ANIM_OT_keyframe_delete(wmOperatorType *ot) { PropertyRNA *prop; @@ -1383,7 +1383,7 @@ static int delete_key_v3d_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ANIM_OT_keyframe_delete_v3d (wmOperatorType *ot) +void ANIM_OT_keyframe_delete_v3d(wmOperatorType *ot) { /* identifiers */ ot->name = "Delete Keyframe"; @@ -1473,7 +1473,7 @@ static int insert_key_button_exec (bContext *C, wmOperator *op) return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; } -void ANIM_OT_keyframe_insert_button (wmOperatorType *ot) +void ANIM_OT_keyframe_insert_button(wmOperatorType *ot) { /* identifiers */ ot->name = "Insert Keyframe (Buttons)"; @@ -1545,7 +1545,7 @@ static int delete_key_button_exec (bContext *C, wmOperator *op) return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; } -void ANIM_OT_keyframe_delete_button (wmOperatorType *ot) +void ANIM_OT_keyframe_delete_button(wmOperatorType *ot) { /* identifiers */ ot->name = "Delete Keyframe (Buttons)"; @@ -1591,7 +1591,7 @@ int autokeyframe_cfra_can_key(Scene *scene, ID *id) /* --------------- API/Per-Datablock Handling ------------------- */ /* Checks if some F-Curve has a keyframe for a given frame */ -short fcurve_frame_has_keyframe (FCurve *fcu, float frame, short filter) +short fcurve_frame_has_keyframe(FCurve *fcu, float frame, short filter) { /* quick sanity check */ if (ELEM(NULL, fcu, fcu->bezt)) @@ -1704,7 +1704,7 @@ static short object_frame_has_keyframe (Object *ob, float frame, short filter) /* --------------- API ------------------- */ /* Checks whether a keyframe exists for the given ID-block one the given frame */ -short id_frame_has_keyframe (ID *id, float frame, short filter) +short id_frame_has_keyframe(ID *id, float frame, short filter) { /* sanity checks */ if (id == NULL) diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index f66aa31f3f4..f9c4082e429 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -137,7 +137,7 @@ static int add_default_keyingset_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void ANIM_OT_keying_set_add (wmOperatorType *ot) +void ANIM_OT_keying_set_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add Empty Keying Set"; @@ -184,7 +184,7 @@ static int remove_active_keyingset_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ANIM_OT_keying_set_remove (wmOperatorType *ot) +void ANIM_OT_keying_set_remove(wmOperatorType *ot) { /* identifiers */ ot->name = "Remove Active Keying Set"; @@ -227,7 +227,7 @@ static int add_empty_ks_path_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ANIM_OT_keying_set_path_add (wmOperatorType *ot) +void ANIM_OT_keying_set_path_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add Empty Keying Set Path"; @@ -270,7 +270,7 @@ static int remove_active_ks_path_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ANIM_OT_keying_set_path_remove (wmOperatorType *ot) +void ANIM_OT_keying_set_path_remove(wmOperatorType *ot) { /* identifiers */ ot->name = "Remove Active Keying Set Path"; @@ -368,7 +368,7 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op) return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; } -void ANIM_OT_keyingset_button_add (wmOperatorType *ot) +void ANIM_OT_keyingset_button_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add to Keying Set"; @@ -447,7 +447,7 @@ static int remove_keyingset_button_exec (bContext *C, wmOperator *op) return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; } -void ANIM_OT_keyingset_button_remove (wmOperatorType *ot) +void ANIM_OT_keyingset_button_remove(wmOperatorType *ot) { /* identifiers */ ot->name = "Remove from Keying Set"; @@ -494,7 +494,7 @@ static int keyingset_active_menu_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ANIM_OT_keying_set_active_set (wmOperatorType *ot) +void ANIM_OT_keying_set_active_set(wmOperatorType *ot) { PropertyRNA *prop; @@ -571,7 +571,7 @@ KeyingSet *ANIM_builtin_keyingset_get_named (KeyingSet *prevKS, const char name[ /* --------------- */ /* Add the given KeyingSetInfo to the list of type infos, and create an appropriate builtin set too */ -void ANIM_keyingset_info_register (KeyingSetInfo *ksi) +void ANIM_keyingset_info_register(KeyingSetInfo *ksi) { KeyingSet *ks; @@ -591,7 +591,7 @@ void ANIM_keyingset_info_register (KeyingSetInfo *ksi) } /* Remove the given KeyingSetInfo from the list of type infos, and also remove the builtin set if appropriate */ -void ANIM_keyingset_info_unregister (Main *bmain, KeyingSetInfo *ksi) +void ANIM_keyingset_info_unregister(Main *bmain, KeyingSetInfo *ksi) { KeyingSet *ks, *ksn; @@ -620,7 +620,7 @@ void ANIM_keyingset_info_unregister (Main *bmain, KeyingSetInfo *ksi) /* --------------- */ -void ANIM_keyingset_infos_exit (void) +void ANIM_keyingset_infos_exit(void) { KeyingSetInfo *ksi, *next; @@ -662,7 +662,7 @@ KeyingSet *ANIM_scene_get_active_keyingset (Scene *scene) } /* Get the index of the Keying Set provided, for the given Scene */ -int ANIM_scene_get_keyingset_index (Scene *scene, KeyingSet *ks) +int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *ks) { int index; @@ -780,7 +780,7 @@ EnumPropertyItem *ANIM_keying_sets_enum_itemf (bContext *C, PointerRNA *UNUSED(p /* Polling API ----------------------------------------------- */ /* Check if KeyingSet can be used in the current context */ -short ANIM_keyingset_context_ok_poll (bContext *C, KeyingSet *ks) +short ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks) { if ((ks->flag & KEYINGSET_ABSOLUTE) == 0) { KeyingSetInfo *ksi = ANIM_keyingset_info_find_named(ks->typeinfo); @@ -824,7 +824,7 @@ static void RKS_ITER_overrides_list (KeyingSetInfo *ksi, bContext *C, KeyingSet } /* Add new data source for relative Keying Sets */ -void ANIM_relative_keyingset_add_source (ListBase *dsources, ID *id, StructRNA *srna, void *data) +void ANIM_relative_keyingset_add_source(ListBase *dsources, ID *id, StructRNA *srna, void *data) { tRKS_DSource *ds; @@ -857,7 +857,7 @@ void ANIM_relative_keyingset_add_source (ListBase *dsources, ID *id, StructRNA * * * Returns 0 if succeeded, otherwise an error code: eModifyKey_Returns */ -short ANIM_validate_keyingset (bContext *C, ListBase *dsources, KeyingSet *ks) +short ANIM_validate_keyingset(bContext *C, ListBase *dsources, KeyingSet *ks) { /* sanity check */ if (ks == NULL) @@ -905,7 +905,7 @@ short ANIM_validate_keyingset (bContext *C, ListBase *dsources, KeyingSet *ks) * by the KeyingSet. This takes into account many of the different combinations of using KeyingSets. * Returns the number of channels that keyframes were added to */ -int ANIM_apply_keyingset (bContext *C, ListBase *dsources, bAction *act, KeyingSet *ks, short mode, float cfra) +int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSet *ks, short mode, float cfra) { Scene *scene= CTX_data_scene(C); ReportList *reports = CTX_wm_reports(C); diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 969127325e6..4184f15c159 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -534,7 +534,7 @@ void ED_armature_apply_transform(Object *ob, float mat[4][4]) /* exported for use in editors/object/ */ /* 0 == do center, 1 == center new, 2 == center cursor */ -void docenter_armature (Scene *scene, Object *ob, float cursor[3], int centermode, int around) +void docenter_armature(Scene *scene, Object *ob, float cursor[3], int centermode, int around) { Object *obedit= scene->obedit; // XXX get from context EditBone *ebone; @@ -610,7 +610,7 @@ static int editbone_unique_check(void *arg, const char *name) return dupli && dupli != data->bone; } -void unique_editbone_name (ListBase *edbo, char *name, EditBone *bone) +void unique_editbone_name(ListBase *edbo, char *name, EditBone *bone) { struct {ListBase *lb; void *bone;} data; data.lb= edbo; @@ -693,7 +693,7 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op) /* remove auto from visual and get euler rotation */ mul_m3_m3m3(tmat, imat, pmat); - mat3_to_eul( eul, tmat); + mat3_to_eul(eul, tmat); /* just use this euler-y as new roll value */ curbone->roll= eul[1]; @@ -726,7 +726,7 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void POSE_OT_armature_apply (wmOperatorType *ot) +void POSE_OT_armature_apply(wmOperatorType *ot) { /* identifiers */ ot->name = "Apply Pose as Rest Pose"; @@ -776,7 +776,7 @@ static int pose_visual_transform_apply_exec (bContext *C, wmOperator *UNUSED(op) return OPERATOR_FINISHED; } -void POSE_OT_visual_transform_apply (wmOperatorType *ot) +void POSE_OT_visual_transform_apply(wmOperatorType *ot) { /* identifiers */ ot->name = "Apply Visual Transform to Pose"; @@ -1239,7 +1239,7 @@ static int separate_armature_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void ARMATURE_OT_separate (wmOperatorType *ot) +void ARMATURE_OT_separate(wmOperatorType *ot) { /* identifiers */ ot->name = "Separate Bones"; @@ -2944,7 +2944,7 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ARMATURE_OT_fill (wmOperatorType *ot) +void ARMATURE_OT_fill(wmOperatorType *ot) { /* identifiers */ ot->name = "Fill Between Joints"; @@ -3123,7 +3123,7 @@ static int armature_merge_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ARMATURE_OT_merge (wmOperatorType *ot) +void ARMATURE_OT_merge(wmOperatorType *ot) { static EnumPropertyItem merge_types[] = { {1, "WITHIN_CHAIN", 0, "Within Chains", ""}, @@ -4345,7 +4345,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor * test==2: only clear active tag * test==3: swap select (no test / inverse selection status of all independently) */ -void ED_pose_deselectall (Object *ob, int test) +void ED_pose_deselectall(Object *ob, int test) { bArmature *arm= ob->data; bPoseChannel *pchan; @@ -4828,7 +4828,7 @@ static void pchan_clear_rot(bPoseChannel *pchan) quat_to_eul(oldeul, quat1); } else if (pchan->rotmode == ROT_MODE_AXISANGLE) { - axis_angle_to_eulO( oldeul, EULER_ORDER_DEFAULT, pchan->rotAxis, pchan->rotAngle); + axis_angle_to_eulO(oldeul, EULER_ORDER_DEFAULT, pchan->rotAxis, pchan->rotAngle); } else { copy_v3_v3(oldeul, pchan->eul); @@ -4855,7 +4855,7 @@ static void pchan_clear_rot(bPoseChannel *pchan) } } else if (pchan->rotmode == ROT_MODE_AXISANGLE) { - eulO_to_axis_angle( pchan->rotAxis, &pchan->rotAngle, eul, EULER_ORDER_DEFAULT); + eulO_to_axis_angle(pchan->rotAxis, &pchan->rotAngle, eul, EULER_ORDER_DEFAULT); } else { copy_v3_v3(pchan->eul, eul); @@ -5446,7 +5446,7 @@ static int armature_flip_names_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void ARMATURE_OT_flip_names (wmOperatorType *ot) +void ARMATURE_OT_flip_names(wmOperatorType *ot) { /* identifiers */ ot->name = "Flip Names"; @@ -5491,7 +5491,7 @@ static int armature_autoside_names_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ARMATURE_OT_autoside_names (wmOperatorType *ot) +void ARMATURE_OT_autoside_names(wmOperatorType *ot) { static EnumPropertyItem axis_items[]= { {0, "XAXIS", 0, "X-Axis", "Left/Right"}, @@ -5679,7 +5679,7 @@ float arcLengthRatio(ReebArc *arc) if (arc->bcount > 0) { /* Add the embedding */ - for ( i = 1; i < arc->bcount; i++) { + for (i = 1; i < arc->bcount; i++) { embedLength += len_v3v3(arc->buckets[i - 1].p, arc->buckets[i].p); } /* Add head and tail -> embedding vectors */ diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index 4c7ab833e69..09b0226c58c 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -1569,12 +1569,12 @@ static int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, S mval[1] = vi[1]; ED_view3d_win_to_segment_clip(ar, v3d, mval, ray_start, ray_end); - isect_line_line_v3( stk->points[s_i].p, - stk->points[s_i + 1].p, - ray_start, - ray_end, - isect->p, - vi); + isect_line_line_v3(stk->points[s_i].p, + stk->points[s_i + 1].p, + ray_start, + ray_end, + isect->p, + vi); BLI_addtail(list, isect); diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index a5db3dc118f..3828c025bcd 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -1281,7 +1281,7 @@ static MDefBoundIsect *meshdeform_ray_tree_intersect(MeshDeformBind *mdb, float copy_v3_v3(vert[1], cagecos[mface->v2]); copy_v3_v3(vert[2], cagecos[mface->v3]); if (mface->v4) copy_v3_v3(vert[3], cagecos[mface->v4]); - interp_weights_poly_v3( isect->uvw, vert, isect->nvert, isect->co); + interp_weights_poly_v3(isect->uvw, vert, isect->nvert, isect->co); return isect; } diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c index be520d1e8a0..79f00ff410b 100644 --- a/source/blender/editors/armature/poseSlide.c +++ b/source/blender/editors/armature/poseSlide.c @@ -759,7 +759,7 @@ static int pose_slide_push_exec (bContext *C, wmOperator *op) return pose_slide_exec_common(C, op, pso); } -void POSE_OT_push (wmOperatorType *ot) +void POSE_OT_push(wmOperatorType *ot) { /* identifiers */ ot->name = "Push Pose"; @@ -816,7 +816,7 @@ static int pose_slide_relax_exec (bContext *C, wmOperator *op) return pose_slide_exec_common(C, op, pso); } -void POSE_OT_relax (wmOperatorType *ot) +void POSE_OT_relax(wmOperatorType *ot) { /* identifiers */ ot->name = "Relax Pose"; @@ -873,7 +873,7 @@ static int pose_slide_breakdown_exec (bContext *C, wmOperator *op) return pose_slide_exec_common(C, op, pso); } -void POSE_OT_breakdown (wmOperatorType *ot) +void POSE_OT_breakdown(wmOperatorType *ot) { /* identifiers */ ot->name = "Pose Breakdowner"; @@ -1228,7 +1228,7 @@ static int pose_propagate_exec (bContext *C, wmOperator *op) /* --------------------------------- */ -void POSE_OT_propagate (wmOperatorType *ot) +void POSE_OT_propagate(wmOperatorType *ot) { static EnumPropertyItem terminate_items[]= { {POSE_PROPAGATE_SMART_HOLDS, "WHILE_HELD", 0, "While Held", "Propagate pose to all keyframes after current frame that don't change (Default behavior)"}, diff --git a/source/blender/editors/armature/poseUtils.c b/source/blender/editors/armature/poseUtils.c index 88d219137f7..c32655fb680 100644 --- a/source/blender/editors/armature/poseUtils.c +++ b/source/blender/editors/armature/poseUtils.c @@ -126,7 +126,7 @@ static void fcurves_to_pchan_links_get (ListBase *pfLinks, Object *ob, bAction * /* get sets of F-Curves providing transforms for the bones in the Pose */ -void poseAnim_mapping_get (bContext *C, ListBase *pfLinks, Object *ob, bAction *act) +void poseAnim_mapping_get(bContext *C, ListBase *pfLinks, Object *ob, bAction *act) { /* for each Pose-Channel which gets affected, get the F-Curves for that channel * and set the relevant transform flags... @@ -148,7 +148,7 @@ void poseAnim_mapping_get (bContext *C, ListBase *pfLinks, Object *ob, bAction * } /* free F-Curve <-> PoseChannel links */ -void poseAnim_mapping_free (ListBase *pfLinks) +void poseAnim_mapping_free(ListBase *pfLinks) { tPChanFCurveLink *pfl, *pfln=NULL; @@ -176,7 +176,7 @@ void poseAnim_mapping_free (ListBase *pfLinks) /* ------------------------- */ /* helper for apply() / reset() - refresh the data */ -void poseAnim_mapping_refresh (bContext *C, Scene *scene, Object *ob) +void poseAnim_mapping_refresh(bContext *C, Scene *scene, Object *ob) { bArmature *arm= (bArmature *)ob->data; @@ -194,7 +194,7 @@ void poseAnim_mapping_refresh (bContext *C, Scene *scene, Object *ob) } /* reset changes made to current pose */ -void poseAnim_mapping_reset (ListBase *pfLinks) +void poseAnim_mapping_reset(ListBase *pfLinks) { tPChanFCurveLink *pfl; @@ -217,7 +217,7 @@ void poseAnim_mapping_reset (ListBase *pfLinks) } /* perform autokeyframing after changes were made + confirmed */ -void poseAnim_mapping_autoKeyframe (bContext *C, Scene *scene, Object *ob, ListBase *pfLinks, float cframe) +void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, Object *ob, ListBase *pfLinks, float cframe) { /* insert keyframes as necessary if autokeyframing */ if (autokeyframe_cfra_can_key(scene, &ob->id)) { diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index ea2b28380e0..8791a345489 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -232,7 +232,7 @@ static int poselib_new_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void POSELIB_OT_new (wmOperatorType *ot) +void POSELIB_OT_new(wmOperatorType *ot) { /* identifiers */ ot->name = "New Pose Library"; @@ -267,7 +267,7 @@ static int poselib_unlink_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void POSELIB_OT_unlink (wmOperatorType *ot) +void POSELIB_OT_unlink(wmOperatorType *ot) { /* identifiers */ ot->name = "Unlink Pose Library"; @@ -353,7 +353,7 @@ static int poselib_sanitise_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void POSELIB_OT_action_sanitise (wmOperatorType *ot) +void POSELIB_OT_action_sanitise(wmOperatorType *ot) { /* identifiers */ ot->name = "Sanitise Pose Library Action"; @@ -483,7 +483,7 @@ static int poselib_add_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void POSELIB_OT_pose_add (wmOperatorType *ot) +void POSELIB_OT_pose_add(wmOperatorType *ot) { /* identifiers */ ot->name = "PoseLib Add Pose"; @@ -597,7 +597,7 @@ static int poselib_remove_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void POSELIB_OT_pose_remove (wmOperatorType *ot) +void POSELIB_OT_pose_remove(wmOperatorType *ot) { PropertyRNA *prop; @@ -684,7 +684,7 @@ static int poselib_rename_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void POSELIB_OT_pose_rename (wmOperatorType *ot) +void POSELIB_OT_pose_rename(wmOperatorType *ot) { PropertyRNA *prop; static EnumPropertyItem prop_poses_dummy_types[] = { @@ -1622,7 +1622,7 @@ static int poselib_preview_exec (bContext *C, wmOperator *op) return poselib_preview_exit(C, op); } -void POSELIB_OT_browse_interactive (wmOperatorType *ot) +void POSELIB_OT_browse_interactive(wmOperatorType *ot) { /* identifiers */ ot->name = "PoseLib Browse Poses"; @@ -1648,7 +1648,7 @@ void POSELIB_OT_browse_interactive (wmOperatorType *ot) /* RNA_def_float_factor(ot->srna, "blend_factor", 1.0f, 0.0f, 1.0f, "Blend Factor", "Amount that the pose is applied on top of the existing poses", 0.0f, 1.0f); */ } -void POSELIB_OT_apply_pose (wmOperatorType *ot) +void POSELIB_OT_apply_pose(wmOperatorType *ot) { /* identifiers */ ot->name = "Apply Pose Library Pose"; diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 87cf25e99be..817a2da8325 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -232,7 +232,7 @@ static int pose_calculate_paths_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void POSE_OT_paths_calculate (wmOperatorType *ot) +void POSE_OT_paths_calculate(wmOperatorType *ot) { /* identifiers */ ot->name = "Calculate Bone Paths"; @@ -300,7 +300,7 @@ static int pose_clear_paths_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void POSE_OT_paths_clear (wmOperatorType *ot) +void POSE_OT_paths_clear(wmOperatorType *ot) { /* identifiers */ ot->name = "Clear Bone Paths"; @@ -665,7 +665,7 @@ static int pose_select_grouped_exec (bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -void POSE_OT_select_grouped (wmOperatorType *ot) +void POSE_OT_select_grouped(wmOperatorType *ot) { static EnumPropertyItem prop_select_grouped_types[] = { {0, "LAYER", 0, "Layer", "Shared layers"}, @@ -1140,7 +1140,7 @@ static int pose_copy_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void POSE_OT_copy (wmOperatorType *ot) +void POSE_OT_copy(wmOperatorType *ot) { /* identifiers */ ot->name = "Copy Pose"; @@ -1207,7 +1207,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void POSE_OT_paste (wmOperatorType *ot) +void POSE_OT_paste(wmOperatorType *ot) { PropertyRNA *prop; @@ -1257,7 +1257,7 @@ static int pose_group_add_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void POSE_OT_group_add (wmOperatorType *ot) +void POSE_OT_group_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add Bone Group"; @@ -1297,7 +1297,7 @@ static int pose_group_remove_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void POSE_OT_group_remove (wmOperatorType *ot) +void POSE_OT_group_remove(wmOperatorType *ot) { /* identifiers */ ot->name = "Remove Bone Group"; @@ -1411,7 +1411,7 @@ static int pose_group_assign_exec (bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -void POSE_OT_group_assign (wmOperatorType *ot) +void POSE_OT_group_assign(wmOperatorType *ot) { /* identifiers */ ot->name = "Add Selected to Bone Group"; @@ -1466,7 +1466,7 @@ static int pose_group_unassign_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_CANCELLED; } -void POSE_OT_group_unassign (wmOperatorType *ot) +void POSE_OT_group_unassign(wmOperatorType *ot) { /* identifiers */ ot->name = "Remove Selected from Bone Groups"; @@ -1688,7 +1688,7 @@ static int pose_group_select_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void POSE_OT_group_select (wmOperatorType *ot) +void POSE_OT_group_select(wmOperatorType *ot) { /* identifiers */ ot->name = "Select Bones of Bone Group"; @@ -1726,7 +1726,7 @@ static int pose_group_deselect_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void POSE_OT_group_deselect (wmOperatorType *ot) +void POSE_OT_group_deselect(wmOperatorType *ot) { /* identifiers */ ot->name = "Deselect Bone Group"; @@ -1770,7 +1770,7 @@ static int pose_flip_names_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void POSE_OT_flip_names (wmOperatorType *ot) +void POSE_OT_flip_names(wmOperatorType *ot) { /* identifiers */ ot->name = "Flip Names"; @@ -1816,7 +1816,7 @@ static int pose_autoside_names_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void POSE_OT_autoside_names (wmOperatorType *ot) +void POSE_OT_autoside_names(wmOperatorType *ot) { static EnumPropertyItem axis_items[]= { {0, "XAXIS", 0, "X-Axis", "Left/Right"}, @@ -1861,7 +1861,7 @@ static int pose_bone_rotmode_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void POSE_OT_rotation_mode_set (wmOperatorType *ot) +void POSE_OT_rotation_mode_set(wmOperatorType *ot) { /* identifiers */ ot->name = "Set Rotation Mode"; @@ -1920,7 +1920,7 @@ static int pose_armature_layers_showall_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ARMATURE_OT_layers_show_all (wmOperatorType *ot) +void ARMATURE_OT_layers_show_all(wmOperatorType *ot) { /* identifiers */ ot->name = "Show All Layers"; @@ -1986,7 +1986,7 @@ static int pose_armature_layers_exec (bContext *C, wmOperator *op) } -void POSE_OT_armature_layers (wmOperatorType *ot) +void POSE_OT_armature_layers(wmOperatorType *ot) { /* identifiers */ ot->name = "Change Armature Layers"; @@ -2005,7 +2005,7 @@ void POSE_OT_armature_layers (wmOperatorType *ot) RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers to make visible"); } -void ARMATURE_OT_armature_layers (wmOperatorType *ot) +void ARMATURE_OT_armature_layers(wmOperatorType *ot) { /* identifiers */ ot->name = "Change Armature Layers"; @@ -2078,7 +2078,7 @@ static int pose_bone_layers_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void POSE_OT_bone_layers (wmOperatorType *ot) +void POSE_OT_bone_layers(wmOperatorType *ot) { /* identifiers */ ot->name = "Change Bone Layers"; @@ -2148,7 +2148,7 @@ static int armature_bone_layers_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ARMATURE_OT_bone_layers (wmOperatorType *ot) +void ARMATURE_OT_bone_layers(wmOperatorType *ot) { /* identifiers */ ot->name = "Change Bone Layers"; @@ -2195,7 +2195,7 @@ static int pose_flip_quats_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void POSE_OT_quaternions_flip (wmOperatorType *ot) +void POSE_OT_quaternions_flip(wmOperatorType *ot) { /* identifiers */ ot->name = "Flip Quats"; @@ -2271,7 +2271,7 @@ static int pose_clear_user_transforms_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void POSE_OT_user_transforms_clear (wmOperatorType *ot) +void POSE_OT_user_transforms_clear(wmOperatorType *ot) { /* identifiers */ ot->name = "Clear User Transforms"; diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 37bbedbc9dd..6a3bf880e89 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1974,7 +1974,7 @@ static void adduplicateflagNurb(Object *obedit, short flag) } if (BKE_nurb_check_valid_u(newnu)) { if (nu->pntsu==newnu->pntsu && nu->knotsu) { - newnu->knotsu= MEM_dupallocN( nu->knotsu ); + newnu->knotsu= MEM_dupallocN(nu->knotsu); } else { BKE_nurb_knot_calc_u(newnu); @@ -1982,7 +1982,7 @@ static void adduplicateflagNurb(Object *obedit, short flag) } if (BKE_nurb_check_valid_v(newnu)) { if (nu->pntsv==newnu->pntsv && nu->knotsv) { - newnu->knotsv= MEM_dupallocN( nu->knotsv ); + newnu->knotsv= MEM_dupallocN(nu->knotsv); } else { BKE_nurb_knot_calc_v(newnu); @@ -2157,7 +2157,7 @@ static int smooth_exec(bContext *C, wmOperator *UNUSED(op)) for (nu= editnurb->first; nu; nu= nu->next) { if (nu->bezt) { change = 0; - beztOrig = MEM_dupallocN( nu->bezt ); + beztOrig = MEM_dupallocN(nu->bezt); for (bezt=nu->bezt+1, a=1; apntsu-1; a++, bezt++) { if (bezt->f2 & SELECT) { for (i=0; i<3; i++) { @@ -2177,7 +2177,7 @@ static int smooth_exec(bContext *C, wmOperator *UNUSED(op)) BKE_nurb_handles_calc(nu); } else if (nu->bp) { - bpOrig = MEM_dupallocN( nu->bp ); + bpOrig = MEM_dupallocN(nu->bp); /* Same as above, keep these the same! */ for (bp=nu->bp+1, a=1; apntsu-1; a++, bp++) { if (bp->f1 & SELECT) { @@ -3039,7 +3039,7 @@ static void subdividenurb(Object *obedit, int number_cuts) /* total count of nodes after subdivision */ int tot= ((number_cuts+1)*nu->pntsu-number_cuts)*((number_cuts+1)*nu->pntsv-number_cuts); - bpn=bpnew= MEM_mallocN( tot*sizeof(BPoint), "subdivideNurb4"); + bpn=bpnew= MEM_mallocN(tot*sizeof(BPoint), "subdivideNurb4"); bp= nu->bp; /* first subdivide rows */ for (a=0; apntsv; a++) { @@ -3097,7 +3097,7 @@ static void subdividenurb(Object *obedit, int number_cuts) } if (sel) { /* V ! */ - bpn=bpnew= MEM_mallocN( (sel+nu->pntsv)*nu->pntsu*sizeof(BPoint), "subdivideNurb4"); + bpn=bpnew= MEM_mallocN((sel+nu->pntsv)*nu->pntsu*sizeof(BPoint), "subdivideNurb4"); bp= nu->bp; for (a=0; apntsv; a++) { for (b=0; bpntsu; b++) { @@ -3144,7 +3144,7 @@ static void subdividenurb(Object *obedit, int number_cuts) if (sel) { /* U ! */ /* Inserting U points is sort of 'default' Flat curves only get */ /* U points inserted in them. */ - bpn=bpnew= MEM_mallocN( (sel+nu->pntsu)*nu->pntsv*sizeof(BPoint), "subdivideNurb4"); + bpn=bpnew= MEM_mallocN((sel+nu->pntsu)*nu->pntsv*sizeof(BPoint), "subdivideNurb4"); bp= nu->bp; for (a=0; apntsv; a++) { for (b=0; bpntsu; b++) { @@ -3719,7 +3719,7 @@ static void make_selection_list_nurb(ListBase *editnurb) /* just add the first one */ nus= nbase.first; BLI_remlink(&nbase, nus); - BLI_addtail( &nsortbase, nus); + BLI_addtail(&nsortbase, nus); /* now add, either at head or tail, the closest one */ while (nbase.first) { @@ -5398,7 +5398,7 @@ static void selectrandom_curve(ListBase *editnurb, float randfac) BPoint *bp; int a; - BLI_srand( BLI_rand() ); /* random seed */ + BLI_srand(BLI_rand()); /* random seed */ for (nu= editnurb->first; nu; nu= nu->next) { if (nu->type == CU_BEZIER) { diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 7726e707f08..12a54658f90 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -669,7 +669,7 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy // ............................ /* draw grease-pencil sketches to specified 2d-view that uses ibuf corrections */ -void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf) +void draw_gpencil_2dimage(bContext *C, ImBuf *ibuf) { ScrArea *sa= CTX_wm_area(C); ARegion *ar= CTX_wm_region(C); @@ -745,7 +745,7 @@ void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf) /* draw grease-pencil sketches to specified 2d-view assuming that matrices are already set correctly * Note: this gets called twice - first time with onlyv2d=1 to draw 'canvas' strokes, second time with onlyv2d=0 for screen-aligned strokes */ -void draw_gpencil_view2d (bContext *C, short onlyv2d) +void draw_gpencil_view2d(bContext *C, short onlyv2d) { ScrArea *sa= CTX_wm_area(C); ARegion *ar= CTX_wm_region(C); @@ -772,7 +772,7 @@ void draw_gpencil_view2d (bContext *C, short onlyv2d) * Note: this gets called twice - first time with only3d=1 to draw 3d-strokes, second time with only3d=0 for screen-aligned strokes */ -void draw_gpencil_view3d (Scene *scene, View3D *v3d, ARegion *ar, short only3d) +void draw_gpencil_view3d(Scene *scene, View3D *v3d, ARegion *ar, short only3d) { bGPdata *gpd; int dflag = 0; diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index 3b0847c2e0f..b79516ed25e 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -62,7 +62,7 @@ /* Generics - Loopers */ /* Loops over the gp-frames for a gp-layer, and applies the given callback */ -short gplayer_frames_looper (bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDframe *, Scene *)) +short gplayer_frames_looper(bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDframe *, Scene *)) { bGPDframe *gpf; @@ -85,7 +85,7 @@ short gplayer_frames_looper (bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDf /* Data Conversion Tools */ /* make a listing all the gp-frames in a layer as cfraelems */ -void gplayer_make_cfra_list (bGPDlayer *gpl, ListBase *elems, short onlysel) +void gplayer_make_cfra_list(bGPDlayer *gpl, ListBase *elems, short onlysel) { bGPDframe *gpf; CfraElem *ce; @@ -111,7 +111,7 @@ void gplayer_make_cfra_list (bGPDlayer *gpl, ListBase *elems, short onlysel) /* Selection Tools */ /* check if one of the frames in this layer is selected */ -short is_gplayer_frame_selected (bGPDlayer *gpl) +short is_gplayer_frame_selected(bGPDlayer *gpl) { bGPDframe *gpf; @@ -149,7 +149,7 @@ static void gpframe_select (bGPDframe *gpf, short select_mode) } /* set all/none/invert select (like above, but with SELECT_* modes) */ -void select_gpencil_frames (bGPDlayer *gpl, short select_mode) +void select_gpencil_frames(bGPDlayer *gpl, short select_mode) { bGPDframe *gpf; @@ -164,7 +164,7 @@ void select_gpencil_frames (bGPDlayer *gpl, short select_mode) } /* set all/none/invert select */ -void set_gplayer_frame_selection (bGPDlayer *gpl, short mode) +void set_gplayer_frame_selection(bGPDlayer *gpl, short mode) { /* error checking */ if (gpl == NULL) @@ -175,7 +175,7 @@ void set_gplayer_frame_selection (bGPDlayer *gpl, short mode) } /* select the frame in this layer that occurs on this frame (there should only be one at most) */ -void select_gpencil_frame (bGPDlayer *gpl, int selx, short select_mode) +void select_gpencil_frame(bGPDlayer *gpl, int selx, short select_mode) { bGPDframe *gpf; @@ -193,7 +193,7 @@ void select_gpencil_frame (bGPDlayer *gpl, int selx, short select_mode) } /* select the frames in this layer that occur within the bounds specified */ -void borderselect_gplayer_frames (bGPDlayer *gpl, float min, float max, short select_mode) +void borderselect_gplayer_frames(bGPDlayer *gpl, float min, float max, short select_mode) { bGPDframe *gpf; @@ -211,7 +211,7 @@ void borderselect_gplayer_frames (bGPDlayer *gpl, float min, float max, short se /* Frame Editing Tools */ /* Delete selected frames */ -void delete_gplayer_frames (bGPDlayer *gpl) +void delete_gplayer_frames(bGPDlayer *gpl) { bGPDframe *gpf, *gpfn; @@ -229,7 +229,7 @@ void delete_gplayer_frames (bGPDlayer *gpl) } /* Duplicate selected frames from given gp-layer */ -void duplicate_gplayer_frames (bGPDlayer *gpl) +void duplicate_gplayer_frames(bGPDlayer *gpl) { bGPDframe *gpf, *gpfn; @@ -270,7 +270,7 @@ ListBase gpcopybuf = {NULL, NULL}; static int gpcopy_firstframe= 999999999; /* This function frees any MEM_calloc'ed copy/paste buffer data */ -void free_gpcopybuf () +void free_gpcopybuf() { free_gpencil_layers(&gpcopybuf); @@ -281,7 +281,7 @@ void free_gpcopybuf () /* This function adds data to the copy/paste buffer, freeing existing data first * Only the selected GP-layers get their selected keyframes copied. */ -void copy_gpdata () +void copy_gpdata() { ListBase act_data = {NULL, NULL}; bActListElem *ale; @@ -338,7 +338,7 @@ void copy_gpdata () BLI_freelistN(&act_data); } -void paste_gpdata (Scene *scene) +void paste_gpdata(Scene *scene) { ListBase act_data = {NULL, NULL}; bActListElem *ale; @@ -498,7 +498,7 @@ static short snap_gpf_nearmarker (bGPDframe *gpf, Scene *scene) /* snap selected frames to ... */ -void snap_gplayer_frames (bGPDlayer *gpl, Scene *scene, short mode) +void snap_gplayer_frames(bGPDlayer *gpl, Scene *scene, short mode) { switch (mode) { case 1: /* snap to nearest frame */ @@ -600,7 +600,7 @@ static short mirror_gpf_marker (bGPDframe *gpf, Scene *scene) /* mirror selected gp-frames on... */ -void mirror_gplayer_frames (bGPDlayer *gpl, Scene *scene, short mode) +void mirror_gplayer_frames(bGPDlayer *gpl, Scene *scene, short mode) { switch (mode) { case 1: /* mirror over current frame */ diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 5f31a273d1a..34a95cd89bf 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -210,7 +210,7 @@ static int gp_data_add_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GPENCIL_OT_data_add (wmOperatorType *ot) +void GPENCIL_OT_data_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Grease Pencil Add New"; @@ -258,7 +258,7 @@ static int gp_data_unlink_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GPENCIL_OT_data_unlink (wmOperatorType *ot) +void GPENCIL_OT_data_unlink(wmOperatorType *ot) { /* identifiers */ ot->name = "Grease Pencil Unlink"; @@ -295,7 +295,7 @@ static int gp_layer_add_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GPENCIL_OT_layer_add (wmOperatorType *ot) +void GPENCIL_OT_layer_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add New Layer"; @@ -346,7 +346,7 @@ static int gp_actframe_delete_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GPENCIL_OT_active_frame_delete (wmOperatorType *ot) +void GPENCIL_OT_active_frame_delete(wmOperatorType *ot) { /* identifiers */ ot->name = "Delete Active Frame"; @@ -629,7 +629,7 @@ static int gp_convert_layer_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GPENCIL_OT_convert (wmOperatorType *ot) +void GPENCIL_OT_convert(wmOperatorType *ot) { /* identifiers */ ot->name = "Convert Grease Pencil"; diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c index 0afe791029f..baa6999f552 100644 --- a/source/blender/editors/gpencil/gpencil_ops.c +++ b/source/blender/editors/gpencil/gpencil_ops.c @@ -70,7 +70,7 @@ void ED_keymap_gpencil(wmKeyConfig *keyconf) /* ****************************************** */ -void ED_operatortypes_gpencil (void) +void ED_operatortypes_gpencil(void) { /* Drawing ----------------------- */ diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 303ca89b168..262d75a37b3 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1915,7 +1915,7 @@ static EnumPropertyItem prop_gpencil_drawmodes[] = { {0, NULL, 0, NULL, NULL} }; -void GPENCIL_OT_draw (wmOperatorType *ot) +void GPENCIL_OT_draw(wmOperatorType *ot) { /* identifiers */ ot->name = "Grease Pencil Draw"; diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 226d9a3d493..302d5cc8a77 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -694,7 +694,7 @@ int uiButActiveOnly(const bContext *C, uiBlock *block, uiBut *but) } } if (activate || found == 0) { - ui_button_activate_do( (bContext *)C, CTX_wm_region(C), but); + ui_button_activate_do((bContext *)C, CTX_wm_region(C), but); } else if (found && isactive == 0) { diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index d8e9dea598c..1ebeea13782 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -642,9 +642,9 @@ static int mesh_octree_get_base_offs(const float co[3], const float offs[3], con { int vx, vy, vz; - vx = floor( (co[0] - offs[0]) / div[0]); - vy = floor( (co[1] - offs[1]) / div[1]); - vz = floor( (co[2] - offs[2]) / div[2]); + vx = floor((co[0] - offs[0]) / div[0]); + vy = floor((co[1] - offs[1]) / div[1]); + vz = floor((co[2] - offs[2]) / div[2]); CLAMP(vx, 0, MOC_RES - 1); CLAMP(vy, 0, MOC_RES - 1); diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index 1407d38ed0f..fd842ce4f7c 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -195,7 +195,7 @@ static int select_random_metaelems_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; ml= mb->editelems->first; - BLI_srand( BLI_rand() ); /* Random seed */ + BLI_srand(BLI_rand()); /* Random seed */ /* Stupid version of random selection. Should be improved. */ while (ml) { diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index fcce65c9326..9635b1b9b62 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1826,7 +1826,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base for (a = 0; a < obn->totcol; a++) { id = (ID *)(*matarar)[a]; if (id) { - ID_NEW_US( (*matarar)[a]) + ID_NEW_US((*matarar)[a]) else (*matarar)[a] = copy_material((*matarar)[a]); id->us--; diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 3764866cb7f..13e407040c3 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -682,10 +682,10 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys) copy_v3_v3(v[2], CDDM_get_vert(dm, mface->v3)->co); if (mface->v4) { copy_v3_v3(v[3], CDDM_get_vert(dm, mface->v4)->co); - interp_weights_poly_v3( pa->fuv, v, 4, nearest.co); + interp_weights_poly_v3(pa->fuv, v, 4, nearest.co); } else - interp_weights_poly_v3( pa->fuv, v, 3, nearest.co); + interp_weights_poly_v3(pa->fuv, v, 3, nearest.co); pa->num = nearest.index; pa->num_dmcache = psys_particle_dm_face_lookup(ob, psmd->dm, pa->num, pa->fuv, NULL); diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 9b637824b3e..ba26d9e3c60 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -203,10 +203,10 @@ static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char int channelSize = paramsize; if (entries==3) { - elbeemSimplifyChannelVec3( channel, &channelSize); + elbeemSimplifyChannelVec3(channel, &channelSize); } else if (entries==1) { - elbeemSimplifyChannelFloat( channel, &channelSize); + elbeemSimplifyChannelFloat(channel, &channelSize); } else { // invalid, cant happen? @@ -243,7 +243,7 @@ static void init_time(FluidsimSettings *domainSettings, FluidAnimChannels *chann { int i; - channels->timeAtFrame = MEM_callocN( (channels->length+1)*sizeof(float), "timeAtFrame channel"); + channels->timeAtFrame = MEM_callocN((channels->length+1)*sizeof(float), "timeAtFrame channel"); channels->timeAtFrame[0] = channels->timeAtFrame[1] = domainSettings->animStart; // start at index 1 @@ -361,9 +361,9 @@ static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), Fluid init_time(domainSettings, channels); /* allocate domain animation channels */ - channels->DomainGravity = MEM_callocN( length * (CHANNEL_VEC+1) * sizeof(float), "channel DomainGravity"); - channels->DomainViscosity = MEM_callocN( length * (CHANNEL_FLOAT+1) * sizeof(float), "channel DomainViscosity"); - channels->DomainTime = MEM_callocN( length * (CHANNEL_FLOAT+1) * sizeof(float), "channel DomainTime"); + channels->DomainGravity = MEM_callocN(length * (CHANNEL_VEC+1) * sizeof(float), "channel DomainGravity"); + channels->DomainViscosity = MEM_callocN(length * (CHANNEL_FLOAT+1) * sizeof(float), "channel DomainViscosity"); + channels->DomainTime = MEM_callocN(length * (CHANNEL_FLOAT+1) * sizeof(float), "channel DomainTime"); /* allocate fluid objects */ for (base=scene->base.first; base; base= base->next) { @@ -379,17 +379,17 @@ static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), Fluid continue; } - fobj->Translation = MEM_callocN( length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject Translation"); - fobj->Rotation = MEM_callocN( length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject Rotation"); - fobj->Scale = MEM_callocN( length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject Scale"); - fobj->Active = MEM_callocN( length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject Active"); - fobj->InitialVelocity = MEM_callocN( length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject InitialVelocity"); + fobj->Translation = MEM_callocN(length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject Translation"); + fobj->Rotation = MEM_callocN(length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject Rotation"); + fobj->Scale = MEM_callocN(length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject Scale"); + fobj->Active = MEM_callocN(length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject Active"); + fobj->InitialVelocity = MEM_callocN(length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject InitialVelocity"); if (fluidmd->fss->type == OB_FLUIDSIM_CONTROL) { - fobj->AttractforceStrength = MEM_callocN( length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject AttractforceStrength"); - fobj->AttractforceRadius = MEM_callocN( length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject AttractforceRadius"); - fobj->VelocityforceStrength = MEM_callocN( length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject VelocityforceStrength"); - fobj->VelocityforceRadius = MEM_callocN( length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject VelocityforceRadius"); + fobj->AttractforceStrength = MEM_callocN(length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject AttractforceStrength"); + fobj->AttractforceRadius = MEM_callocN(length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject AttractforceRadius"); + fobj->VelocityforceStrength = MEM_callocN(length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject VelocityforceStrength"); + fobj->VelocityforceRadius = MEM_callocN(length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject VelocityforceRadius"); } if (fluid_is_animated_mesh(fluidmd->fss)) { @@ -397,7 +397,7 @@ static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), Fluid int *tris=NULL, modifierIndex = modifiers_indexInObject(ob, (ModifierData *)fluidmd); initElbeemMesh(scene, ob, &fobj->numVerts, &verts, &fobj->numTris, &tris, 0, modifierIndex); - fobj->VertexCache = MEM_callocN( length *((fobj->numVerts*CHANNEL_VEC)+1) * sizeof(float), "fluidobject VertexCache"); + fobj->VertexCache = MEM_callocN(length *((fobj->numVerts*CHANNEL_VEC)+1) * sizeof(float), "fluidobject VertexCache"); MEM_freeN(verts); MEM_freeN(tris); @@ -507,7 +507,7 @@ static void export_fluid_objects(ListBase *fobjects, Scene *scene, int length) if (ELEM(fluidmd->fss->type, OB_FLUIDSIM_DOMAIN, OB_FLUIDSIM_PARTICLE)) continue; - elbeemResetMesh( &fsmesh ); + elbeemResetMesh(&fsmesh); fsmesh.type = fluidmd->fss->type; fsmesh.name = ob->id.name; diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 8a43e15eb9f..e673e467c72 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -80,8 +80,8 @@ static void region_draw_emboss(ARegion *ar, rcti *scirct) rect.ymax = scirct->ymax - ar->winrct.ymin; /* set transp line */ - glEnable( GL_BLEND ); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + glEnable(GL_BLEND ); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); /* right */ glColor4ub(0, 0, 0, 30); @@ -99,7 +99,7 @@ static void region_draw_emboss(ARegion *ar, rcti *scirct) glColor4ub(255, 255, 255, 30); sdrawline(rect.xmin, rect.ymin, rect.xmin, rect.ymax); - glDisable( GL_BLEND ); + glDisable(GL_BLEND); } void ED_region_pixelspace(ARegion *ar) @@ -213,12 +213,12 @@ static void region_draw_azone_icon(AZone *az) glColor4f(1.f, 1.f, 1.f, 0.8f); gluQuadricDrawStyle(qobj, GLU_FILL); - gluDisk( qobj, 0.0, 4.25f, 16, 1); + gluDisk(qobj, 0.0, 4.25f, 16, 1); glColor4f(0.2f, 0.2f, 0.2f, 0.9f); gluQuadricDrawStyle(qobj, GLU_SILHOUETTE); - gluDisk( qobj, 0.0, 4.25f, 16, 1); + gluDisk(qobj, 0.0, 4.25f, 16, 1); glDisable(GL_LINE_SMOOTH); @@ -357,8 +357,8 @@ void ED_area_overdraw(bContext *C) /* Draw AZones, in screenspace */ wmSubWindowSet(win, screen->mainwin); - glEnable( GL_BLEND ); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); for (sa= screen->areabase.first; sa; sa= sa->next) { AZone *az; @@ -388,7 +388,7 @@ void ED_area_overdraw(bContext *C) } } } - glDisable( GL_BLEND ); + glDisable(GL_BLEND); } diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index b8c310f8477..a44eca17dfd 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -121,7 +121,7 @@ static int act_new_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void ACTION_OT_new (wmOperatorType *ot) +void ACTION_OT_new(wmOperatorType *ot) { /* identifiers */ ot->name = "New Action"; @@ -204,7 +204,7 @@ static int act_markers_make_local_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void ACTION_OT_markers_make_local (wmOperatorType *ot) +void ACTION_OT_markers_make_local(wmOperatorType *ot) { /* identifiers */ ot->name = "Make Markers Local"; @@ -319,7 +319,7 @@ static int actkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void ACTION_OT_previewrange_set (wmOperatorType *ot) +void ACTION_OT_previewrange_set(wmOperatorType *ot) { /* identifiers */ ot->name = "Auto-Set Preview Range"; @@ -381,7 +381,7 @@ static int actkeys_viewsel_exec(bContext *C, wmOperator *UNUSED(op)) return actkeys_viewall(C, TRUE); } -void ACTION_OT_view_all (wmOperatorType *ot) +void ACTION_OT_view_all(wmOperatorType *ot) { /* identifiers */ ot->name = "View All"; @@ -396,7 +396,7 @@ void ACTION_OT_view_all (wmOperatorType *ot) ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } -void ACTION_OT_view_selected (wmOperatorType *ot) +void ACTION_OT_view_selected(wmOperatorType *ot) { /* identifiers */ ot->name = "View Selected"; @@ -484,7 +484,7 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ACTION_OT_copy (wmOperatorType *ot) +void ACTION_OT_copy(wmOperatorType *ot) { /* identifiers */ ot->name = "Copy Keyframes"; @@ -535,7 +535,7 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ACTION_OT_paste (wmOperatorType *ot) +void ACTION_OT_paste(wmOperatorType *ot) { /* identifiers */ ot->name = "Paste Keyframes"; @@ -636,7 +636,7 @@ static int actkeys_insertkey_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ACTION_OT_keyframe_insert (wmOperatorType *ot) +void ACTION_OT_keyframe_insert(wmOperatorType *ot) { /* identifiers */ ot->name = "Insert Keyframes"; @@ -712,7 +712,7 @@ static int actkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED return OPERATOR_FINISHED; } -void ACTION_OT_duplicate (wmOperatorType *ot) +void ACTION_OT_duplicate(wmOperatorType *ot) { /* identifiers */ ot->name = "Duplicate Keyframes"; @@ -787,7 +787,7 @@ static int actkeys_delete_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void ACTION_OT_delete (wmOperatorType *ot) +void ACTION_OT_delete(wmOperatorType *ot) { /* identifiers */ ot->name = "Delete Keyframes"; @@ -851,7 +851,7 @@ static int actkeys_clean_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ACTION_OT_clean (wmOperatorType *ot) +void ACTION_OT_clean(wmOperatorType *ot) { /* identifiers */ ot->name = "Clean Keyframes"; @@ -915,7 +915,7 @@ static int actkeys_sample_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void ACTION_OT_sample (wmOperatorType *ot) +void ACTION_OT_sample(wmOperatorType *ot) { /* identifiers */ ot->name = "Sample Keyframes"; @@ -1025,7 +1025,7 @@ static int actkeys_expo_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ACTION_OT_extrapolation_type (wmOperatorType *ot) +void ACTION_OT_extrapolation_type(wmOperatorType *ot) { /* identifiers */ ot->name = "Set Keyframe Extrapolation"; @@ -1096,7 +1096,7 @@ static int actkeys_ipo_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ACTION_OT_interpolation_type (wmOperatorType *ot) +void ACTION_OT_interpolation_type(wmOperatorType *ot) { /* identifiers */ ot->name = "Set Keyframe Interpolation"; @@ -1176,7 +1176,7 @@ static int actkeys_handletype_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ACTION_OT_handle_type (wmOperatorType *ot) +void ACTION_OT_handle_type(wmOperatorType *ot) { /* identifiers */ ot->name = "Set Keyframe Handle Type"; @@ -1247,7 +1247,7 @@ static int actkeys_keytype_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ACTION_OT_keyframe_type (wmOperatorType *ot) +void ACTION_OT_keyframe_type(wmOperatorType *ot) { /* identifiers */ ot->name = "Set Keyframe Type"; @@ -1315,7 +1315,7 @@ static int actkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void ACTION_OT_frame_jump (wmOperatorType *ot) +void ACTION_OT_frame_jump(wmOperatorType *ot) { /* identifiers */ ot->name = "Jump to Frame"; @@ -1415,7 +1415,7 @@ static int actkeys_snap_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ACTION_OT_snap (wmOperatorType *ot) +void ACTION_OT_snap(wmOperatorType *ot) { /* identifiers */ ot->name = "Snap Keys"; @@ -1529,7 +1529,7 @@ static int actkeys_mirror_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ACTION_OT_mirror (wmOperatorType *ot) +void ACTION_OT_mirror(wmOperatorType *ot) { /* identifiers */ ot->name = "Mirror Keys"; diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index f76f5f6523e..a28f8ee1b99 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -158,7 +158,7 @@ static int actkeys_deselectall_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ACTION_OT_select_all_toggle (wmOperatorType *ot) +void ACTION_OT_select_all_toggle(wmOperatorType *ot) { /* identifiers */ ot->name = "Select All"; @@ -524,7 +524,7 @@ static int actkeys_columnselect_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ACTION_OT_select_column (wmOperatorType *ot) +void ACTION_OT_select_column(wmOperatorType *ot) { /* identifiers */ ot->name = "Select All"; @@ -582,7 +582,7 @@ static int actkeys_select_linked_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void ACTION_OT_select_linked (wmOperatorType *ot) +void ACTION_OT_select_linked(wmOperatorType *ot) { /* identifiers */ ot->name = "Select Linked"; @@ -659,7 +659,7 @@ static int actkeys_select_more_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void ACTION_OT_select_more (wmOperatorType *ot) +void ACTION_OT_select_more(wmOperatorType *ot) { /* identifiers */ ot->name = "Select More"; @@ -693,7 +693,7 @@ static int actkeys_select_less_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void ACTION_OT_select_less (wmOperatorType *ot) +void ACTION_OT_select_less(wmOperatorType *ot) { /* identifiers */ ot->name = "Select Less"; @@ -860,7 +860,7 @@ static int actkeys_select_leftright_invoke (bContext *C, wmOperator *op, wmEvent return actkeys_select_leftright_exec(C, op); } -void ACTION_OT_select_leftright (wmOperatorType *ot) +void ACTION_OT_select_leftright(wmOperatorType *ot) { /* identifiers */ ot->name = "Select Left/Right"; @@ -1174,7 +1174,7 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH; } -void ACTION_OT_clickselect (wmOperatorType *ot) +void ACTION_OT_clickselect(wmOperatorType *ot) { /* identifiers */ ot->name = "Mouse Select Keys"; diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index c72d95f63a7..107acbf49b1 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -419,7 +419,7 @@ void filelist_free_icons(void) //-----------------FOLDERLIST (previous/next) --------------// struct ListBase* folderlist_new(void) { - ListBase* p = MEM_callocN( sizeof(ListBase), "folderlist" ); + ListBase* p = MEM_callocN(sizeof(ListBase), "folderlist" ); return p; } @@ -519,7 +519,7 @@ static void filelist_read_dir(struct FileList* filelist); //------------------FILELIST------------------------// struct FileList* filelist_new(short type) { - FileList* p = MEM_callocN( sizeof(FileList), "filelist" ); + FileList* p = MEM_callocN(sizeof(FileList), "filelist" ); switch (type) { case FILE_MAIN: p->readf = filelist_read_main; @@ -1144,7 +1144,7 @@ void filelist_from_main(struct FileList *filelist) filelist->filelist= (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry)); for (a=0; anumfiles; a++) { - memset( &(filelist->filelist[a]), 0, sizeof(struct direntry)); + memset(&(filelist->filelist[a]), 0, sizeof(struct direntry)); filelist->filelist[a].type |= S_IFDIR; } @@ -1198,7 +1198,7 @@ void filelist_from_main(struct FileList *filelist) files = filelist->filelist; if (!filelist->hide_parent) { - memset( &(filelist->filelist[0]), 0, sizeof(struct direntry)); + memset(&(filelist->filelist[0]), 0, sizeof(struct direntry)); filelist->filelist[0].relname= BLI_strdup(".."); filelist->filelist[0].type |= S_IFDIR; diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index d435b78b65c..e772e2856c1 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -532,7 +532,7 @@ static void draw_fcurve_curve (bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2 glBegin(GL_LINE_STRIP); for (ctime= stime; ctime <= etime; ctime += samplefreq) - glVertex2f( ctime, evaluate_fcurve(fcu, ctime)*unitFac ); + glVertex2f(ctime, evaluate_fcurve(fcu, ctime) * unitFac); glEnd(); @@ -777,7 +777,7 @@ static void draw_fcurve_curve_bezts (bAnimContext *ac, ID *id, FCurve *fcu, View /* Draw the 'ghost' F-Curves (i.e. snapshots of the curve) * NOTE: unit mapping has already been applied to the values, so do not try and apply again */ -void graph_draw_ghost_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) +void graph_draw_ghost_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) { FCurve *fcu; @@ -812,7 +812,7 @@ void graph_draw_ghost_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) /* This is called twice from space_graph.c -> graph_main_area_draw() * Unselected then selected F-Curves are drawn so that they do not occlude each other. */ -void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid *grid, short sel) +void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid *grid, short sel) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 76a2c926522..5f8281fda5b 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -83,7 +83,7 @@ /* Get the min/max keyframes*/ /* note: it should return total boundbox, filter for selection only can be argument... */ -void get_graph_keyframe_extents (bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax, const short selOnly) +void get_graph_keyframe_extents(bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax, const short selOnly) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; @@ -181,7 +181,7 @@ static int graphkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void GRAPH_OT_previewrange_set (wmOperatorType *ot) +void GRAPH_OT_previewrange_set(wmOperatorType *ot) { /* identifiers */ ot->name = "Auto-Set Preview Range"; @@ -243,7 +243,7 @@ static int graphkeys_view_selected_exec(bContext *C, wmOperator *UNUSED(op)) return graphkeys_viewall(C, TRUE); } -void GRAPH_OT_view_all (wmOperatorType *ot) +void GRAPH_OT_view_all(wmOperatorType *ot) { /* identifiers */ ot->name = "View All"; @@ -258,7 +258,7 @@ void GRAPH_OT_view_all (wmOperatorType *ot) ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } -void GRAPH_OT_view_selected (wmOperatorType *ot) +void GRAPH_OT_view_selected(wmOperatorType *ot) { /* identifiers */ ot->name = "View Selected"; @@ -373,7 +373,7 @@ static int graphkeys_create_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op) return OPERATOR_FINISHED; } -void GRAPH_OT_ghost_curves_create (wmOperatorType *ot) +void GRAPH_OT_ghost_curves_create(wmOperatorType *ot) { /* identifiers */ ot->name = "Create Ghost Curves"; @@ -416,7 +416,7 @@ static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void GRAPH_OT_ghost_curves_clear (wmOperatorType *ot) +void GRAPH_OT_ghost_curves_clear(wmOperatorType *ot) { /* identifiers */ ot->name = "Clear Ghost Curves"; @@ -511,7 +511,7 @@ static int graphkeys_insertkey_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GRAPH_OT_keyframe_insert (wmOperatorType *ot) +void GRAPH_OT_keyframe_insert(wmOperatorType *ot) { /* identifiers */ ot->name = "Insert Keyframes"; @@ -618,7 +618,7 @@ static int graphkeys_click_insert_invoke (bContext *C, wmOperator *op, wmEvent * return graphkeys_click_insert_exec(C, op); } -void GRAPH_OT_click_insert (wmOperatorType *ot) +void GRAPH_OT_click_insert(wmOperatorType *ot) { /* identifiers */ ot->name = "Click-Insert Keyframes"; @@ -701,7 +701,7 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GRAPH_OT_copy (wmOperatorType *ot) +void GRAPH_OT_copy(wmOperatorType *ot) { /* identifiers */ ot->name = "Copy Keyframes"; @@ -746,7 +746,7 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GRAPH_OT_paste (wmOperatorType *ot) +void GRAPH_OT_paste(wmOperatorType *ot) { /* identifiers */ ot->name = "Paste Keyframes"; @@ -815,7 +815,7 @@ static int graphkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUS return OPERATOR_FINISHED; } -void GRAPH_OT_duplicate (wmOperatorType *ot) +void GRAPH_OT_duplicate(wmOperatorType *ot) { /* identifiers */ ot->name = "Duplicate Keyframes"; @@ -885,7 +885,7 @@ static int graphkeys_delete_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void GRAPH_OT_delete (wmOperatorType *ot) +void GRAPH_OT_delete(wmOperatorType *ot) { /* identifiers */ ot->name = "Delete Keyframes"; @@ -947,7 +947,7 @@ static int graphkeys_clean_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GRAPH_OT_clean (wmOperatorType *ot) +void GRAPH_OT_clean(wmOperatorType *ot) { /* identifiers */ ot->name = "Clean Keyframes"; @@ -1030,7 +1030,7 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void GRAPH_OT_bake (wmOperatorType *ot) +void GRAPH_OT_bake(wmOperatorType *ot) { /* identifiers */ ot->name = "Bake Curve"; @@ -1174,7 +1174,7 @@ static int graphkeys_sound_bake_invoke (bContext *C, wmOperator *op, wmEvent *ev return WM_operator_filesel(C, op, event); } -void GRAPH_OT_sound_bake (wmOperatorType *ot) +void GRAPH_OT_sound_bake(wmOperatorType *ot) { /* identifiers */ ot->name = "Bake Sound to F-Curves"; @@ -1248,7 +1248,7 @@ static int graphkeys_sample_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void GRAPH_OT_sample (wmOperatorType *ot) +void GRAPH_OT_sample(wmOperatorType *ot) { /* identifiers */ ot->name = "Sample Keyframes"; @@ -1357,7 +1357,7 @@ static int graphkeys_expo_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GRAPH_OT_extrapolation_type (wmOperatorType *ot) +void GRAPH_OT_extrapolation_type(wmOperatorType *ot) { /* identifiers */ ot->name = "Set Keyframe Extrapolation"; @@ -1426,7 +1426,7 @@ static int graphkeys_ipo_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GRAPH_OT_interpolation_type (wmOperatorType *ot) +void GRAPH_OT_interpolation_type(wmOperatorType *ot) { /* identifiers */ ot->name = "Set Keyframe Interpolation"; @@ -1697,7 +1697,7 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op) } } -void GRAPH_OT_euler_filter (wmOperatorType *ot) +void GRAPH_OT_euler_filter(wmOperatorType *ot) { /* identifiers */ ot->name = "Euler Discontinuity Filter"; @@ -1771,7 +1771,7 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void GRAPH_OT_frame_jump (wmOperatorType *ot) +void GRAPH_OT_frame_jump(wmOperatorType *ot) { /* identifiers */ ot->name = "Jump to Frame"; @@ -1875,7 +1875,7 @@ static int graphkeys_snap_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GRAPH_OT_snap (wmOperatorType *ot) +void GRAPH_OT_snap(wmOperatorType *ot) { /* identifiers */ ot->name = "Snap Keys"; @@ -1993,7 +1993,7 @@ static int graphkeys_mirror_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GRAPH_OT_mirror (wmOperatorType *ot) +void GRAPH_OT_mirror(wmOperatorType *ot) { /* identifiers */ ot->name = "Mirror Keys"; @@ -2048,7 +2048,7 @@ static int graphkeys_smooth_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void GRAPH_OT_smooth (wmOperatorType *ot) +void GRAPH_OT_smooth(wmOperatorType *ot) { /* identifiers */ ot->name = "Smooth Keys"; @@ -2152,7 +2152,7 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GRAPH_OT_fmodifier_add (wmOperatorType *ot) +void GRAPH_OT_fmodifier_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add F-Curve Modifier"; @@ -2210,7 +2210,7 @@ static int graph_fmodifier_copy_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GRAPH_OT_fmodifier_copy (wmOperatorType *ot) +void GRAPH_OT_fmodifier_copy(wmOperatorType *ot) { /* identifiers */ ot->name = "Copy F-Modifiers"; @@ -2272,7 +2272,7 @@ static int graph_fmodifier_paste_exec(bContext *C, wmOperator *op) } } -void GRAPH_OT_fmodifier_paste (wmOperatorType *ot) +void GRAPH_OT_fmodifier_paste(wmOperatorType *ot) { /* identifiers */ ot->name = "Paste F-Modifiers"; diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 864708a873a..7c72fa0834d 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -166,7 +166,7 @@ static int graphkeys_deselectall_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GRAPH_OT_select_all_toggle (wmOperatorType *ot) +void GRAPH_OT_select_all_toggle(wmOperatorType *ot) { /* identifiers */ ot->name = "Select All"; @@ -535,7 +535,7 @@ static int graphkeys_columnselect_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GRAPH_OT_select_column (wmOperatorType *ot) +void GRAPH_OT_select_column(wmOperatorType *ot) { /* identifiers */ ot->name = "Select All"; @@ -593,7 +593,7 @@ static int graphkeys_select_linked_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void GRAPH_OT_select_linked (wmOperatorType *ot) +void GRAPH_OT_select_linked(wmOperatorType *ot) { /* identifiers */ ot->name = "Select Linked"; @@ -671,7 +671,7 @@ static int graphkeys_select_more_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void GRAPH_OT_select_more (wmOperatorType *ot) +void GRAPH_OT_select_more(wmOperatorType *ot) { /* identifiers */ ot->name = "Select More"; @@ -705,7 +705,7 @@ static int graphkeys_select_less_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void GRAPH_OT_select_less (wmOperatorType *ot) +void GRAPH_OT_select_less(wmOperatorType *ot) { /* identifiers */ ot->name = "Select Less"; @@ -846,7 +846,7 @@ static int graphkeys_select_leftright_invoke (bContext *C, wmOperator *op, wmEve return graphkeys_select_leftright_exec(C, op); } -void GRAPH_OT_select_leftright (wmOperatorType *ot) +void GRAPH_OT_select_leftright(wmOperatorType *ot) { /* identifiers */ ot->name = "Select Left/Right"; @@ -1331,7 +1331,7 @@ static int graphkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *ev return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH; } -void GRAPH_OT_clickselect (wmOperatorType *ot) +void GRAPH_OT_clickselect(wmOperatorType *ot) { /* identifiers */ ot->name = "Mouse Select Keys"; diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index 8c2afe8a242..46c886b7d3c 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -92,7 +92,7 @@ bAnimListElem *get_active_fcurve_channel (bAnimContext *ac) /* Operator Polling Callbacks */ /* Check if there are any visible keyframes (for selection tools) */ -int graphop_visible_keyframes_poll (bContext *C) +int graphop_visible_keyframes_poll(bContext *C) { bAnimContext ac; bAnimListElem *ale; @@ -141,7 +141,7 @@ int graphop_visible_keyframes_poll (bContext *C) } /* Check if there are any visible + editable keyframes (for editing tools) */ -int graphop_editable_keyframes_poll (bContext *C) +int graphop_editable_keyframes_poll(bContext *C) { bAnimContext ac; bAnimListElem *ale; @@ -191,7 +191,7 @@ int graphop_editable_keyframes_poll (bContext *C) } /* has active F-Curve that's editable */ -int graphop_active_fcurve_poll (bContext *C) +int graphop_active_fcurve_poll(bContext *C) { bAnimContext ac; bAnimListElem *ale; @@ -226,7 +226,7 @@ int graphop_active_fcurve_poll (bContext *C) } /* has selected F-Curve that's editable */ -int graphop_selected_fcurve_poll (bContext *C) +int graphop_selected_fcurve_poll(bContext *C) { bAnimContext ac; ListBase anim_data = {NULL, NULL}; diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index cd01b52ddcc..184357344e1 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -909,7 +909,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf if (*count==0) return NULL; if (*count>24) *count= 24; /* temporal */ - idar= MEM_callocN( (*count)*sizeof(void *), "idar"); + idar= MEM_callocN((*count)*sizeof(void *), "idar"); ob= bmain->object.first; nr= 0; @@ -2805,8 +2805,8 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo if (tdfa->type == ACT_2DFILTER_CUSTOMFILTER) { ysize +=20; } - glRects( xco, yco-ysize, xco+width, yco ); - uiEmboss( (float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1 ); + glRects(xco, yco-ysize, xco+width, yco); + uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); switch (tdfa->type) { case ACT_2DFILTER_MOTIONBLUR: diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index 38f9a83143e..c8f9c66d24b 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -341,7 +341,7 @@ static int nlachannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *e return OPERATOR_FINISHED; } -void NLA_OT_channels_click (wmOperatorType *ot) +void NLA_OT_channels_click(wmOperatorType *ot) { /* identifiers */ ot->name = "Mouse Click on NLA Channels"; @@ -415,7 +415,7 @@ static int nlaedit_add_tracks_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void NLA_OT_tracks_add (wmOperatorType *ot) +void NLA_OT_tracks_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add Track(s)"; @@ -479,7 +479,7 @@ static int nlaedit_delete_tracks_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void NLA_OT_delete_tracks (wmOperatorType *ot) +void NLA_OT_delete_tracks(wmOperatorType *ot) { /* identifiers */ ot->name = "Delete Tracks"; diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 7ed49025814..d331415bc46 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -534,7 +534,7 @@ static void nla_draw_strip_frames_text(NlaTrack *UNUSED(nlt), NlaStrip *strip, V /* ---------------------- */ -void draw_nla_main_data (bAnimContext *ac, SpaceNla *snla, ARegion *ar) +void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *ar) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; @@ -920,7 +920,7 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie } } -void draw_nla_channel_list (bContext *C, bAnimContext *ac, ARegion *ar) +void draw_nla_channel_list(bContext *C, bAnimContext *ac, ARegion *ar) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 1a94b1160be..994021db9ff 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -76,7 +76,7 @@ /* Utilities exported to other places... */ /* Perform validation for blending/extend settings */ -void ED_nla_postop_refresh (bAnimContext *ac) +void ED_nla_postop_refresh(bAnimContext *ac) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; @@ -155,7 +155,7 @@ static int nlaedit_enable_tweakmode_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void NLA_OT_tweakmode_enter (wmOperatorType *ot) +void NLA_OT_tweakmode_enter(wmOperatorType *ot) { /* identifiers */ ot->name = "Enter Tweak Mode"; @@ -220,7 +220,7 @@ static int nlaedit_disable_tweakmode_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void NLA_OT_tweakmode_exit (wmOperatorType *ot) +void NLA_OT_tweakmode_exit(wmOperatorType *ot) { /* identifiers */ ot->name = "Exit Tweak Mode"; @@ -335,7 +335,7 @@ static int nlaedit_viewsel_exec(bContext *C, wmOperator *UNUSED(op)) return nlaedit_viewall(C, TRUE); } -void NLA_OT_view_all (wmOperatorType *ot) +void NLA_OT_view_all(wmOperatorType *ot) { /* identifiers */ ot->name = "View All"; @@ -350,7 +350,7 @@ void NLA_OT_view_all (wmOperatorType *ot) ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } -void NLA_OT_view_selected (wmOperatorType *ot) +void NLA_OT_view_selected(wmOperatorType *ot) { /* identifiers */ ot->name = "View Selected"; @@ -468,7 +468,7 @@ static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void NLA_OT_actionclip_add (wmOperatorType *ot) +void NLA_OT_actionclip_add(wmOperatorType *ot) { PropertyRNA *prop; @@ -595,7 +595,7 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op) } } -void NLA_OT_transition_add (wmOperatorType *ot) +void NLA_OT_transition_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add Transition"; @@ -680,7 +680,7 @@ static int nlaedit_add_sound_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void NLA_OT_soundclip_add (wmOperatorType *ot) +void NLA_OT_soundclip_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add Sound Clip"; @@ -742,7 +742,7 @@ static int nlaedit_add_meta_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void NLA_OT_meta_add (wmOperatorType *ot) +void NLA_OT_meta_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add Meta-Strips"; @@ -794,7 +794,7 @@ static int nlaedit_remove_meta_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void NLA_OT_meta_remove (wmOperatorType *ot) +void NLA_OT_meta_remove(wmOperatorType *ot) { /* identifiers */ ot->name = "Remove Meta-Strips"; @@ -897,7 +897,7 @@ static int nlaedit_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED return OPERATOR_FINISHED; } -void NLA_OT_duplicate (wmOperatorType *ot) +void NLA_OT_duplicate(wmOperatorType *ot) { /* identifiers */ ot->name = "Duplicate Strips"; @@ -972,7 +972,7 @@ static int nlaedit_delete_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void NLA_OT_delete (wmOperatorType *ot) +void NLA_OT_delete(wmOperatorType *ot) { /* identifiers */ ot->name = "Delete Strips"; @@ -1117,7 +1117,7 @@ static int nlaedit_split_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void NLA_OT_split (wmOperatorType *ot) +void NLA_OT_split(wmOperatorType *ot) { /* identifiers */ ot->name = "Split Strips"; @@ -1170,7 +1170,7 @@ static int nlaedit_bake_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void NLA_OT_bake (wmOperatorType *ot) +void NLA_OT_bake(wmOperatorType *ot) { /* identifiers */ ot->name = "Bake Strips"; @@ -1232,7 +1232,7 @@ static int nlaedit_toggle_mute_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void NLA_OT_mute_toggle (wmOperatorType *ot) +void NLA_OT_mute_toggle(wmOperatorType *ot) { /* identifiers */ ot->name = "Toggle Muting"; @@ -1389,7 +1389,7 @@ static int nlaedit_swap_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void NLA_OT_swap (wmOperatorType *ot) +void NLA_OT_swap(wmOperatorType *ot) { /* identifiers */ ot->name = "Swap Strips"; @@ -1463,7 +1463,7 @@ static int nlaedit_move_up_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void NLA_OT_move_up (wmOperatorType *ot) +void NLA_OT_move_up(wmOperatorType *ot) { /* identifiers */ ot->name = "Move Strips Up"; @@ -1537,7 +1537,7 @@ static int nlaedit_move_down_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void NLA_OT_move_down (wmOperatorType *ot) +void NLA_OT_move_down(wmOperatorType *ot) { /* identifiers */ ot->name = "Move Strips Down"; @@ -1613,7 +1613,7 @@ static int nlaedit_sync_actlen_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void NLA_OT_action_sync_length (wmOperatorType *ot) +void NLA_OT_action_sync_length(wmOperatorType *ot) { /* identifiers */ ot->name = "Sync Action Length"; @@ -1713,7 +1713,7 @@ static int nlaedit_apply_scale_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void NLA_OT_apply_scale (wmOperatorType *ot) +void NLA_OT_apply_scale(wmOperatorType *ot) { /* identifiers */ ot->name = "Apply Scale"; @@ -1776,7 +1776,7 @@ static int nlaedit_clear_scale_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void NLA_OT_clear_scale (wmOperatorType *ot) +void NLA_OT_clear_scale(wmOperatorType *ot) { /* identifiers */ ot->name = "Clear Scale"; @@ -1917,7 +1917,7 @@ static int nlaedit_snap_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void NLA_OT_snap (wmOperatorType *ot) +void NLA_OT_snap(wmOperatorType *ot) { /* identifiers */ ot->name = "Snap Strips"; @@ -2036,7 +2036,7 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void NLA_OT_fmodifier_add (wmOperatorType *ot) +void NLA_OT_fmodifier_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add F-Modifier"; @@ -2100,7 +2100,7 @@ static int nla_fmodifier_copy_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void NLA_OT_fmodifier_copy (wmOperatorType *ot) +void NLA_OT_fmodifier_copy(wmOperatorType *ot) { /* identifiers */ ot->name = "Copy F-Modifiers"; @@ -2162,7 +2162,7 @@ static int nla_fmodifier_paste_exec(bContext *C, wmOperator *op) } } -void NLA_OT_fmodifier_paste (wmOperatorType *ot) +void NLA_OT_fmodifier_paste(wmOperatorType *ot) { /* identifiers */ ot->name = "Paste F-Modifiers"; diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c index 78fb92f2ee4..b320adc25fb 100644 --- a/source/blender/editors/space_nla/nla_ops.c +++ b/source/blender/editors/space_nla/nla_ops.c @@ -58,7 +58,7 @@ /* ************************** poll callbacks for operators **********************************/ /* tweakmode is NOT enabled */ -int nlaop_poll_tweakmode_off (bContext *C) +int nlaop_poll_tweakmode_off(bContext *C) { Scene *scene; @@ -80,7 +80,7 @@ int nlaop_poll_tweakmode_off (bContext *C) } /* tweakmode IS enabled */ -int nlaop_poll_tweakmode_on (bContext *C) +int nlaop_poll_tweakmode_on(bContext *C) { Scene *scene; @@ -102,7 +102,7 @@ int nlaop_poll_tweakmode_on (bContext *C) } /* is tweakmode enabled - for use in NLA operator code */ -short nlaedit_is_tweakmode_on (bAnimContext *ac) +short nlaedit_is_tweakmode_on(bAnimContext *ac) { if (ac && ac->scene) return (ac->scene->flag & SCE_NLA_EDIT_ON); diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index b0cd59ea7ad..cfd4a3202d2 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -183,7 +183,7 @@ static int nlaedit_deselectall_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void NLA_OT_select_all_toggle (wmOperatorType *ot) +void NLA_OT_select_all_toggle(wmOperatorType *ot) { /* identifiers */ ot->name = "(De)select All"; @@ -254,8 +254,8 @@ static void borderselect_nla_strips (bAnimContext *ac, rcti rect, short mode, sh /* only select strips if they fall within the required ranges (if applicable) */ for (strip= nlt->strips.first; strip; strip= strip->next) { - if ( (mode == NLA_BORDERSEL_CHANNELS) || - BKE_nlastrip_within_bounds(strip, rectf.xmin, rectf.xmax) ) + if ( (mode == NLA_BORDERSEL_CHANNELS) || + BKE_nlastrip_within_bounds(strip, rectf.xmin, rectf.xmax)) { /* set selection */ ACHANNEL_SET_FLAG(strip, selectmode, NLASTRIP_FLAG_SELECT); @@ -481,7 +481,7 @@ static int nlaedit_select_leftright_invoke (bContext *C, wmOperator *op, wmEvent return nlaedit_select_leftright_exec(C, op); } -void NLA_OT_select_leftright (wmOperatorType *ot) +void NLA_OT_select_leftright(wmOperatorType *ot) { /* identifiers */ ot->name = "Select Left/Right"; @@ -643,7 +643,7 @@ static int nlaedit_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH; } -void NLA_OT_click_select (wmOperatorType *ot) +void NLA_OT_click_select(wmOperatorType *ot) { /* identifiers */ ot->name = "Mouse Select"; diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index d37a2dc0e5e..c1af8d3016a 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -289,12 +289,12 @@ static void node_draw_socket_new(bNodeSocket *sock, float size) glColor4ub(0, 0, 0, 150); glEnable(GL_BLEND); - glEnable( GL_LINE_SMOOTH ); + glEnable(GL_LINE_SMOOTH); glBegin(GL_LINE_LOOP); for (a=0; a<16; a++) glVertex2f(x+size*si[a], y+size*co[a]); glEnd(); - glDisable( GL_LINE_SMOOTH ); + glDisable(GL_LINE_SMOOTH); glDisable(GL_BLEND); } #endif @@ -442,7 +442,7 @@ static void node_browse_tex_cb(bContext *C, void *ntree_v, void *node_v) nodeSetActive(ntree, node); if ( ntree->type == NTREE_TEXTURE ) - ntreeTexCheckCyclics( ntree ); + ntreeTexCheckCyclics(ntree); // allqueue(REDRAWBUTSSHADING, 0); // allqueue(REDRAWNODE, 0); @@ -870,16 +870,16 @@ static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bN /* group node outline */ uiSetRoundBox(UI_CNR_ALL); glColor4ub(200, 200, 200, 140); - glEnable( GL_LINE_SMOOTH ); + glEnable(GL_LINE_SMOOTH); uiDrawBox(GL_LINE_LOOP, rect.xmin-node_group_frame, rect.ymin, rect.xmax+node_group_frame, rect.ymax+group_header, BASIS_RAD); - glDisable( GL_LINE_SMOOTH ); + glDisable(GL_LINE_SMOOTH); glDisable(GL_BLEND); /* backdrop title */ UI_ThemeColor(TH_TEXT_HI); layout = uiBlockLayout(gnode->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, (short)(rect.xmin+15), (short)(rect.ymax+group_header), - MIN2((int)(rect.xmax - rect.xmin-18.0f), node_group_frame+20), group_header, UI_GetStyle()); + MIN2((int)(rect.xmax - rect.xmin-18.0f), node_group_frame+20), group_header, UI_GetStyle()); RNA_pointer_create(&ntree->id, &RNA_Node, gnode, &ptr); uiTemplateIDBrowse(layout, (bContext*)C, &ptr, "node_tree", NULL, NULL, NULL); uiBlockLayoutResolve(gnode->block, NULL, NULL); diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index c8bc2104d73..7cddaa5e0e7 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -488,12 +488,12 @@ static void node_circle_draw(float x, float y, float size, char *col, int highli glColor4ub(0, 0, 0, 150); } glEnable(GL_BLEND); - glEnable( GL_LINE_SMOOTH ); + glEnable(GL_LINE_SMOOTH); glBegin(GL_LINE_LOOP); for (a=0; a<16; a++) glVertex2f(x+size*si[a], y+size*co[a]); glEnd(); - glDisable( GL_LINE_SMOOTH ); + glDisable(GL_LINE_SMOOTH); glDisable(GL_BLEND); glLineWidth(1.0f); } @@ -547,7 +547,7 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv) glPixelZoom(xscale, yscale); glEnable(GL_BLEND); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); /* premul graphics */ + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); /* premul graphics */ glColor4f(1.0, 1.0, 1.0, 1.0); glaDrawPixelsTex(prv->xmin, prv->ymin, preview->xsize, preview->ysize, GL_UNSIGNED_BYTE, preview->rect); @@ -691,7 +691,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN /* outline active and selected emphasis */ if ( node->flag & (NODE_ACTIVE|SELECT) ) { glEnable(GL_BLEND); - glEnable( GL_LINE_SMOOTH ); + glEnable(GL_LINE_SMOOTH); /* using different shades of TH_TEXT_HI for the empasis, like triangle */ if ( node->flag & NODE_ACTIVE ) UI_ThemeColorShadeAlpha(TH_TEXT_HI, 0, -40); @@ -700,7 +700,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_LEFT); // round all corners except lower right uiDrawBox(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, BASIS_RAD); - glDisable( GL_LINE_SMOOTH ); + glDisable(GL_LINE_SMOOTH); glDisable(GL_BLEND); } @@ -786,14 +786,14 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b /* outline active and selected emphasis */ if ( node->flag & (NODE_ACTIVE|SELECT) ) { glEnable(GL_BLEND); - glEnable( GL_LINE_SMOOTH ); + glEnable(GL_LINE_SMOOTH); /* using different shades of TH_TEXT_HI for the empasis, like triangle */ if ( node->flag & NODE_ACTIVE ) UI_ThemeColorShadeAlpha(TH_TEXT_HI, 0, -40); else UI_ThemeColorShadeAlpha(TH_TEXT_HI, -20, -120); uiDrawBox(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, hiddenrad); - glDisable( GL_LINE_SMOOTH ); + glDisable(GL_LINE_SMOOTH); glDisable(GL_BLEND); } @@ -939,7 +939,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d) //uiFreeBlocksWin(&sa->uiblocks, sa->win); /* only set once */ - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_MAP1_VERTEX_3); /* aspect+font, set each time */ diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 52089c87f61..042b668c9cc 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -1185,7 +1185,7 @@ static void outliner_draw_iconrow(bContext *C, uiBlock *block, Scene *scene, Spa uiSetRoundBox(UI_CNR_ALL); glColor4ub(255, 255, 255, 100); - uiRoundBox( (float)*offsx-0.5f*ufac, (float)ys-1.0f*ufac, (float)*offsx+UI_UNIT_Y-3.0f*ufac, (float)ys+UI_UNIT_Y-3.0f*ufac, UI_UNIT_Y/2.0f-2.0f*ufac); + uiRoundBox((float) * offsx-0.5f*ufac, (float)ys-1.0f*ufac, (float)*offsx+UI_UNIT_Y-3.0f*ufac, (float)ys+UI_UNIT_Y-3.0f*ufac, UI_UNIT_Y/2.0f-2.0f*ufac); glEnable(GL_BLEND); /* roundbox disables */ } @@ -1317,7 +1317,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene /* active circle */ if (active) { uiSetRoundBox(UI_CNR_ALL); - uiRoundBox( (float)startx+UI_UNIT_Y-1.5f*ufac, (float)*starty+2.0f*ufac, (float)startx+2.0f*UI_UNIT_Y-4.0f*ufac, (float)*starty+UI_UNIT_Y-1.0f*ufac, UI_UNIT_Y/2.0f-2.0f*ufac); + uiRoundBox((float)startx+UI_UNIT_Y-1.5f*ufac, (float)*starty+2.0f*ufac, (float)startx+2.0f*UI_UNIT_Y-4.0f*ufac, (float)*starty+UI_UNIT_Y-1.0f*ufac, UI_UNIT_Y/2.0f-2.0f*ufac); glEnable(GL_BLEND); /* roundbox disables it */ te->flag |= TE_ACTIVE; // for lookup in display hierarchies diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 88e3bac7910..89eb51f73ba 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -356,7 +356,7 @@ static void group_linkobs2scene_cb(bContext *UNUSED(C), Scene *scene, TreeElemen } else { /* link to scene */ - base= MEM_callocN( sizeof(Base), "add_base"); + base= MEM_callocN(sizeof(Base), "add_base"); BLI_addhead(&scene->base, base); base->lay= (1<<20)-1; /*v3d->lay;*/ /* would be nice to use the 3d layer but the include's not here */ gob->ob->flag |= SELECT; diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 5431156de45..38a5151590e 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -926,7 +926,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq glTexCoord2f(1.0f, 1.0f); glVertex2f(v2d->tot.xmax, v2d->tot.ymax); glTexCoord2f(1.0f, 0.0f); glVertex2f(v2d->tot.xmax, v2d->tot.ymin); } - glEnd( ); + glEnd(); glBindTexture(GL_TEXTURE_2D, last_texid); glDisable(GL_TEXTURE_2D); glDeleteTextures(1, &texid); diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c index 23fff8fb274..f980e19e9c8 100644 --- a/source/blender/editors/space_text/text_python.c +++ b/source/blender/editors/space_text/text_python.c @@ -364,20 +364,6 @@ static short UNUSED_FUNCTION(do_texttools) (SpaceText * st, char ascii, unsigned return swallow; } -#if 0 -#ifdef WITH_PYTHON -/* Run text plugin scripts if enabled */ -if (st->doplugins && event && val) -{ - if (BPY_menu_do_shortcut(PYMENU_TEXTPLUGIN, event, qual)) { - do_draw = 1; - } -} -#endif -if (do_draw) - ; // XXX redraw_alltext(); -#endif - static short UNUSED_FUNCTION(do_textmarkers) (SpaceText * st, char ascii, unsigned short evnt, short val) { Text *text; diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index d38d3917177..ecd69f0d10c 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -734,7 +734,7 @@ static void pchan_autoik_adjust (bPoseChannel *pchan, short chainlen) } /* change the chain-length of auto-ik */ -void transform_autoik_update (TransInfo *t, short mode) +void transform_autoik_update(TransInfo *t, short mode) { short *chainlen= &t->settings->autoik_chainlen; bPoseChannel *pchan; @@ -2987,7 +2987,7 @@ typedef struct tGPFtransdata { } tGPFtransdata; /* This function helps flush transdata written to tempdata into the gp-frames */ -void flushTransGPactionData (TransInfo *t) +void flushTransGPactionData(TransInfo *t) { tGPFtransdata *tfd; int i; @@ -3659,7 +3659,7 @@ static void beztmap_to_data (TransInfo *t, FCurve *fcu, BeztMap *bezms, int totv * anim_data is the list of channels (F-Curves) retrieved already containing the * channels to work on. It should not be freed here as it may still need to be used. */ -void remake_graph_transdata (TransInfo *t, ListBase *anim_data) +void remake_graph_transdata(TransInfo *t, ListBase *anim_data) { SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first; bAnimListElem *ale; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index c1b995e8a53..0bf02d1a2bf 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -949,7 +949,7 @@ void resetTransRestrictions(TransInfo *t) } /* the *op can be NULL */ -int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) +int initTransInfo(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) { Scene *sce = CTX_data_scene(C); ToolSettings *ts = CTX_data_tool_settings(C); @@ -1213,7 +1213,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) } /* Here I would suggest only TransInfo related issues, like free data & reset vars. Not redraws */ -void postTrans (bContext *C, TransInfo *t) +void postTrans(bContext *C, TransInfo *t) { TransData *td; @@ -1654,7 +1654,7 @@ void calculatePropRatio(TransInfo *t) td->factor = (float)sqrt(2*dist - dist * dist); break; case PROP_RANDOM: - BLI_srand( BLI_rand() ); /* random seed */ + BLI_srand(BLI_rand()); /* random seed */ td->factor = BLI_frand()*dist; break; default: diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index f15397f1fd6..093c81c8d37 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -643,7 +643,7 @@ static float screen_aligned(RegionView3D *rv3d, float mat[][4]) glTranslatef(mat[3][0], mat[3][1], mat[3][2]); /* sets view screen aligned */ - glRotatef( -360.0f*saacos(rv3d->viewquat[0])/(float)M_PI, rv3d->viewquat[1], rv3d->viewquat[2], rv3d->viewquat[3]); + glRotatef(-360.0f*saacos(rv3d->viewquat[0])/(float)M_PI, rv3d->viewquat[1], rv3d->viewquat[2], rv3d->viewquat[3]); return len_v3(mat[0]); /* draw scale */ } @@ -884,7 +884,7 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving, glClipPlane(GL_CLIP_PLANE0, plane); } /* sets view screen aligned */ - glRotatef( -360.0f*saacos(rv3d->viewquat[0])/(float)M_PI, rv3d->viewquat[1], rv3d->viewquat[2], rv3d->viewquat[3]); + glRotatef(-360.0f*saacos(rv3d->viewquat[0])/(float)M_PI, rv3d->viewquat[1], rv3d->viewquat[2], rv3d->viewquat[3]); /* Screen aligned help circle */ if (arcs) { @@ -1553,7 +1553,7 @@ static int manipulator_selectbuf(ScrArea *sa, ARegion *ar, const int mval[2], fl setwinmatrixview3d(ar, v3d, &rect); mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat); - glSelectBuffer( 64, buffer); + glSelectBuffer(64, buffer); glRenderMode(GL_SELECT); glInitNames(); /* these two calls whatfor? It doesnt work otherwise */ glPushName(-2); diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 2b8c03a56ae..04207643aa4 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -769,7 +769,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], float mat[4][4]; /* Rotation of MetaElem is stored in quat */ - quat_to_mat4( mat, ml_sel->quat); + quat_to_mat4(mat, ml_sel->quat); copy_v3_v3(normal, mat[2]); diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index a24679878bc..fa579293a73 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -188,10 +188,10 @@ void drawSnapping(const struct bContext *C, TransInfo *t) glBegin(GL_LINES); glVertex3f(t->tsnap.snapPoint[0], t->tsnap.snapPoint[1], t->tsnap.snapPoint[2]); - glVertex3f( t->tsnap.snapPoint[0] + t->tsnap.snapNormal[0], - t->tsnap.snapPoint[1] + t->tsnap.snapNormal[1], - t->tsnap.snapPoint[2] + t->tsnap.snapNormal[2]); - glEnd(); + glVertex3f(t->tsnap.snapPoint[0] + t->tsnap.snapNormal[0], + t->tsnap.snapPoint[1] + t->tsnap.snapNormal[1], + t->tsnap.snapPoint[2] + t->tsnap.snapNormal[2]); + glEnd(); } if (v3d->zbuf) diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index c830971dcbd..09ed3c6f5fb 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -620,7 +620,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int /* create image */ glGenTextures(1, (GLuint *)bind); - glBindTexture( GL_TEXTURE_2D, *bind); + glBindTexture(GL_TEXTURE_2D, *bind); if (!(gpu_get_mipmap() && mipmap)) { if (use_high_bit_depth) diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 05eaad12ae2..ec3d65e68d5 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -1151,70 +1151,70 @@ static void do_material_tex(GPUShadeInput *shi) if ( iBumpSpacePrev != iBumpSpace ) { if ( mtex->texflag & MTEX_BUMP_OBJECTSPACE ) - GPU_link( mat, "mtex_bump_init_objspace", - surf_pos, vNorg, - GPU_builtin(GPU_VIEW_MATRIX), GPU_builtin(GPU_INVERSE_VIEW_MATRIX), GPU_builtin(GPU_OBJECT_MATRIX), GPU_builtin(GPU_INVERSE_OBJECT_MATRIX), - fPrevMagnitude, vNacc, - &fPrevMagnitude, &vNacc, - &vR1, &vR2, &fDet ); + GPU_link(mat, "mtex_bump_init_objspace", + surf_pos, vNorg, + GPU_builtin(GPU_VIEW_MATRIX), GPU_builtin(GPU_INVERSE_VIEW_MATRIX), GPU_builtin(GPU_OBJECT_MATRIX), GPU_builtin(GPU_INVERSE_OBJECT_MATRIX), + fPrevMagnitude, vNacc, + &fPrevMagnitude, &vNacc, + &vR1, &vR2, &fDet); else if ( mtex->texflag & MTEX_BUMP_TEXTURESPACE ) - GPU_link( mat, "mtex_bump_init_texturespace", - surf_pos, vNorg, - fPrevMagnitude, vNacc, - &fPrevMagnitude, &vNacc, - &vR1, &vR2, &fDet ); + GPU_link(mat, "mtex_bump_init_texturespace", + surf_pos, vNorg, + fPrevMagnitude, vNacc, + &fPrevMagnitude, &vNacc, + &vR1, &vR2, &fDet); else - GPU_link( mat, "mtex_bump_init_viewspace", - surf_pos, vNorg, - fPrevMagnitude, vNacc, - &fPrevMagnitude, &vNacc, - &vR1, &vR2, &fDet ); + GPU_link(mat, "mtex_bump_init_viewspace", + surf_pos, vNorg, + fPrevMagnitude, vNacc, + &fPrevMagnitude, &vNacc, + &vR1, &vR2, &fDet); iBumpSpacePrev = iBumpSpace; } if (found_deriv_map) { - GPU_link( mat, "mtex_bump_deriv", - texco, GPU_image(tex->ima, &tex->iuser), GPU_uniform(&ima_x), GPU_uniform(&ima_y), tnorfac, - &dBs, &dBt ); + GPU_link(mat, "mtex_bump_deriv", + texco, GPU_image(tex->ima, &tex->iuser), GPU_uniform(&ima_x), GPU_uniform(&ima_y), tnorfac, + &dBs, &dBt ); } - else if ( mtex->texflag & MTEX_3TAP_BUMP ) - GPU_link( mat, "mtex_bump_tap3", - texco, GPU_image(tex->ima, &tex->iuser), tnorfac, - &dBs, &dBt ); - else if ( mtex->texflag & MTEX_5TAP_BUMP ) - GPU_link( mat, "mtex_bump_tap5", - texco, GPU_image(tex->ima, &tex->iuser), tnorfac, - &dBs, &dBt ); + else if ( mtex->texflag & MTEX_3TAP_BUMP) + GPU_link(mat, "mtex_bump_tap3", + texco, GPU_image(tex->ima, &tex->iuser), tnorfac, + &dBs, &dBt ); + else if ( mtex->texflag & MTEX_5TAP_BUMP) + GPU_link(mat, "mtex_bump_tap5", + texco, GPU_image(tex->ima, &tex->iuser), tnorfac, + &dBs, &dBt ); else if ( mtex->texflag & MTEX_BICUBIC_BUMP ) { if (GPU_bicubic_bump_support()) { - GPU_link( mat, "mtex_bump_bicubic", - texco, GPU_image(tex->ima, &tex->iuser), tnorfac, - &dBs, &dBt ); + GPU_link(mat, "mtex_bump_bicubic", + texco, GPU_image(tex->ima, &tex->iuser), tnorfac, + &dBs, &dBt); } else { - GPU_link( mat, "mtex_bump_tap5", - texco, GPU_image(tex->ima, &tex->iuser), tnorfac, - &dBs, &dBt ); + GPU_link(mat, "mtex_bump_tap5", + texco, GPU_image(tex->ima, &tex->iuser), tnorfac, + &dBs, &dBt); } } if ( mtex->texflag & MTEX_BUMP_TEXTURESPACE ) { float imag_tspace_dimension_y = aspect*imag_tspace_dimension_x; - GPU_link( mat, "mtex_bump_apply_texspace", - fDet, dBs, dBt, vR1, vR2, - GPU_image(tex->ima, &tex->iuser), texco, - GPU_uniform(&imag_tspace_dimension_x), GPU_uniform(&imag_tspace_dimension_y), vNacc, - &vNacc, &shi->vn ); + GPU_link(mat, "mtex_bump_apply_texspace", + fDet, dBs, dBt, vR1, vR2, + GPU_image(tex->ima, &tex->iuser), texco, + GPU_uniform(&imag_tspace_dimension_x), GPU_uniform(&imag_tspace_dimension_y), vNacc, + &vNacc, &shi->vn ); } else - GPU_link( mat, "mtex_bump_apply", - fDet, dBs, dBt, vR1, vR2, vNacc, - &vNacc, &shi->vn ); + GPU_link(mat, "mtex_bump_apply", + fDet, dBs, dBt, vR1, vR2, vNacc, + &vNacc, &shi->vn ); } } @@ -1567,7 +1567,7 @@ static void gpu_lamp_from_blender(Scene *scene, Object *ob, Object *par, Lamp *l pixsize= (lamp->d)/temp; wsize= pixsize*0.5f*lamp->size; - perspective_m4( lamp->winmat, -wsize, wsize, -wsize, wsize, lamp->d, lamp->clipend); + perspective_m4(lamp->winmat, -wsize, wsize, -wsize, wsize, lamp->d, lamp->clipend); } static void gpu_lamp_shadow_free(GPULamp *lamp) diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index cf1a4df1cf9..9f3ed6797be 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -255,7 +255,7 @@ void IMB_close_anim_proxies(struct anim *anim) IMB_free_indices(anim); } -struct anim * IMB_open_anim( const char * name, int ib_flags, int streamindex) +struct anim * IMB_open_anim(const char * name, int ib_flags, int streamindex) { struct anim * anim; diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index b566d975f5b..c38599028f8 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -69,7 +69,7 @@ anim_index_builder * IMB_index_builder_create(const char * name) { anim_index_builder * rv - = MEM_callocN( sizeof(struct anim_index_builder), + = MEM_callocN(sizeof(struct anim_index_builder), "index builder"); fprintf(stderr, "Starting work on index: %s\n", name); @@ -176,7 +176,7 @@ struct anim_index * IMB_indexer_open(const char * name) return NULL; } - idx = MEM_callocN( sizeof(struct anim_index), "anim_index"); + idx = MEM_callocN(sizeof(struct anim_index), "anim_index"); BLI_strncpy(idx->name, name, sizeof(idx->name)); @@ -191,7 +191,7 @@ struct anim_index * IMB_indexer_open(const char * name) fseek(fp, 12, SEEK_SET); - idx->entries = MEM_callocN( sizeof(struct anim_index_entry) + idx->entries = MEM_callocN(sizeof(struct anim_index_entry) * idx->num_entries, "anim_index_entries"); for (i = 0; i < idx->num_entries; i++) { diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index 87e56bffb41..f3a382eaa56 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -230,7 +230,7 @@ static void memory_source(j_decompress_ptr cinfo, unsigned char *buffer, size_t * If must suspend, take the specified action (typically "return FALSE"). */ #define INPUT_BYTE(cinfo,V,action) \ - MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ + MAKESTMT(MAKE_BYTE_AVAIL(cinfo,action); \ bytes_in_buffer--; \ V = GETJOCTET(*next_input_byte++); ) @@ -238,7 +238,7 @@ static void memory_source(j_decompress_ptr cinfo, unsigned char *buffer, size_t * V should be declared unsigned int or perhaps INT32. */ #define INPUT_2BYTES(cinfo,V,action) \ - MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ + MAKESTMT(MAKE_BYTE_AVAIL(cinfo,action); \ bytes_in_buffer--; \ V = ((unsigned int) GETJOCTET(*next_input_byte++)) << 8; \ MAKE_BYTE_AVAIL(cinfo,action); \ diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c index 513fcb9b6dc..0a19bf1280b 100644 --- a/source/blender/imbuf/intern/png.c +++ b/source/blender/imbuf/intern/png.c @@ -51,9 +51,9 @@ typedef struct PNGReadStruct { unsigned int seek; } PNGReadStruct; -static void ReadData( png_structp png_ptr, png_bytep data, png_size_t length); -static void WriteData( png_structp png_ptr, png_bytep data, png_size_t length); -static void Flush( png_structp png_ptr); +static void ReadData(png_structp png_ptr, png_bytep data, png_size_t length); +static void WriteData(png_structp png_ptr, png_bytep data, png_size_t length); +static void Flush(png_structp png_ptr); int imb_is_a_png(unsigned char *mem) { @@ -68,7 +68,7 @@ static void Flush(png_structp png_ptr) (void)png_ptr; } -static void WriteData( png_structp png_ptr, png_bytep data, png_size_t length) +static void WriteData(png_structp png_ptr, png_bytep data, png_size_t length) { ImBuf *ibuf = (ImBuf *) png_get_io_ptr(png_ptr); @@ -81,7 +81,7 @@ static void WriteData( png_structp png_ptr, png_bytep data, png_size_t length) ibuf->encodedsize += length; } -static void ReadData( png_structp png_ptr, png_bytep data, png_size_t length) +static void ReadData(png_structp png_ptr, png_bytep data, png_size_t length) { PNGReadStruct *rs= (PNGReadStruct *) png_get_io_ptr(png_ptr); diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 23080aee7ab..8507cb71543 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -218,7 +218,7 @@ static void thumbname_from_uri(const char* uri, char* thumb, const int thumb_len char hexdigest[33]; unsigned char digest[16]; - md5_buffer( uri, strlen(uri), digest); + md5_buffer(uri, strlen(uri), digest); hexdigest[0] = '\0'; to_hex_char(hexdigest, digest, 16); hexdigest[32] = '\0'; diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 41c04ca0899..557c0393166 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -338,7 +338,7 @@ static void init_structDNA(SDNA *sdna, int do_endian_swap) else sdna->nr_names= *data; data++; - sdna->names= MEM_callocN( sizeof(void *)*sdna->nr_names, "sdnanames"); + sdna->names= MEM_callocN(sizeof(void *)*sdna->nr_names, "sdnanames"); } else { printf("NAME error in SDNA file\n"); @@ -378,7 +378,7 @@ static void init_structDNA(SDNA *sdna, int do_endian_swap) else sdna->nr_types= *data; data++; - sdna->types= MEM_callocN( sizeof(void *)*sdna->nr_types, "sdnatypes"); + sdna->types= MEM_callocN(sizeof(void *)*sdna->nr_types, "sdnatypes"); } else { printf("TYPE error in SDNA file\n"); @@ -442,7 +442,7 @@ static void init_structDNA(SDNA *sdna, int do_endian_swap) else sdna->nr_structs= *data; data++; - sdna->structs= MEM_callocN( sizeof(void *)*sdna->nr_structs, "sdnastrcs"); + sdna->structs= MEM_callocN(sizeof(void *)*sdna->nr_structs, "sdnastrcs"); } else { printf("STRC error in SDNA file\n"); @@ -933,7 +933,7 @@ static void reconstruct_struct(SDNA *newsdna, SDNA *oldsdna, spo= oldsdna->structs[oldSDNAnr]; elen= oldsdna->typelens[ spo[0] ]; - memcpy( cur, data, elen); + memcpy(cur, data, elen); return; } @@ -1140,7 +1140,7 @@ void *DNA_struct_reconstruct(SDNA *newsdna, SDNA *oldsdna, char *compflags, int return NULL; } - cur= MEM_callocN( blocks*curlen, "reconstruct"); + cur= MEM_callocN(blocks*curlen, "reconstruct"); cpc= cur; cpo= data; for (a=0; adata = BKE_curve_copy( (Curve *) ob->data ); + copycu = tmpobj->data = BKE_curve_copy((Curve *) ob->data ); /* temporarily set edit so we get updates from edit mode, but * also because for text datablocks copying it while in edit @@ -105,21 +105,21 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ copycu->editnurb = tmpcu->editnurb; /* get updated display list, and convert to a mesh */ - makeDispListCurveTypes( sce, tmpobj, 0 ); + makeDispListCurveTypes(sce, tmpobj, 0); copycu->editfont = NULL; copycu->editnurb = NULL; - nurbs_to_mesh( tmpobj ); + nurbs_to_mesh(tmpobj); /* nurbs_to_mesh changes the type to a mesh, check it worked */ if (tmpobj->type != OB_MESH) { - free_libblock_us( &(G.main->object), tmpobj ); + free_libblock_us(&(G.main->object), tmpobj ); BKE_report(reports, RPT_ERROR, "cant convert curve to mesh. Does the curve have any segments?"); return NULL; } tmpmesh = tmpobj->data; - free_libblock_us( &G.main->object, tmpobj ); + free_libblock_us(&G.main->object, tmpobj); break; case OB_MBALL: { diff --git a/source/blender/modifiers/intern/MOD_collision.c b/source/blender/modifiers/intern/MOD_collision.c index 4c5ce184c22..83a366815de 100644 --- a/source/blender/modifiers/intern/MOD_collision.c +++ b/source/blender/modifiers/intern/MOD_collision.c @@ -136,7 +136,7 @@ static void deformVerts(ModifierData *md, Object *ob, if (G.rt > 0) printf("current_time %f, collmd->time_xnew %f\n", current_time, collmd->time_xnew); - numverts = dm->getNumVerts ( dm ); + numverts = dm->getNumVerts (dm); if ((current_time > collmd->time_xnew)|| (BKE_ptcache_get_continue_physics())) { unsigned int i; @@ -150,7 +150,7 @@ static void deformVerts(ModifierData *md, Object *ob, for ( i = 0; i < numverts; i++ ) { // we save global positions - mul_m4_v3( ob->obmat, collmd->x[i].co ); + mul_m4_v3(ob->obmat, collmd->x[i].co); } collmd->xnew = MEM_dupallocN(collmd->x); // frame end position @@ -181,7 +181,7 @@ static void deformVerts(ModifierData *md, Object *ob, for (i = 0; i < numverts; i++) { // we save global positions - mul_m4_v3( ob->obmat, collmd->xnew[i].co ); + mul_m4_v3(ob->obmat, collmd->xnew[i].co); } memcpy(collmd->current_xnew, collmd->x, numverts*sizeof(MVert)); diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c index ac3341f8e8d..80c48062635 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim_util.c +++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c @@ -406,7 +406,7 @@ static void fluidsim_read_vel_cache(FluidsimModifierData *fluidmd, DerivedMesh * return; } - gzread(gzf, &wri, sizeof( wri )); + gzread(gzf, &wri, sizeof(wri)); if (wri != totvert) { MEM_freeN(fss->meshVelocities); fss->meshVelocities = NULL; @@ -415,7 +415,7 @@ static void fluidsim_read_vel_cache(FluidsimModifierData *fluidmd, DerivedMesh * for (i=0; igetEdge(dm, i, &me); /* only add if both verts will be in new mesh */ - if ( BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me.v1)) && - BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me.v2)) ) + if (BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me.v1)) && + BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me.v2))) { BLI_ghash_insert(edgeHash, SET_INT_IN_POINTER(i), SET_INT_IN_POINTER(numEdges)); numEdges++; @@ -320,10 +320,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, mvert_new = CDDM_get_verts(result); /* using ghash-iterators, map data into new mesh */ - /* vertices */ - for ( hashIter = BLI_ghashIterator_new(vertHash); - !BLI_ghashIterator_isDone(hashIter); - BLI_ghashIterator_step(hashIter) ) + /* vertices */ + for (hashIter = BLI_ghashIterator_new(vertHash); + !BLI_ghashIterator_isDone(hashIter); + BLI_ghashIterator_step(hashIter) ) { MVert source; MVert *dest; @@ -338,10 +338,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } BLI_ghashIterator_free(hashIter); - /* edges */ - for ( hashIter = BLI_ghashIterator_new(edgeHash); - !BLI_ghashIterator_isDone(hashIter); - BLI_ghashIterator_step(hashIter) ) + /* edges */ + for (hashIter = BLI_ghashIterator_new(edgeHash); + !BLI_ghashIterator_isDone(hashIter); + BLI_ghashIterator_step(hashIter)) { MEdge source; MEdge *dest; @@ -359,10 +359,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } BLI_ghashIterator_free(hashIter); - /* faces */ - for ( hashIter = BLI_ghashIterator_new(polyHash); - !BLI_ghashIterator_isDone(hashIter); - BLI_ghashIterator_step(hashIter) ) + /* faces */ + for (hashIter = BLI_ghashIterator_new(polyHash); + !BLI_ghashIterator_isDone(hashIter); + BLI_ghashIterator_step(hashIter) ) { int oldIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(hashIter)); int newIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(hashIter)); diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c index 2b289efa437..80a3b70d8e3 100644 --- a/source/blender/modifiers/intern/MOD_uvproject.c +++ b/source/blender/modifiers/intern/MOD_uvproject.c @@ -224,12 +224,12 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd, if (cam->type == CAM_PERSP) { float perspmat[4][4]; - perspective_m4( perspmat, xmin, xmax, ymin, ymax, cam->clipsta, cam->clipend); + perspective_m4(perspmat, xmin, xmax, ymin, ymax, cam->clipsta, cam->clipend); mult_m4_m4m4(tmpmat, perspmat, projectors[i].projmat); } else { /* if (cam->type == CAM_ORTHO) */ float orthomat[4][4]; - orthographic_m4( orthomat, xmin, xmax, ymin, ymax, cam->clipsta, cam->clipend); + orthographic_m4(orthomat, xmin, xmax, ymin, ymax, cam->clipsta, cam->clipend); mult_m4_m4m4(tmpmat, orthomat, projectors[i].projmat); } } diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c index 362ed59a38e..13882d631d8 100644 --- a/source/blender/nodes/intern/node_common.c +++ b/source/blender/nodes/intern/node_common.c @@ -130,7 +130,7 @@ bNode *node_group_make_from_selected(bNodeTree *ntree) /* no groups in groups */ if (node->type==NODE_GROUP) return NULL; - DO_MINMAX2( (&node->locx), min, max); + DO_MINMAX2((&node->locx), min, max); totnode++; } node->done= 0; diff --git a/source/blender/nodes/shader/nodes/node_shader_vectMath.c b/source/blender/nodes/shader/nodes/node_shader_vectMath.c index a0fe67d591d..73b0582490d 100644 --- a/source/blender/nodes/shader/nodes/node_shader_vectMath.c +++ b/source/blender/nodes/shader/nodes/node_shader_vectMath.c @@ -73,7 +73,7 @@ static void node_shader_exec_vect_math(void *UNUSED(data), bNode *node, bNodeSta out[0]->vec[1]= vec1[1] + vec2[1]; out[0]->vec[2]= vec1[2] + vec2[2]; - out[1]->vec[0] = normalize_v3( out[0]->vec ); + out[1]->vec[0] = normalize_v3(out[0]->vec ); } else if (node->custom1 == 3) { /* Dot product */ out[1]->vec[0]= (vec1[0] * vec2[0]) + (vec1[1] * vec2[1]) + (vec1[2] * vec2[2]); @@ -83,7 +83,7 @@ static void node_shader_exec_vect_math(void *UNUSED(data), bNode *node, bNodeSta out[0]->vec[1]= (vec1[2] * vec2[0]) - (vec1[0] * vec2[2]); out[0]->vec[2]= (vec1[0] * vec2[1]) - (vec1[1] * vec2[0]); - out[1]->vec[0] = normalize_v3( out[0]->vec ); + out[1]->vec[0] = normalize_v3(out[0]->vec ); } else if (node->custom1 == 5) { /* Normalize */ if (in[0]->hasinput || !in[1]->hasinput) { /* This one only takes one input, so we've got to choose. */ @@ -97,7 +97,7 @@ static void node_shader_exec_vect_math(void *UNUSED(data), bNode *node, bNodeSta out[0]->vec[2]= vec2[2]; } - out[1]->vec[0] = normalize_v3( out[0]->vec ); + out[1]->vec[0] = normalize_v3(out[0]->vec ); } } diff --git a/source/blender/nodes/texture/nodes/node_texture_bricks.c b/source/blender/nodes/texture/nodes/node_texture_bricks.c index 8ef531c6316..fbf04715020 100644 --- a/source/blender/nodes/texture/nodes/node_texture_bricks.c +++ b/source/blender/nodes/texture/nodes/node_texture_bricks.c @@ -104,14 +104,15 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor tint = noise((rownum << 16) + (bricknum & 0xFFFF)) + bias; CLAMP(tint, 0.0f, 1.0f); - if ( ins_x < mortar_thickness || ins_y < mortar_thickness || - ins_x > (brick_width - mortar_thickness) || - ins_y > (row_height - mortar_thickness) ) { - copy_v4_v4( out, mortar ); + if (ins_x < mortar_thickness || ins_y < mortar_thickness || + ins_x > (brick_width - mortar_thickness) || + ins_y > (row_height - mortar_thickness)) + { + copy_v4_v4(out, mortar); } else { - copy_v4_v4( out, bricks1 ); - ramp_blend( MA_RAMP_BLEND, out, tint, bricks2 ); + copy_v4_v4(out, bricks1); + ramp_blend(MA_RAMP_BLEND, out, tint, bricks2); } } diff --git a/source/blender/nodes/texture/nodes/node_texture_image.c b/source/blender/nodes/texture/nodes/node_texture_image.c index d0bc30089e2..38d6db1fd08 100644 --- a/source/blender/nodes/texture/nodes/node_texture_image.c +++ b/source/blender/nodes/texture/nodes/node_texture_image.c @@ -76,7 +76,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **UNUSED(i while ( py >= ibuf->y ) py -= ibuf->y; result = ibuf->rect_float + py*ibuf->x*4 + px*4; - copy_v4_v4( out, result ); + copy_v4_v4(out, result); } } } diff --git a/source/blender/nodes/texture/nodes/node_texture_texture.c b/source/blender/nodes/texture/nodes/node_texture_texture.c index 201d75c0cad..ecf47a900f9 100644 --- a/source/blender/nodes/texture/nodes/node_texture_texture.c +++ b/source/blender/nodes/texture/nodes/node_texture_texture.c @@ -65,7 +65,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor if (node->custom2 || node->need_exec==0) { /* this node refers to its own texture tree! */ - copy_v4_v4(out, (fabs(co[0] - co[1]) < .01) ? white : red ); + copy_v4_v4(out, (fabs(co[0] - co[1]) < .01) ? white : red); } else if (nodetex) { TexResult texres; diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c index d436b90502e..cdf8d6d1860 100644 --- a/source/blender/quicktime/apple/quicktime_export.c +++ b/source/blender/quicktime/apple/quicktime_export.c @@ -263,7 +263,7 @@ static OSErr QT_GetCodecSettingsFromScene(RenderData *rd, ReportList *reports) // if there is codecdata in the blendfile, convert it to a Quicktime handle if (qcd) { myHandle = NewHandle(qcd->cdSize); - PtrToHand( qcd->cdParms, &myHandle, qcd->cdSize); + PtrToHand(qcd->cdParms, &myHandle, qcd->cdSize); } // restore codecsettings to the quicktime component @@ -350,7 +350,7 @@ static void QT_CreateMyVideoTrack(int rectx, int recty, ReportList *reports) FixRatio(trackFrame.right, 1), FixRatio(trackFrame.bottom, 1), 0); - CheckError( GetMoviesError(), "NewMovieTrack error", reports ); + CheckError(GetMoviesError(), "NewMovieTrack error", reports); // SetIdentityMatrix(&myMatrix); // ScaleMatrix(&myMatrix, fixed1, Long2Fix(-1), 0, 0); @@ -362,10 +362,10 @@ static void QT_CreateMyVideoTrack(int rectx, int recty, ReportList *reports) qtdata->kVideoTimeScale, nil, 0); - CheckError( GetMoviesError(), "NewTrackMedia error", reports ); + CheckError(GetMoviesError(), "NewTrackMedia error", reports); err = BeginMediaEdits (qtexport->theMedia); - CheckError( err, "BeginMediaEdits error", reports ); + CheckError(err, "BeginMediaEdits error", reports); QT_StartAddVideoSamplesToMedia (&trackFrame, rectx, recty, reports); } @@ -378,14 +378,14 @@ static void QT_EndCreateMyVideoTrack(ReportList *reports) QT_EndAddVideoSamplesToMedia (); err = EndMediaEdits (qtexport->theMedia); - CheckError( err, "EndMediaEdits error", reports ); + CheckError(err, "EndMediaEdits error", reports); err = InsertMediaIntoTrack (qtexport->theTrack, kTrackStart, /* track start time */ kMediaStart, /* media start time */ GetMediaDuration (qtexport->theMedia), fixed1); - CheckError( err, "InsertMediaIntoTrack error", reports ); + CheckError(err, "InsertMediaIntoTrack error", reports); } @@ -515,7 +515,7 @@ void filepath_qt(char *string, RenderData *rd) BLI_make_existing_file(string); if (BLI_strcasecmp(string + strlen(string) - 4, ".mov")) { - sprintf(txt, "%04d-%04d.mov", (rd->sfra), (rd->efra) ); + sprintf(txt, "%04d-%04d.mov", (rd->sfra), (rd->efra)); strcat(string, txt); } } @@ -684,7 +684,7 @@ static void check_renderbutton_framerate(RenderData *rd, ReportList *reports) } err = SCSetInfo(qtdata->theComponent, scTemporalSettingsType, &qtdata->gTemporalSettings); - CheckError( err, "SCSetInfo error", reports ); + CheckError(err, "SCSetInfo error", reports); if (qtdata->gTemporalSettings.frameRate == 1571553) { // 23.98 fps qtdata->kVideoTimeScale = 24000; diff --git a/source/blender/quicktime/apple/quicktime_import.c b/source/blender/quicktime/apple/quicktime_import.c index f5601fb5b8c..804f7b271de 100644 --- a/source/blender/quicktime/apple/quicktime_import.c +++ b/source/blender/quicktime/apple/quicktime_import.c @@ -176,7 +176,7 @@ char *get_valid_qtname(char *name) #endif /* _WIN32 */ -int anim_is_quicktime (const char *name) +int anim_is_quicktime(const char *name) { FSSpec theFSSpec; char theFullPath[255]; @@ -255,7 +255,7 @@ int anim_is_quicktime (const char *name) } -void free_anim_quicktime (struct anim *anim) +void free_anim_quicktime(struct anim *anim) { if (anim == NULL) return; if (anim->qtime == NULL) return; @@ -263,12 +263,12 @@ void free_anim_quicktime (struct anim *anim) UnlockPixels(anim->qtime->offscreenPixMap); if (anim->qtime->have_gw) - DisposeGWorld( anim->qtime->offscreenGWorld ); + DisposeGWorld(anim->qtime->offscreenGWorld); if (anim->qtime->ibuf) IMB_freeImBuf(anim->qtime->ibuf); - DisposeMovie( anim->qtime->movie ); - CloseMovieFile( anim->qtime->movieRefNum ); + DisposeMovie(anim->qtime->movie); + CloseMovieFile(anim->qtime->movieRefNum); if (anim->qtime->frameIndex) MEM_freeN (anim->qtime->frameIndex); if (anim->qtime) MEM_freeN (anim->qtime); @@ -440,7 +440,7 @@ static short GetFirstVideoTrackPixelDepth(struct anim *anim) } -int startquicktime (struct anim *anim) +int startquicktime(struct anim *anim) { FSSpec theFSSpec; diff --git a/source/blender/render/intern/raytrace/bvh.h b/source/blender/render/intern/raytrace/bvh.h index d99debd6cb5..c38d9b1dcb4 100644 --- a/source/blender/render/intern/raytrace/bvh.h +++ b/source/blender/render/intern/raytrace/bvh.h @@ -99,7 +99,7 @@ static int rayobject_bb_intersect_test(const Isect *isec, const float *_bb) /* bvh tree generics */ template static void bvh_add(Tree *obj, RayObject *ob) { - rtbuild_add( obj->builder, ob ); + rtbuild_add(obj->builder, ob); } template @@ -150,7 +150,7 @@ template static inline void bvh_node_merge_bb(Node *node, float *min, float *max) { if (is_leaf(node)) { - RE_rayobject_merge_bb( (RayObject*)node, min, max); + RE_rayobject_merge_bb((RayObject *)node, min, max); } else { DO_MIN(node->bb, min); @@ -364,7 +364,7 @@ static int bvh_node_raycast(Node *node, Isect *isec) template void bvh_dfs_make_hint(Node *node, LCTSHint *hint, int reserve_space, HintObject *hintObject) { - assert( hint->size + reserve_space + 1 <= RE_RAY_LCTS_MAX_SIZE ); + assert(hint->size + reserve_space + 1 <= RE_RAY_LCTS_MAX_SIZE); if (is_leaf(node)) { hint->stack[hint->size++] = (RayObject*)node; @@ -396,7 +396,7 @@ template static inline RayObject *bvh_create_tree(int size) { Tree *obj= (Tree*)MEM_callocN(sizeof(Tree), "BVHTree" ); - assert( RE_rayobject_isAligned(obj) ); /* RayObject API assumes real data to be 4-byte aligned */ + assert(RE_rayobject_isAligned(obj)); /* RayObject API assumes real data to be 4-byte aligned */ obj->rayobj.api = bvh_get_api(DFS_STACK_SIZE); obj->root = NULL; diff --git a/source/blender/render/intern/raytrace/reorganize.h b/source/blender/render/intern/raytrace/reorganize.h index cb557ae32c8..a47bd27d11b 100644 --- a/source/blender/render/intern/raytrace/reorganize.h +++ b/source/blender/render/intern/raytrace/reorganize.h @@ -93,11 +93,11 @@ void reorganize(Node *root) if (RE_rayobject_isAligned(node->child)) { for (Node **prev = &node->child; *prev; ) { - assert( RE_rayobject_isAligned(*prev) ); + assert(RE_rayobject_isAligned(*prev)); q.push(*prev); std::pair best(FLT_MAX, root); - reorganize_find_fittest_parent( root, *prev, best ); + reorganize_find_fittest_parent(root, *prev, best); if (best.second == node) { //Already inside the fitnest BB @@ -349,7 +349,7 @@ struct OVBVHNode //Calc new childs { OVBVHNode **cut = &(this->child); - set_cut( best_cutsize, &cut ); + set_cut(best_cutsize, &cut); *cut = NULL; } diff --git a/source/blender/render/intern/raytrace/vbvh.h b/source/blender/render/intern/raytrace/vbvh.h index f916dd412f7..d8ff9000a3f 100644 --- a/source/blender/render/intern/raytrace/vbvh.h +++ b/source/blender/render/intern/raytrace/vbvh.h @@ -127,7 +127,7 @@ struct BuildBinaryVBVH Node *create_node() { Node *node = (Node*)BLI_memarena_alloc( arena, sizeof(Node) ); - assert( RE_rayobject_isAligned(node) ); + assert(RE_rayobject_isAligned(node)); node->sibling = NULL; node->child = NULL; diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 8cd31eb289f..22629764cbe 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -469,11 +469,11 @@ static void calc_tangent_vector(ObjectRen *obr, VertexTangent **vtangents, MemAr } else if (v1->orco) { uv1= uv[0]; uv2= uv[1]; uv3= uv[2]; uv4= uv[3]; - map_to_sphere( &uv[0][0], &uv[0][1], v1->orco[0], v1->orco[1], v1->orco[2]); - map_to_sphere( &uv[1][0], &uv[1][1], v2->orco[0], v2->orco[1], v2->orco[2]); - map_to_sphere( &uv[2][0], &uv[2][1], v3->orco[0], v3->orco[1], v3->orco[2]); + map_to_sphere(&uv[0][0], &uv[0][1], v1->orco[0], v1->orco[1], v1->orco[2]); + map_to_sphere(&uv[1][0], &uv[1][1], v2->orco[0], v2->orco[1], v2->orco[2]); + map_to_sphere(&uv[2][0], &uv[2][1], v3->orco[0], v3->orco[1], v3->orco[2]); if (v4) - map_to_sphere( &uv[3][0], &uv[3][1], v4->orco[0], v4->orco[1], v4->orco[2]); + map_to_sphere(&uv[3][0], &uv[3][1], v4->orco[0], v4->orco[1], v4->orco[2]); } else return; @@ -3584,7 +3584,7 @@ static void initshadowbuf(Render *re, LampRen *lar, float mat[][4]) /* if (la->spsi<16) return; */ /* memory alloc */ - shb= (struct ShadBuf *)MEM_callocN( sizeof(struct ShadBuf), "initshadbuf"); + shb= (struct ShadBuf *)MEM_callocN(sizeof(struct ShadBuf), "initshadbuf"); lar->shb= shb; if (shb==NULL) return; diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index cf233f1b6cd..ff45f991dc0 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -541,7 +541,9 @@ void RE_SetWindow(Render *re, rctf *viewplane, float clipsta, float clipend) re->clipend= clipend; re->r.mode &= ~R_ORTHO; - perspective_m4( re->winmat, re->viewplane.xmin, re->viewplane.xmax, re->viewplane.ymin, re->viewplane.ymax, re->clipsta, re->clipend); + perspective_m4(re->winmat, + re->viewplane.xmin, re->viewplane.xmax, + re->viewplane.ymin, re->viewplane.ymax, re->clipsta, re->clipend); } @@ -554,7 +556,9 @@ void RE_SetOrtho(Render *re, rctf *viewplane, float clipsta, float clipend) re->clipend= clipend; re->r.mode |= R_ORTHO; - orthographic_m4( re->winmat, re->viewplane.xmin, re->viewplane.xmax, re->viewplane.ymin, re->viewplane.ymax, re->clipsta, re->clipend); + orthographic_m4(re->winmat, + re->viewplane.xmin, re->viewplane.xmax, + re->viewplane.ymin, re->viewplane.ymax, re->clipsta, re->clipend); } void RE_SetView(Render *re, float mat[][4]) diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c index 826a31e17a8..ac48a5f41f2 100644 --- a/source/blender/render/intern/source/pixelshading.c +++ b/source/blender/render/intern/source/pixelshading.c @@ -351,7 +351,7 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz, rc= hashvectf + (ofs % 768); - fac= fabsf( rc[1]*(har->rad*fabsf(rc[0]) - radist) ); + fac = fabsf(rc[1] * (har->rad * fabsf(rc[0]) - radist)); if (fac< 1.0f) { ringf+= (1.0f-fac); @@ -360,7 +360,7 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz, } if (har->type & HA_VECT) { - dist= fabsf( har->cos*(yn) - har->sin*(xn) )/har->rad; + dist= fabsf(har->cos * (yn) - har->sin * (xn)) / har->rad; if (dist>1.0f) dist= 1.0f; if (har->tex) { zn= har->sin*xn - har->cos*yn; diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index 33523ab346f..c68fb578d4c 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -88,7 +88,7 @@ static int test_break(void *data) static void RE_rayobject_config_control(RayObject *r, Render *re) { if (RE_rayobject_isRayAPI(r)) { - r = RE_rayobject_align( r ); + r = RE_rayobject_align(r); r->control.data = re; r->control.test_break = test_break; } @@ -177,7 +177,7 @@ void freeraytree(Render *re) #ifdef RE_RAYCOUNTER { RayCounter sum; - memset( &sum, 0, sizeof(sum) ); + memset(&sum, 0, sizeof(sum)); int i; for (i=0; ivlaknodes[v>>8].vlak + (v&255); if (is_raytraceable_vlr(re, vlr)) { if ((re->r.raytrace_options & R_RAYTRACE_USE_LOCAL_COORDS)) { - RE_rayobject_add( raytree, RE_vlakprimitive_from_vlak( vlakprimitive, obi, vlr ) ); + RE_rayobject_add(raytree, RE_vlakprimitive_from_vlak(vlakprimitive, obi, vlr)); vlakprimitive++; } else { RE_rayface_from_vlak(face, obi, vlr); - RE_rayobject_add( raytree, RE_rayobject_unalignRayFace(face) ); + RE_rayobject_add(raytree, RE_rayobject_unalignRayFace(face)); face++; } } } - RE_rayobject_done( raytree ); + RE_rayobject_done(raytree); /* in case of cancel during build, raytree is not usable */ if (test_break(re)) @@ -355,7 +355,7 @@ static void makeraytree_single(Render *re) break; if (obj) - RE_rayobject_add( re->raytree, obj ); + RE_rayobject_add(re->raytree, obj); } else { int v; @@ -370,7 +370,7 @@ static void makeraytree_single(Render *re) if (is_raytraceable_vlr(re, vlr)) { if ((re->r.raytrace_options & R_RAYTRACE_USE_LOCAL_COORDS)) { RayObject *obj = RE_vlakprimitive_from_vlak( vlakprimitive, obi, vlr ); - RE_rayobject_add( raytree, obj ); + RE_rayobject_add(raytree, obj); vlakprimitive++; } else { @@ -383,7 +383,7 @@ static void makeraytree_single(Render *re) mul_m4_v3(obi->mat, face->v4); } - RE_rayobject_add( raytree, RE_rayobject_unalignRayFace(face) ); + RE_rayobject_add(raytree, RE_rayobject_unalignRayFace(face)); face++; } } @@ -395,7 +395,7 @@ static void makeraytree_single(Render *re) re->i.infostr= "Raytree.. building"; re->stats_draw(re->sdh, &re->i); - RE_rayobject_done( raytree ); + RE_rayobject_done(raytree); } } @@ -424,7 +424,7 @@ void makeraytree(Render *re) //Calculate raytree max_size //This is ONLY needed to kept a bogus behavior of SUN and HEMI lights INIT_MINMAX(min, max); - RE_rayobject_merge_bb( re->raytree, min, max ); + RE_rayobject_merge_bb(re->raytree, min, max); for (i=0; i<3; i++) { min[i] += 0.01f; max[i] += 0.01f; @@ -439,7 +439,7 @@ void makeraytree(Render *re) } #ifdef RE_RAYCOUNTER - memset( re_rc_counter, 0, sizeof(re_rc_counter) ); + memset(re_rc_counter, 0, sizeof(re_rc_counter)); #endif } @@ -692,7 +692,7 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, con float dist_mir = origshi->mat->dist_mir; copy_v3_v3(isec.start, start); - copy_v3_v3(isec.dir, dir ); + copy_v3_v3(isec.dir, dir); isec.dist = dist_mir > 0 ? dist_mir : RE_RAYTRACE_MAXDIST; isec.mode= RE_RAY_MIRROR; isec.check = RE_CHECK_VLR_RENDER; @@ -1239,7 +1239,7 @@ static int adaptive_sample_contrast_val(int samples, float prev, float val, floa /* if the last sample's contribution to the total value was below a small threshold * (i.e. the samples taken are very similar), then taking more samples that are probably * going to be the same is wasting effort */ - if (fabsf( prev/(float)(samples-1) - val/(float)samples ) < thresh) { + if (fabsf(prev / (float)(samples - 1) - val / (float)samples ) < thresh) { return 1; } else @@ -1679,7 +1679,7 @@ static int UNUSED_FUNCTION(ray_trace_shadow_rad)(ShadeInput *ship, ShadeResult * vec[2]-= vec[2]; } - copy_v3_v3(isec.dir, vec ); + copy_v3_v3(isec.dir, vec); isec.dist = RE_RAYTRACE_MAXDIST; if (RE_rayobject_raycast(R.raytree, &isec)) { @@ -1889,7 +1889,7 @@ static void ray_ao_qmc(ShadeInput *shi, float ao[3], float env[3]) isec.lay= -1; copy_v3_v3(isec.start, shi->co); - RE_rayobject_hint_bb( R.raytree, &point_hint, isec.start, isec.start ); + RE_rayobject_hint_bb(R.raytree, &point_hint, isec.start, isec.start); isec.hint = &point_hint; zero_v3(ao); @@ -2029,7 +2029,7 @@ static void ray_ao_spheresamp(ShadeInput *shi, float ao[3], float env[3]) isec.lay= -1; copy_v3_v3(isec.start, shi->co); - RE_rayobject_hint_bb( R.raytree, &point_hint, isec.start, isec.start ); + RE_rayobject_hint_bb(R.raytree, &point_hint, isec.start, isec.start); isec.hint = &point_hint; zero_v3(ao); @@ -2237,7 +2237,7 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, const float lampco[3], for (i=0; ihint = &bb_hint; isec->check = RE_CHECK_VLR_RENDER; @@ -2386,7 +2386,7 @@ static void ray_shadow_jitter(ShadeInput *shi, LampRen *lar, const float lampco[ copy_v3_v3(isec->start, shi->co); isec->orig.ob = shi->obi; isec->orig.face = shi->vlr; - RE_rayobject_hint_bb( R.raytree, &point_hint, isec->start, isec->start ); + RE_rayobject_hint_bb(R.raytree, &point_hint, isec->start, isec->start); isec->hint = &point_hint; while (a--) { diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index fce22c388e5..521b295fb0b 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -970,7 +970,7 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d fy = (t[1] + 1.0f) / 2.0f; } else if (wrap==MTEX_TUBE) map_to_tube( &fx, &fy, t[0], t[1], t[2]); - else if (wrap==MTEX_SPHERE) map_to_sphere( &fx, &fy, t[0], t[1], t[2]); + else if (wrap==MTEX_SPHERE) map_to_sphere(&fx, &fy, t[0], t[1], t[2]); else { if (texco==TEXCO_OBJECT) cubemap_ob(ob, n, t[0], t[1], t[2], &fx, &fy); else if (texco==TEXCO_GLOB) cubemap_glob(n, t[0], t[1], t[2], &fx, &fy); @@ -1041,20 +1041,20 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d } if (ok) { if (wrap==MTEX_TUBE) { - map_to_tube( area, area+1, t[0], t[1], t[2]); - map_to_tube( area+2, area+3, t[0]+dxt[0], t[1]+dxt[1], t[2]+dxt[2]); - map_to_tube( area+4, area+5, t[0]+dyt[0], t[1]+dyt[1], t[2]+dyt[2]); + map_to_tube(area, area+1, t[0], t[1], t[2]); + map_to_tube(area + 2, area + 3, t[0] + dxt[0], t[1] + dxt[1], t[2] + dxt[2]); + map_to_tube(area + 4, area + 5, t[0] + dyt[0], t[1] + dyt[1], t[2] + dyt[2]); } else { map_to_sphere(area, area+1, t[0], t[1], t[2]); - map_to_sphere( area+2, area+3, t[0]+dxt[0], t[1]+dxt[1], t[2]+dxt[2]); - map_to_sphere( area+4, area+5, t[0]+dyt[0], t[1]+dyt[1], t[2]+dyt[2]); + map_to_sphere(area + 2, area + 3, t[0] + dxt[0], t[1] + dxt[1], t[2] + dxt[2]); + map_to_sphere(area + 4, area + 5, t[0] + dyt[0], t[1] + dyt[1], t[2] + dyt[2]); } areaflag= 1; } else { if (wrap==MTEX_TUBE) map_to_tube( &fx, &fy, t[0], t[1], t[2]); - else map_to_sphere( &fx, &fy, t[0], t[1], t[2]); + else map_to_sphere(&fx, &fy, t[0], t[1], t[2]); dxt[0]/= 2.0f; dxt[1]/= 2.0f; dyt[0]/= 2.0f; @@ -2102,9 +2102,9 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T // generate the surface derivatives in object space mul_m3_v3(view2obj, dPdx); - mul_m3_v3( view2obj, dPdy ); + mul_m3_v3(view2obj, dPdy); // generate the unit normal in object space - mul_transposed_m3_v3( obj2view, vN ); + mul_transposed_m3_v3(obj2view, vN); normalize_v3(vN); } @@ -2126,9 +2126,9 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T fMagnitude = abs_fDet; if ( mtex->texflag & MTEX_BUMP_OBJECTSPACE ) { // pre do transform of texres->nor by the inverse transposed of obj2view - mul_transposed_m3_v3( view2obj, vN ); - mul_transposed_m3_v3( view2obj, ntap_bump->vR1 ); - mul_transposed_m3_v3( view2obj, ntap_bump->vR2 ); + mul_transposed_m3_v3(view2obj, vN); + mul_transposed_m3_v3(view2obj, ntap_bump->vR1); + mul_transposed_m3_v3(view2obj, ntap_bump->vR2); fMagnitude *= len_v3(vN); } @@ -3078,7 +3078,7 @@ void do_sky_tex(const float rco[3], float lo[3], const float dxyview[2], float h case TEXCO_H_TUBEMAP: if (skyflag & WO_ZENUP) { if (mtex->texco==TEXCO_H_TUBEMAP) map_to_tube( tempvec, tempvec+1, lo[0], lo[2], lo[1]); - else map_to_sphere( tempvec, tempvec+1, lo[0], lo[2], lo[1]); + else map_to_sphere(tempvec, tempvec+1, lo[0], lo[2], lo[1]); /* tube/spheremap maps for outside view, not inside */ tempvec[0]= 1.0f-tempvec[0]; /* only top half */ diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c index 4956eedbb87..1c572524a70 100644 --- a/source/blender/render/intern/source/shadbuf.c +++ b/source/blender/render/intern/source/shadbuf.c @@ -319,7 +319,7 @@ static void compress_deepshadowbuf(Render *re, ShadBuf *shb, APixstr *apixbuf, A int a, b, c, tot, minz, found, prevtot, newtot; int sampletot[RE_MAX_OSA], totsample = 0, totsamplec = 0; - shsample= MEM_callocN( sizeof(ShadSampleBuf), "shad sample buf"); + shsample= MEM_callocN(sizeof(ShadSampleBuf), "shad sample buf"); BLI_addtail(&shb->buffers, shsample); shsample->totbuf= MEM_callocN(sizeof(int)*size*size, "deeptotbuf"); @@ -511,11 +511,11 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square) int a, x, y, minx, miny, byt1, byt2; char *rc, *rcline, *ctile, *zt; - shsample= MEM_callocN( sizeof(ShadSampleBuf), "shad sample buf"); + shsample= MEM_callocN(sizeof(ShadSampleBuf), "shad sample buf"); BLI_addtail(&shb->buffers, shsample); - shsample->zbuf= MEM_mallocN( sizeof(uintptr_t)*(size*size)/256, "initshadbuf2"); - shsample->cbuf= MEM_callocN( (size*size)/256, "initshadbuf3"); + shsample->zbuf= MEM_mallocN(sizeof(uintptr_t)*(size*size)/256, "initshadbuf2"); + shsample->cbuf= MEM_callocN((size*size)/256, "initshadbuf3"); ztile= (uintptr_t *)shsample->zbuf; ctile= shsample->cbuf; @@ -779,7 +779,7 @@ void makeshadowbuf(Render *re, LampRen *lar) shb->pixsize= (shb->d)/temp; wsize= shb->pixsize*(shb->size/2.0f); - perspective_m4( shb->winmat, -wsize, wsize, -wsize, wsize, shb->d, shb->clipend); + perspective_m4(shb->winmat, -wsize, wsize, -wsize, wsize, shb->d, shb->clipend); mult_m4_m4m4(shb->persmat, shb->winmat, shb->viewmat); if (ELEM3(lar->buftype, LA_SHADBUF_REGULAR, LA_SHADBUF_HALFWAY, LA_SHADBUF_DEEP)) { @@ -2160,8 +2160,8 @@ static int isb_add_samples(RenderPart *pa, ISBBranch *root, MemArena *memarena, int sample, bsp_err= 0; /* bsp split doesn't like to handle regular sequences */ - xcos= MEM_mallocN( pa->rectx*sizeof(int), "xcos"); - ycos= MEM_mallocN( pa->recty*sizeof(int), "ycos"); + xcos= MEM_mallocN(pa->rectx*sizeof(int), "xcos"); + ycos= MEM_mallocN(pa->recty*sizeof(int), "ycos"); for (xi=0; xirectx; xi++) xcos[xi]= xi; for (yi=0; yirecty; yi++) @@ -2364,8 +2364,8 @@ static int isb_add_samples_transp(RenderPart *pa, ISBBranch *root, MemArena *mem int sample, bsp_err= 0; /* bsp split doesn't like to handle regular sequences */ - xcos= MEM_mallocN( pa->rectx*sizeof(int), "xcos"); - ycos= MEM_mallocN( pa->recty*sizeof(int), "ycos"); + xcos= MEM_mallocN(pa->rectx*sizeof(int), "xcos"); + ycos= MEM_mallocN(pa->recty*sizeof(int), "ycos"); for (xi=0; xirectx; xi++) xcos[xi]= xi; for (yi=0; yirecty; yi++) diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index e74041c9006..53d06893a3f 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -550,7 +550,7 @@ static float spec(float inp, int hard) return inp; } -static float Phong_Spec( float *n, float *l, float *v, int hard, int tangent ) +static float Phong_Spec(float *n, float *l, float *v, int hard, int tangent ) { float h[3]; float rslt; @@ -638,7 +638,7 @@ static float Blinn_Spec(float *n, float *l, float *v, float refrac, float spec_p else if ( b < a && b < c ) g = b; else if ( c < a && c < b ) g = c; - p = sqrt( (double)((refrac * refrac)+(vh*vh)-1.0f) ); + p = sqrt((double)((refrac * refrac)+(vh * vh) - 1.0f)); f = (((p-vh)*(p-vh))/((p+vh)*(p+vh)))*(1+((((vh*(p+vh))-1.0f)*((vh*(p+vh))-1.0f))/(((vh*(p-vh))+1.0f)*((vh*(p-vh))+1.0f)))); ang = saacos(nh); @@ -649,7 +649,7 @@ static float Blinn_Spec(float *n, float *l, float *v, float refrac, float spec_p } /* cartoon render spec */ -static float Toon_Spec( float *n, float *l, float *v, float size, float smooth, int tangent) +static float Toon_Spec(float *n, float *l, float *v, float size, float smooth, int tangent) { float h[3]; float ang; @@ -673,7 +673,7 @@ static float Toon_Spec( float *n, float *l, float *v, float size, float smooth, } /* Ward isotropic gaussian spec */ -static float WardIso_Spec( float *n, float *l, float *v, float rms, int tangent) +static float WardIso_Spec(float *n, float *l, float *v, float rms, int tangent) { float i, nh, nv, nl, h[3], angle, alpha; @@ -705,7 +705,7 @@ static float WardIso_Spec( float *n, float *l, float *v, float rms, int tangent) } /* cartoon render diffuse */ -static float Toon_Diff( float *n, float *l, float *UNUSED(v), float size, float smooth ) +static float Toon_Diff(float *n, float *l, float *UNUSED(v), float size, float smooth) { float rslt, ang; @@ -754,12 +754,12 @@ static float OrenNayar_Diff(float nl, float *n, float *l, float *v, float rough Lit_B[0] = l[0] - (realnl * n[0]); Lit_B[1] = l[1] - (realnl * n[1]); Lit_B[2] = l[2] - (realnl * n[2]); - normalize_v3( Lit_B ); + normalize_v3(Lit_B); View_B[0] = v[0] - (nv * n[0]); View_B[1] = v[1] - (nv * n[1]); View_B[2] = v[2] - (nv * n[2]); - normalize_v3( View_B ); + normalize_v3(View_B); t = Lit_B[0]*View_B[0] + Lit_B[1]*View_B[1] + Lit_B[2]*View_B[2]; if ( t < 0 ) t = 0; diff --git a/source/blender/render/intern/source/sunsky.c b/source/blender/render/intern/source/sunsky.c index 5f274e379ad..5d0e7c1d4c8 100644 --- a/source/blender/render/intern/source/sunsky.c +++ b/source/blender/render/intern/source/sunsky.c @@ -340,7 +340,7 @@ static void ComputeAttenuatedSunlight(float theta, int turbidity, float fTau[3]) for (i = 0; i < 3; i++) { // Rayleigh Scattering - fTauR = expf( -m * 0.008735f * powf(fLambda[i], (float)(-4.08f))); + fTauR = expf(-m * 0.008735f * powf(fLambda[i], (float)(-4.08f))); // Aerosal (water + dust) attenuation fTauA = exp(-m * fBeta * powf(fLambda[i], -fAlpha)); @@ -434,7 +434,7 @@ void InitAtmosphere(struct SunSky *sunSky, float sun_intens, float mief, float r * s, is distance * rgb, contains rendered color value for a pixle * */ -void AtmospherePixleShader( struct SunSky* sunSky, float view[3], float s, float rgb[3]) +void AtmospherePixleShader(struct SunSky* sunSky, float view[3], float s, float rgb[3]) { float costheta; float Phase_1; diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c index e63c9b7b4dd..c51cb2af842 100644 --- a/source/blender/render/intern/source/volumetric.c +++ b/source/blender/render/intern/source/volumetric.c @@ -97,7 +97,7 @@ static float vol_get_shadow(ShadeInput *shi, LampRen *lar, const float co[3]) } else { sub_v3_v3v3(is.dir, lar->co, is.start); - is.dist = normalize_v3( is.dir ); + is.dist = normalize_v3(is.dir ); } is.mode = RE_RAY_MIRROR; diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 7fbdce097a9..9ae0a88151c 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -2326,10 +2326,10 @@ static int border_apply_rect(wmOperator *op) /* operator arguments and storage. */ - RNA_int_set(op->ptr, "xmin", MIN2(rect->xmin, rect->xmax) ); - RNA_int_set(op->ptr, "ymin", MIN2(rect->ymin, rect->ymax) ); - RNA_int_set(op->ptr, "xmax", MAX2(rect->xmin, rect->xmax) ); - RNA_int_set(op->ptr, "ymax", MAX2(rect->ymin, rect->ymax) ); + RNA_int_set(op->ptr, "xmin", MIN2(rect->xmin, rect->xmax)); + RNA_int_set(op->ptr, "ymin", MIN2(rect->ymin, rect->ymax)); + RNA_int_set(op->ptr, "xmax", MAX2(rect->xmin, rect->xmax)); + RNA_int_set(op->ptr, "ymax", MAX2(rect->ymin, rect->ymax)); return 1; } diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c index 90d490dc279..a036e8a8212 100644 --- a/source/blenderplayer/bad_level_call_stubs/stubs.c +++ b/source/blenderplayer/bad_level_call_stubs/stubs.c @@ -122,11 +122,11 @@ void EDBM_mesh_normals_update(struct BMEditMesh *em) {} void *g_system; struct Heap* BLI_heap_new (void){return NULL;} -void BLI_heap_free (struct Heap *heap, void *ptrfreefp) {} +void BLI_heap_free(struct Heap *heap, void *ptrfreefp) {} struct HeapNode* BLI_heap_insert (struct Heap *heap, float value, void *ptr){return NULL;} -void BLI_heap_remove (struct Heap *heap, struct HeapNode *node) {} -int BLI_heap_empty (struct Heap *heap) {return 0;} -int BLI_heap_size (struct Heap *heap){return 0;} +void BLI_heap_remove(struct Heap *heap, struct HeapNode *node) {} +int BLI_heap_empty(struct Heap *heap) {return 0;} +int BLI_heap_size(struct Heap *heap){return 0;} struct HeapNode* BLI_heap_top (struct Heap *heap){return NULL;} void* BLI_heap_popmin (struct Heap *heap){return NULL;} @@ -191,7 +191,7 @@ float *give_cursor(struct Scene *scene, struct View3D *v3d){return (float *) NUL void WM_menutype_free(void){} void WM_menutype_freelink(struct MenuType* mt){} int WM_menutype_add(struct MenuType *mt) {return 0;} -int WM_operator_props_dialog_popup (struct bContext *C, struct wmOperator *op, int width, int height){return 0;} +int WM_operator_props_dialog_popup(struct bContext *C, struct wmOperator *op, int width, int height){return 0;} int WM_operator_confirm(struct bContext *C, struct wmOperator *op, struct wmEvent *event){return 0;} struct MenuType *WM_menutype_find(const char *idname, int quiet){return (struct MenuType *) NULL;} void WM_operator_stack_clear(struct bContext *C) {} @@ -211,7 +211,7 @@ struct wmEventHandler *WM_event_add_modal_handler(struct bContext *C, struct wmO struct wmTimer *WM_event_add_timer(struct wmWindowManager *wm, struct wmWindow *win, int event_type, double timestep){return (struct wmTimer *)NULL;} void WM_event_remove_timer(struct wmWindowManager *wm, struct wmWindow *win, struct wmTimer *timer){} void ED_armature_edit_bone_remove(struct bArmature *arm, struct EditBone *exBone){} -void object_test_constraints (struct Object *owner){} +void object_test_constraints(struct Object *owner){} void ED_object_parent(struct Object *ob, struct Object *par, int type, const char *substr){} void ED_object_constraint_set_active(struct Object *ob, struct bConstraint *con){} void ED_node_composit_default(struct Scene *sce){} @@ -271,11 +271,11 @@ struct KeyingSetInfo *ANIM_keyingset_info_find_named (const char name[]){return struct KeyingSet *ANIM_scene_get_active_keyingset (struct Scene *scene){return (struct KeyingSet *) NULL;} int ANIM_scene_get_keyingset_index(struct Scene *scene, struct KeyingSet *ks){return 0;} struct ListBase builtin_keyingsets; -void ANIM_keyingset_info_register (struct KeyingSetInfo *ksi){} -void ANIM_keyingset_info_unregister (const struct bContext *C, struct KeyingSetInfo *ksi){} -short ANIM_validate_keyingset (struct bContext *C, struct ListBase *dsources, struct KeyingSet *ks){return 0;} +void ANIM_keyingset_info_register(struct KeyingSetInfo *ksi){} +void ANIM_keyingset_info_unregister(const struct bContext *C, struct KeyingSetInfo *ksi){} +short ANIM_validate_keyingset(struct bContext *C, struct ListBase *dsources, struct KeyingSet *ks){return 0;} short ANIM_add_driver(struct ID *id, const char rna_path[], int array_index, short flag, int type){return 0;} -short ANIM_remove_driver (struct ID *id, const char rna_path[], int array_index, short flag){return 0;} +short ANIM_remove_driver(struct ID *id, const char rna_path[], int array_index, short flag){return 0;} void ED_space_image_release_buffer(struct SpaceImage *sima, void *lock){} struct ImBuf *ED_space_image_acquire_buffer(struct SpaceImage *sima, void **lock_r){return (struct ImBuf *) NULL;} void ED_space_image_zoom(struct SpaceImage *sima, struct ARegion *ar, float *zoomx, float *zoomy) {} @@ -285,7 +285,7 @@ void ED_area_tag_refresh(struct ScrArea *sa){} void ED_area_newspace(struct bContext *C, struct ScrArea *sa, int type){} void ED_region_tag_redraw(struct ARegion *ar){} void WM_event_add_fileselect(struct bContext *C, struct wmOperator *op){} -void WM_cursor_wait (int val) {} +void WM_cursor_wait(int val) {} void ED_node_texture_default(struct Tex *tx){} void ED_node_changed_update(struct bContext *C, struct bNode *node){} void ED_node_generic_update(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node){} @@ -358,8 +358,8 @@ void ED_nurb_set_spline_type(struct Nurb *nu, int type){} void make_editLatt(struct Object *obedit){} void load_editLatt(struct Object *obedit){} -void load_editNurb (struct Object *obedit){} -void make_editNurb (struct Object *obedit){} +void load_editNurb(struct Object *obedit){} +void make_editNurb(struct Object *obedit){} void uiItemR(struct uiLayout *layout, struct PointerRNA *ptr, char *propname, int flag, char *name, int icon){} @@ -469,7 +469,7 @@ void WM_operatortype_append_macro_ptr(void (*opfunc)(struct wmOperatorType*, voi void WM_operator_bl_idname(char *to, const char *from){} void WM_operator_py_idname(char *to, const char *from){} void WM_operator_ui_popup(struct bContext *C, struct wmOperator *op, int width, int height){} -short insert_keyframe (struct ID *id, struct bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag){return 0;} +short insert_keyframe(struct ID *id, struct bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag){return 0;} short delete_keyframe(struct ID *id, struct bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag){return 0;}; char *WM_operator_pystring(struct bContext *C, struct wmOperatorType *ot, struct PointerRNA *opptr, int all_args){return (char *)NULL;} struct wmKeyMapItem *WM_modalkeymap_add_item(struct wmKeyMap *km, int type, int val, int modifier, int keymodifier, int value){return (struct wmKeyMapItem *)NULL;} diff --git a/source/gameengine/Ketsji/BL_Shader.h b/source/gameengine/Ketsji/BL_Shader.h index 3015dd204c8..47221365816 100644 --- a/source/gameengine/Ketsji/BL_Shader.h +++ b/source/gameengine/Ketsji/BL_Shader.h @@ -231,30 +231,30 @@ public: virtual PyObject* py_repr(void) { return PyUnicode_FromFormat("BL_Shader\n\tvertex shader:%s\n\n\tfragment shader%s\n\n", vertProg, fragProg); } // ----------------------------------- - KX_PYMETHOD_DOC( BL_Shader, setSource ); - KX_PYMETHOD_DOC( BL_Shader, delSource ); - KX_PYMETHOD_DOC( BL_Shader, getVertexProg ); - KX_PYMETHOD_DOC( BL_Shader, getFragmentProg ); - KX_PYMETHOD_DOC( BL_Shader, setNumberOfPasses ); - KX_PYMETHOD_DOC( BL_Shader, isValid); - KX_PYMETHOD_DOC( BL_Shader, validate); + KX_PYMETHOD_DOC(BL_Shader, setSource); + KX_PYMETHOD_DOC(BL_Shader, delSource); + KX_PYMETHOD_DOC(BL_Shader, getVertexProg); + KX_PYMETHOD_DOC(BL_Shader, getFragmentProg); + KX_PYMETHOD_DOC(BL_Shader, setNumberOfPasses); + KX_PYMETHOD_DOC(BL_Shader, isValid); + KX_PYMETHOD_DOC(BL_Shader, validate); // ----------------------------------- - KX_PYMETHOD_DOC( BL_Shader, setUniform4f ); - KX_PYMETHOD_DOC( BL_Shader, setUniform3f ); - KX_PYMETHOD_DOC( BL_Shader, setUniform2f ); - KX_PYMETHOD_DOC( BL_Shader, setUniform1f ); - KX_PYMETHOD_DOC( BL_Shader, setUniform4i ); - KX_PYMETHOD_DOC( BL_Shader, setUniform3i ); - KX_PYMETHOD_DOC( BL_Shader, setUniform2i ); - KX_PYMETHOD_DOC( BL_Shader, setUniform1i ); - KX_PYMETHOD_DOC( BL_Shader, setUniformfv ); - KX_PYMETHOD_DOC( BL_Shader, setUniformiv ); - KX_PYMETHOD_DOC( BL_Shader, setUniformMatrix4 ); - KX_PYMETHOD_DOC( BL_Shader, setUniformMatrix3 ); - KX_PYMETHOD_DOC( BL_Shader, setUniformDef ); - KX_PYMETHOD_DOC( BL_Shader, setAttrib ); - KX_PYMETHOD_DOC( BL_Shader, setSampler); + KX_PYMETHOD_DOC(BL_Shader, setUniform4f); + KX_PYMETHOD_DOC(BL_Shader, setUniform3f); + KX_PYMETHOD_DOC(BL_Shader, setUniform2f); + KX_PYMETHOD_DOC(BL_Shader, setUniform1f); + KX_PYMETHOD_DOC(BL_Shader, setUniform4i); + KX_PYMETHOD_DOC(BL_Shader, setUniform3i); + KX_PYMETHOD_DOC(BL_Shader, setUniform2i); + KX_PYMETHOD_DOC(BL_Shader, setUniform1i); + KX_PYMETHOD_DOC(BL_Shader, setUniformfv); + KX_PYMETHOD_DOC(BL_Shader, setUniformiv); + KX_PYMETHOD_DOC(BL_Shader, setUniformMatrix4); + KX_PYMETHOD_DOC(BL_Shader, setUniformMatrix3); + KX_PYMETHOD_DOC(BL_Shader, setUniformDef); + KX_PYMETHOD_DOC(BL_Shader, setAttrib); + KX_PYMETHOD_DOC(BL_Shader, setSampler); #endif }; diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.h b/source/gameengine/Ketsji/KX_BlenderMaterial.h index af6771933eb..3a6dda06320 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.h +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.h @@ -113,12 +113,12 @@ public: static PyObject* pyattr_get_blending(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_blending(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); - KX_PYMETHOD_DOC( KX_BlenderMaterial, getShader ); - KX_PYMETHOD_DOC( KX_BlenderMaterial, getMaterialIndex ); - KX_PYMETHOD_DOC( KX_BlenderMaterial, getTexture ); - KX_PYMETHOD_DOC( KX_BlenderMaterial, setTexture ); + KX_PYMETHOD_DOC(KX_BlenderMaterial, getShader); + KX_PYMETHOD_DOC(KX_BlenderMaterial, getMaterialIndex); + KX_PYMETHOD_DOC(KX_BlenderMaterial, getTexture); + KX_PYMETHOD_DOC(KX_BlenderMaterial, setTexture); - KX_PYMETHOD_DOC( KX_BlenderMaterial, setBlending ); + KX_PYMETHOD_DOC(KX_BlenderMaterial, setBlending); #endif // WITH_PYTHON // -------------------------------- diff --git a/source/gameengine/Ketsji/KX_FontObject.h b/source/gameengine/Ketsji/KX_FontObject.h index affa882427f..30fe89162c0 100644 --- a/source/gameengine/Ketsji/KX_FontObject.h +++ b/source/gameengine/Ketsji/KX_FontObject.h @@ -39,10 +39,10 @@ class KX_FontObject : public KX_GameObject { public: Py_Header - KX_FontObject( void* sgReplicationInfo, - SG_Callbacks callbacks, - RAS_IRenderTools* rendertools, - Object *ob); + KX_FontObject(void* sgReplicationInfo, + SG_Callbacks callbacks, + RAS_IRenderTools* rendertools, + Object *ob); virtual ~KX_FontObject(); diff --git a/source/gameengine/Ketsji/KX_PyMath.h b/source/gameengine/Ketsji/KX_PyMath.h index 392a6633067..b0000405893 100644 --- a/source/gameengine/Ketsji/KX_PyMath.h +++ b/source/gameengine/Ketsji/KX_PyMath.h @@ -108,7 +108,7 @@ bool PyMatTo(PyObject* pymat, T& mat) noerror = false; else { - for( unsigned int col = 0; col < cols; col++) + for(unsigned int col = 0; col < cols; col++) { PyObject *item = PySequence_GetItem(pyrow, col); /* new ref */ mat[row][col] = PyFloat_AsDouble(item); diff --git a/source/gameengine/Rasterizer/RAS_ICanvas.h b/source/gameengine/Rasterizer/RAS_ICanvas.h index 337ea247ce3..dae70c5c343 100644 --- a/source/gameengine/Rasterizer/RAS_ICanvas.h +++ b/source/gameengine/Rasterizer/RAS_ICanvas.h @@ -133,25 +133,25 @@ public: virtual int - GetMouseX( int x + GetMouseX(int x )=0; virtual int - GetMouseY( int y + GetMouseY(int y )= 0; virtual float - GetMouseNormalizedX( int x + GetMouseNormalizedX(int x )=0; virtual float - GetMouseNormalizedY( int y + GetMouseNormalizedY(int y )= 0; - virtual + virtual const RAS_Rect & GetDisplayArea( ) const = 0; -- cgit v1.2.3