diff options
35 files changed, 129 insertions, 131 deletions
diff --git a/source/blender/blenfont/intern/blf_translation.c b/source/blender/blenfont/intern/blf_translation.c index 0ddb6549717..201722acdbf 100644 --- a/source/blender/blenfont/intern/blf_translation.c +++ b/source/blender/blenfont/intern/blf_translation.c @@ -94,7 +94,7 @@ const char* BLF_gettext(const char *msgid) { #ifdef WITH_INTERNATIONAL if( msgid[0] ) - return gettext( msgid ); + return gettext(msgid); return ""; #else return msgid; diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 98e273f59b2..435832f8c87 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -198,32 +198,32 @@ int cloth_bvh_objcollision (struct Object *ob, struct ClothModifierData * clmd, //////////////////////////////////////////////// // needed for cloth.c -int implicit_init ( struct Object *ob, struct ClothModifierData *clmd ); -int implicit_free ( struct ClothModifierData *clmd ); -int implicit_solver ( struct Object *ob, float frame, struct ClothModifierData *clmd, struct ListBase *effectors ); -void implicit_set_positions ( struct ClothModifierData *clmd ); +int implicit_init (struct Object *ob, struct ClothModifierData *clmd ); +int implicit_free (struct ClothModifierData *clmd ); +int implicit_solver (struct Object *ob, float frame, struct ClothModifierData *clmd, struct ListBase *effectors ); +void implicit_set_positions (struct ClothModifierData *clmd ); ///////////////////////////////////////////////// // cloth.c //////////////////////////////////////////////// // needed for modifier.c -void cloth_free_modifier_extern ( struct ClothModifierData *clmd ); -void cloth_free_modifier ( struct ClothModifierData *clmd ); -void cloth_init ( struct ClothModifierData *clmd ); -void clothModifier_do ( struct ClothModifierData *clmd, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm, float (*vertexCos)[3]); +void cloth_free_modifier_extern (struct ClothModifierData *clmd ); +void cloth_free_modifier (struct ClothModifierData *clmd ); +void cloth_init (struct ClothModifierData *clmd ); +void clothModifier_do (struct ClothModifierData *clmd, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm, float (*vertexCos)[3]); int cloth_uses_vgroup(struct ClothModifierData *clmd); // needed for collision.c -void bvhtree_update_from_cloth ( struct ClothModifierData *clmd, int moving ); -void bvhselftree_update_from_cloth ( struct ClothModifierData *clmd, int moving ); +void bvhtree_update_from_cloth (struct ClothModifierData *clmd, int moving ); +void bvhselftree_update_from_cloth (struct ClothModifierData *clmd, int moving ); // needed for button_object.c -void cloth_clear_cache ( struct Object *ob, struct ClothModifierData *clmd, float framenr ); +void cloth_clear_cache (struct Object *ob, struct ClothModifierData *clmd, float framenr ); // needed for cloth.c -int cloth_add_spring ( struct ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type); +int cloth_add_spring (struct ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type); //////////////////////////////////////////////// @@ -242,9 +242,9 @@ typedef struct { const char *name; CM_SOLVER_ID id; - int ( *init ) ( struct Object *ob, struct ClothModifierData *clmd ); - int ( *solver ) ( struct Object *ob, float framenr, struct ClothModifierData *clmd, struct ListBase *effectors ); - int ( *free ) ( struct ClothModifierData *clmd ); + int ( *init ) (struct Object *ob, struct ClothModifierData *clmd ); + int ( *solver ) (struct Object *ob, float framenr, struct ClothModifierData *clmd, struct ListBase *effectors ); + int ( *free ) (struct ClothModifierData *clmd ); } CM_SOLVER_DEF; diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h index 75fdc4981a0..d20417d5604 100644 --- a/source/blender/blenkernel/BKE_collision.h +++ b/source/blender/blenkernel/BKE_collision.h @@ -130,14 +130,14 @@ FaceCollPair; // used in modifier.c from collision.c ///////////////////////////////////////////////// -BVHTree *bvhtree_build_from_mvert ( struct MFace *mfaces, unsigned int numfaces, struct MVert *x, unsigned int numverts, float epsilon ); -void bvhtree_update_from_mvert ( BVHTree * bvhtree, struct MFace *faces, int numfaces, struct MVert *x, struct MVert *xnew, int numverts, int moving ); +BVHTree *bvhtree_build_from_mvert(struct MFace *mfaces, unsigned int numfaces, struct MVert *x, unsigned int numverts, float epsilon ); +void bvhtree_update_from_mvert(BVHTree * bvhtree, struct MFace *faces, int numfaces, struct MVert *x, struct MVert *xnew, int numverts, int moving ); ///////////////////////////////////////////////// // move Collision modifier object inter-frame with step = [0,1] // defined in collisions.c -void collision_move_object ( struct CollisionModifierData *collmd, float step, float prevstep ); +void collision_move_object(struct CollisionModifierData *collmd, float step, float prevstep); ///////////////////////////////////////////////// // used in effect.c diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index dd0c021f281..fa3a1a6897a 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -54,27 +54,27 @@ struct Scene; #define CU_DO_RADIUS(cu, nu) ((CU_DO_TILT(cu, nu) || ((cu)->flag & CU_PATH_RADIUS) || (cu)->bevobj || (cu)->ext1!=0.0f || (cu)->ext2!=0.0f) ? 1:0) -void unlink_curve( struct Curve *cu); +void unlink_curve(struct Curve *cu); void free_curve_editNurb_keyIndex(struct EditNurb *editnurb); void free_curve_editNurb(struct Curve *cu); -void free_curve( struct Curve *cu); +void free_curve(struct Curve *cu); void BKE_free_editfont(struct Curve *cu); struct Curve *add_curve(const char *name, int type); -struct Curve *copy_curve( struct Curve *cu); -void make_local_curve( struct Curve *cu); +struct Curve *copy_curve(struct Curve *cu); +void make_local_curve(struct Curve *cu); struct ListBase *curve_editnurbs(struct Curve *cu); -short curve_type( struct Curve *cu); -void test_curve_type( struct Object *ob); -void update_curve_dimension( struct Curve *cu ); -void tex_space_curve( struct Curve *cu); -int count_curveverts( struct ListBase *nurb); -int count_curveverts_without_handles( struct ListBase *nurb); -void freeNurb( struct Nurb *nu); -void freeNurblist( struct ListBase *lb); -struct Nurb *duplicateNurb( struct Nurb *nu); -void duplicateNurblist( struct ListBase *lb1, struct ListBase *lb2); -void test2DNurb( struct Nurb *nu); -void minmaxNurb( struct Nurb *nu, float *min, float *max); +short curve_type(struct Curve *cu); +void test_curve_type(struct Object *ob); +void update_curve_dimension(struct Curve *cu ); +void tex_space_curve(struct Curve *cu); +int count_curveverts(struct ListBase *nurb); +int count_curveverts_without_handles(struct ListBase *nurb); +void freeNurb(struct Nurb *nu); +void freeNurblist(struct ListBase *lb); +struct Nurb *duplicateNurb(struct Nurb *nu); +void duplicateNurblist(struct ListBase *lb1, struct ListBase *lb2); +void test2DNurb(struct Nurb *nu); +void minmaxNurb(struct Nurb *nu, float *min, float *max); void nurbs_knot_calc_u(struct Nurb *nu); void nurbs_knot_calc_v(struct Nurb *nu); @@ -83,19 +83,19 @@ void makeNurbfaces(struct Nurb *nu, float *coord_array, int rowstride, int resol void makeNurbcurve(struct Nurb *nu, float *coord_array, float *tilt_array, float *radius_array, float *weight_array, int resolu, int stride); void forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride); float *make_orco_curve(struct Scene *scene, struct Object *ob); -float *make_orco_surf( struct Object *ob); +float *make_orco_surf(struct Object *ob); void makebevelcurve(struct Scene *scene, struct Object *ob, struct ListBase *disp, int forRender); -void makeBevelList( struct Object *ob); +void makeBevelList(struct Object *ob); -void calchandleNurb( struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, int mode); -void calchandlesNurb( struct Nurb *nu); -void testhandlesNurb( struct Nurb *nu); -void autocalchandlesNurb( struct Nurb *nu, int flag); +void calchandleNurb(struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, int mode); +void calchandlesNurb(struct Nurb *nu); +void testhandlesNurb(struct Nurb *nu); +void autocalchandlesNurb(struct Nurb *nu, int flag); void autocalchandlesNurb_all(ListBase *editnurb, int flag); void sethandlesNurb(ListBase *editnurb, short code); -void switchdirectionNurb( struct Nurb *nu); +void switchdirectionNurb(struct Nurb *nu); void addNurbPoints(struct Nurb *nu, int number); void addNurbPointsBezier(struct Nurb *nu, int number); @@ -107,11 +107,11 @@ float (*curve_getKeyVertexCos(struct Curve *cu, struct ListBase *lb, float *key) void curve_applyKeyVertexTilts(struct Curve *cu, struct ListBase *lb, float *key); /* nurb checks if they can be drawn, also clamp order func */ -int check_valid_nurb_u( struct Nurb *nu); -int check_valid_nurb_v( struct Nurb *nu); +int check_valid_nurb_u(struct Nurb *nu); +int check_valid_nurb_v(struct Nurb *nu); -int clamp_nurb_order_u( struct Nurb *nu); -int clamp_nurb_order_v( struct Nurb *nu); +int clamp_nurb_order_u(struct Nurb *nu); +int clamp_nurb_order_v(struct Nurb *nu); ListBase *BKE_curve_nurbs(struct Curve *cu); diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 4c683b2b2c8..235bc695b66 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -80,8 +80,6 @@ static DerivedMesh *navmesh_dm_createNavMeshForVisualization(DerivedMesh *dm); #include "GPU_extensions.h" #include "GPU_material.h" -extern GLubyte stipple_quarttone[128]; /* glutil.c, bad level data */ - static void add_shapekey_layers(DerivedMesh *dm, Mesh *me, Object *ob); static void shapekey_layers_to_keyblocks(DerivedMesh *dm, Mesh *me, int actshape_uid); diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c index 4cade876d09..bbe210f2ce6 100644 --- a/source/blender/blenkernel/intern/bvhutils.c +++ b/source/blender/blenkernel/intern/bvhutils.c @@ -754,7 +754,7 @@ void bvhcache_insert(BVHCache *cache, BVHTree *tree, int type) item->type = type; item->tree = tree; - BLI_linklist_prepend( cache, item ); + BLI_linklist_prepend(cache, item); } diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index cf435e96332..cc3705780e4 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -441,14 +441,14 @@ static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges } if( prevdraw != draw ) { if( prevdraw > 0 && (i-prevstart) > 0 ) { - GPU_buffer_draw_elements( dm->drawObject->edges, GL_LINES, prevstart*2, (i-prevstart)*2 ); + GPU_buffer_draw_elements(dm->drawObject->edges, GL_LINES, prevstart * 2, (i - prevstart) * 2); } prevstart = i; } prevdraw = draw; } if( prevdraw > 0 && (i-prevstart) > 0 ) { - GPU_buffer_draw_elements( dm->drawObject->edges, GL_LINES, prevstart*2, (i-prevstart)*2 ); + GPU_buffer_draw_elements(dm->drawObject->edges, GL_LINES, prevstart * 2, (i-prevstart) * 2); } } GPU_buffer_unbind(); @@ -489,14 +489,14 @@ static void cdDM_drawLooseEdges(DerivedMesh *dm) } if( prevdraw != draw ) { if( prevdraw > 0 && (i-prevstart) > 0) { - GPU_buffer_draw_elements( dm->drawObject->edges, GL_LINES, prevstart*2, (i-prevstart)*2 ); + GPU_buffer_draw_elements(dm->drawObject->edges, GL_LINES, prevstart * 2, (i - prevstart) * 2); } prevstart = i; } prevdraw = draw; } if( prevdraw > 0 && (i-prevstart) > 0 ) { - GPU_buffer_draw_elements( dm->drawObject->edges, GL_LINES, prevstart*2, (i-prevstart)*2 ); + GPU_buffer_draw_elements(dm->drawObject->edges, GL_LINES, prevstart * 2, (i - prevstart) * 2); } } GPU_buffer_unbind(); diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index f19226cedf0..7d850c3576e 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -75,7 +75,7 @@ Collision modifier code start ***********************************/ /* step is limited from 0 (frame start position) to 1 (frame end position) */ -void collision_move_object ( CollisionModifierData *collmd, float step, float prevstep ) +void collision_move_object(CollisionModifierData *collmd, float step, float prevstep) { float tv[3] = {0, 0, 0}; unsigned int i = 0; diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index d10c060cc7f..21f897d16ff 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -62,8 +62,6 @@ #include "BLO_sys_types.h" // for intptr_t support -extern Material defmaterial; /* material.c */ - static void boundbox_displist(Object *ob); void free_disp_elem(DispList *dl) diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index f3225a6b6f5..22f8d38de4a 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -696,12 +696,12 @@ float metaball(float x, float y, float z) } else{ for(a=0; a<totelem; a++) { - dens+= densfunc( mainb[a], x, y, z); + dens += densfunc(mainb[a], x, y, z); } } } else{ - dens+= densfunc( mainb[0], x, y, z); + dens += densfunc(mainb[0], x, y, z); } return thresh - dens; @@ -1803,7 +1803,7 @@ float init_meta(Scene *scene, Object *ob) /* return totsize */ } for(a=0; a<totelem; a++) { - thresh+= densfunc( mainb[a], 2.0f*totsize, 2.0f*totsize, 2.0f*totsize); + thresh += densfunc(mainb[a], 2.0f * totsize, 2.0f * totsize, 2.0f * totsize); } return totsize; diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 8d50d3d69cf..bbe32c651a2 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -4089,7 +4089,7 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra)) } fileParts++; } - gzclose( gzf ); + gzclose(gzf); totpart = psys->totpart = activeParts; BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"readFsPartData::done - particles:%d, active:%d, file:%d, mask:%d \n", psys->totpart,activeParts,fileParts,readMask); diff --git a/source/blender/blenkernel/intern/property.c b/source/blender/blenkernel/intern/property.c index baf682b4cb6..9daee575080 100644 --- a/source/blender/blenkernel/intern/property.c +++ b/source/blender/blenkernel/intern/property.c @@ -79,7 +79,7 @@ bProperty *copy_property(bProperty *prop) void copy_properties(ListBase *lbn, ListBase *lbo) { bProperty *prop, *propn; - free_properties( lbn ); /* in case we are copying to an object with props */ + free_properties(lbn); /* in case we are copying to an object with props */ prop= lbo->first; while(prop) { propn= copy_property(prop); diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 8f8874d3a3c..b57e2f3dab9 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -3755,7 +3755,7 @@ Sequence *sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo /* basic defaults */ seq->strip= strip= MEM_callocN(sizeof(Strip), "strip"); - strip->len = seq->len = IMB_anim_get_duration( an, IMB_TC_RECORD_RUN ); + strip->len = seq->len = IMB_anim_get_duration(an, IMB_TC_RECORD_RUN); strip->us= 1; /* we only need 1 element for MOVIE strips */ diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index b0075f5c121..33da4443b6f 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -3610,13 +3610,13 @@ static void curve_surf_to_softbody(Scene *scene, Object *ob) 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++; } } diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 3f382cc5543..141d390d571 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -600,7 +600,7 @@ void clear_text(Text *text) /* called directly from rna */ txt_set_undostate( 1 ); txt_sel_all( text ); txt_delete_sel(text); - txt_set_undostate( oldstate ); + txt_set_undostate(oldstate); txt_make_dirty(text); } @@ -609,10 +609,10 @@ void write_text(Text *text, const char *str) /* called directly from rna */ { int oldstate; - oldstate = txt_get_undostate( ); - txt_insert_buf( text, str ); - txt_move_eof( text, 0 ); - txt_set_undostate( oldstate ); + oldstate = txt_get_undostate(); + txt_insert_buf(text, str); + txt_move_eof(text, 0); + txt_set_undostate(oldstate); txt_make_dirty(text); } diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index b992d518b49..67e0ea6ebb9 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -1687,7 +1687,7 @@ static void dfs_range_query(RangeQueryData *data, BVHNode *node) if(node->children[i]->totnode == 0) { data->hits++; - data->callback( data->userdata, node->children[i]->index, dist ); + data->callback(data->userdata, node->children[i]->index, dist); } else dfs_range_query( data, node->children[i] ); @@ -1719,7 +1719,7 @@ int BLI_bvhtree_range_query(BVHTree *tree, const float co[3], float radius, BVHT if(root->totnode == 0) { data.hits++; - data.callback( data.userdata, root->index, dist ); + data.callback(data.userdata, root->index, dist); } else dfs_range_query( &data, root ); diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index a512ac746f9..0d251133e0d 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -331,7 +331,7 @@ void BLI_cleanup_path(const char *relabase, char *dir) } /* Note - * memmove( start, eind, strlen(eind)+1 ); + * memmove(start, eind, strlen(eind) + 1); * is the same as * strcpy( start, eind ); * except strcpy should not be used because there is overlap, @@ -357,18 +357,18 @@ void BLI_cleanup_path(const char *relabase, char *dir) if (a<0) { break; } else { - memmove( dir+a, eind, strlen(eind)+1 ); + memmove(dir + a, eind, strlen(eind) + 1); } } while ( (start = strstr(dir,"\\.\\")) ) { eind = start + strlen("\\.\\") - 1; - memmove( start, eind, strlen(eind)+1 ); + memmove(start, eind, strlen(eind) + 1); } while ( (start = strstr(dir,"\\\\" )) ) { eind = start + strlen("\\\\") - 1; - memmove( start, eind, strlen(eind)+1 ); + memmove(start, eind, strlen(eind) + 1); } #else if(dir[0]=='.') { /* happens, for example in FILE_MAIN */ @@ -381,7 +381,7 @@ void BLI_cleanup_path(const char *relabase, char *dir) * this is a valid path in blender but we cant handle this the usual way below * simply strip this prefix then evaluate the path as usual. pythons os.path.normpath() does this */ while((strncmp(dir, "/../", 4)==0)) { - memmove( dir, dir + 4, strlen(dir + 4) + 1 ); + memmove(dir, dir + 4, strlen(dir + 4) + 1); } while ( (start = strstr(dir, "/../")) ) { @@ -393,19 +393,20 @@ void BLI_cleanup_path(const char *relabase, char *dir) } if (a<0) { break; - } else { - memmove( dir+a, eind, strlen(eind)+1 ); + } + else { + memmove(dir+a, eind, strlen(eind) + 1); } } while ( (start = strstr(dir,"/./")) ) { eind = start + (3 - 1) /* strlen("/./") - 1 */; - memmove( start, eind, strlen(eind)+1 ); + memmove(start, eind, strlen(eind) + 1); } while ( (start = strstr(dir,"//" )) ) { eind = start + (2 - 1) /* strlen("//") - 1 */; - memmove( start, eind, strlen(eind)+1 ); + memmove(start, eind, strlen(eind) + 1); } #endif } @@ -1479,7 +1480,7 @@ void BLI_split_dirfile(const char *string, char *dir, char *file, const size_t d if (dir) { if (lslash) { - BLI_strncpy( dir, string, MIN2(dirlen, lslash + 1)); /* +1 to include the slash and the last char */ + BLI_strncpy(dir, string, MIN2(dirlen, lslash + 1)); /* +1 to include the slash and the last char */ } else { dir[0] = '\0'; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 517ba303a1a..50b8e0997ee 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -10574,8 +10574,9 @@ static void do_versions(FileData *fd, Library *lib, Main *main) bMessageActuator *msgAct = (bMessageActuator *) act->data; if (BLI_strnlen(msgAct->toPropName, 3) > 2) { /* strip first 2 chars, would have only worked if these were OB anyway */ - memmove( msgAct->toPropName, msgAct->toPropName+2, sizeof(msgAct->toPropName)-2 ); - } else { + memmove(msgAct->toPropName, msgAct->toPropName + 2, sizeof(msgAct->toPropName) - 2); + } + else { msgAct->toPropName[0] = '\0'; } } diff --git a/source/blender/bmesh/operators/bmo_extrude.c b/source/blender/bmesh/operators/bmo_extrude.c index 595502586b9..8e5792b6a15 100644 --- a/source/blender/bmesh/operators/bmo_extrude.c +++ b/source/blender/bmesh/operators/bmo_extrude.c @@ -201,7 +201,7 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op) BMO_slot_buffer_flag_enable(bm, op, "edgefacein", EXT_INPUT, BM_EDGE|BM_FACE); - /* if one flagged face is bordered by an unflagged face, then we delete + /* if one flagged face is bordered by an un-flagged face, then we delete * original geometry unless caller explicitly asked to keep it. */ if (!BMO_slot_bool_get(op, "alwayskeeporig")) { BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) { @@ -226,13 +226,13 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op) } if ((edge_face_tot > 1) && (found == FALSE)) { - /* edge has a face user, that face isnt extrude input */ + /* edge has a face user, that face isn't extrude input */ BMO_elem_flag_enable(bm, e, EXT_DEL); } } } - /* calculate verts to delet */ + /* calculate verts to delete */ BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) { found = FALSE; diff --git a/source/blender/bmesh/operators/bmo_join_triangles.c b/source/blender/bmesh/operators/bmo_join_triangles.c index 1d8b77e9300..dda3e144220 100644 --- a/source/blender/bmesh/operators/bmo_join_triangles.c +++ b/source/blender/bmesh/operators/bmo_join_triangles.c @@ -50,13 +50,13 @@ static float measure_facepair(BMesh *UNUSED(bm), BMVert *v1, BMVert *v2, BMVert *v3, BMVert *v4, float limit) { - /* gives a 'weight' to a pair of triangles that join an edge to decide how good a join they would mak */ + /* gives a 'weight' to a pair of triangles that join an edge to decide how good a join they would make */ /* Note: this is more complicated than it needs to be and should be cleaned up.. */ float n1[3], n2[3], measure = 0.0f, angle1, angle2, diff; float edgeVec1[3], edgeVec2[3], edgeVec3[3], edgeVec4[3]; float minarea, maxarea, areaA, areaB; - /* First Test: Normal differenc */ + /* First Test: Normal difference */ normal_tri_v3(n1, v1->co, v2->co, v3->co); normal_tri_v3(n2, v1->co, v3->co, v4->co); @@ -74,7 +74,7 @@ static float measure_facepair(BMesh *UNUSED(bm), BMVert *v1, BMVert *v2, return measure; } - /* Second test: Colinearit */ + /* Second test: Colinearity */ sub_v3_v3v3(edgeVec1, v1->co, v2->co); sub_v3_v3v3(edgeVec2, v2->co, v3->co); sub_v3_v3v3(edgeVec3, v3->co, v4->co); @@ -95,7 +95,7 @@ static float measure_facepair(BMesh *UNUSED(bm), BMVert *v1, BMVert *v2, return measure; } - /* Third test: Concavit */ + /* Third test: Concavity */ areaA = area_tri_v3(v1->co, v2->co, v3->co) + area_tri_v3(v1->co, v3->co, v4->co); areaB = area_tri_v3(v2->co, v3->co, v4->co) + area_tri_v3(v4->co, v1->co, v2->co); @@ -176,7 +176,9 @@ static int compareFaceAttribs(BMesh *bm, BMEdge *e, int douvs, int dovcols) /* do UV */ if (luv1 && douvs) { - if (tp1->tpage != tp2->tpage); /* do nothin */ + if (tp1->tpage != tp2->tpage) { + /* do nothing */ + } else { int i; diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index f140c408e68..c6aed3133e2 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -751,7 +751,6 @@ KeyframeEditFunc ANIM_editkeyframes_mirror(short type) return mirror_bezier_value; default: /* just in case */ return mirror_bezier_yaxis; - break; } } diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 01700e1c52a..cfd9f65cf00 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -1088,7 +1088,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect) for( a = 1; a <= sizex; a++ ) { pos = ((float)a) / (sizex-1); - do_colorband( coba, pos, colf ); + do_colorband(coba, pos, colf); if (but->block->color_profile != BLI_PR_NONE) linearrgb_to_srgb_v3_v3(colf, colf); diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index cae6f61d269..537de167153 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -1229,7 +1229,7 @@ static int ui_textedit_delete_selection(uiBut *but, uiHandleButtonData *data) int len= strlen(str); int change= 0; if(but->selsta != but->selend && len) { - memmove( str+but->selsta, str+but->selend, (len - but->selend) + 1 ); + memmove(str + but->selsta, str + but->selend, (len - but->selend) + 1); change= 1; } diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 6288f39367e..4ed6e08fb31 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1845,8 +1845,8 @@ void ED_update_for_newframe(Main *bmain, Scene *scene, bScreen *screen, int UNUS { Tex *tex; for(tex= bmain->tex.first; tex; tex= tex->id.next) - if( tex->use_nodes && tex->nodetree ) { - ntreeTexTagAnimated( tex->nodetree ); + if (tex->use_nodes && tex->nodetree) { + ntreeTexTagAnimated(tex->nodetree); } } diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h index 09314351078..33055b5efd5 100644 --- a/source/blender/gpu/GPU_buffers.h +++ b/source/blender/gpu/GPU_buffers.h @@ -123,16 +123,16 @@ void GPU_global_buffer_pool_free(void); GPUBuffer *GPU_buffer_alloc(int size); void GPU_buffer_free(GPUBuffer *buffer); -GPUDrawObject *GPU_drawobject_new( struct DerivedMesh *dm ); -void GPU_drawobject_free( struct DerivedMesh *dm ); +GPUDrawObject *GPU_drawobject_new(struct DerivedMesh *dm ); +void GPU_drawobject_free(struct DerivedMesh *dm ); /* called before drawing */ -void GPU_vertex_setup( struct DerivedMesh *dm ); -void GPU_normal_setup( struct DerivedMesh *dm ); -void GPU_uv_setup( struct DerivedMesh *dm ); -void GPU_color_setup( struct DerivedMesh *dm ); -void GPU_edge_setup( struct DerivedMesh *dm ); /* does not mix with other data */ -void GPU_uvedge_setup( struct DerivedMesh *dm ); +void GPU_vertex_setup(struct DerivedMesh *dm ); +void GPU_normal_setup(struct DerivedMesh *dm ); +void GPU_uv_setup(struct DerivedMesh *dm ); +void GPU_color_setup(struct DerivedMesh *dm ); +void GPU_edge_setup(struct DerivedMesh *dm ); /* does not mix with other data */ +void GPU_uvedge_setup(struct DerivedMesh *dm ); int GPU_attrib_element_size( GPUAttrib data[], int numdata ); void GPU_interleaved_attrib_setup( GPUBuffer *buffer, GPUAttrib data[], int numdata ); @@ -142,7 +142,7 @@ void *GPU_buffer_lock_stream( GPUBuffer *buffer ); void GPU_buffer_unlock( GPUBuffer *buffer ); /* upload three unsigned chars, representing RGB colors, for each vertex. Resets dm->drawObject->colType to -1 */ -void GPU_color3_upload( struct DerivedMesh *dm, unsigned char *data ); +void GPU_color3_upload(struct DerivedMesh *dm, unsigned char *data ); /* switch color rendering on=1/off=0 */ void GPU_color_switch( int mode ); @@ -153,7 +153,7 @@ void GPU_buffer_draw_elements( GPUBuffer *elements, unsigned int mode, int start void GPU_buffer_unbind(void); /* used to check whether to use the old (without buffers) code */ -int GPU_buffer_legacy( struct DerivedMesh *dm ); +int GPU_buffer_legacy(struct DerivedMesh *dm ); /* Buffers for non-DerivedMesh drawing */ typedef struct GPU_Buffers GPU_Buffers; diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index f863fe8de21..fdc9e50bcd8 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -167,7 +167,7 @@ static void to_hex_char(char* hexbytes, const unsigned char* bytes, int len) /** ----- end of adapted code from glib --- */ -static int uri_from_filename( const char *path, char *uri ) +static int uri_from_filename(const char *path, char *uri) { char orig_uri[URI_MAX]; const char* dirstart = path; diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index ed806c96beb..08c8f69d076 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -160,17 +160,17 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ DerivedMesh *dm; /* CustomDataMask mask = CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL; */ CustomDataMask mask = CD_MASK_MESH; /* this seems more suitable, exporter, - for example, needs CD_MASK_MDEFORMVERT */ + * for example, needs CD_MASK_MDEFORMVERT */ /* Write the display mesh into the dummy mesh */ if (render) - dm = mesh_create_derived_render( sce, ob, mask ); + dm = mesh_create_derived_render(sce, ob, mask); else - dm = mesh_create_derived_view( sce, ob, mask ); + dm = mesh_create_derived_view(sce, ob, mask); - tmpmesh = add_mesh( "Mesh" ); - DM_to_mesh( dm, tmpmesh, ob ); - dm->release( dm ); + tmpmesh = add_mesh("Mesh"); + DM_to_mesh(dm, tmpmesh, ob); + dm->release(dm); } break; diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c index 42a6f74aba5..31a50a6a16b 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim_util.c +++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c @@ -210,7 +210,7 @@ static DerivedMesh *fluidsim_read_obj(const char *filename, const MPoly *mp_exam gotBytes = gzread(gzf, &wri, sizeof(wri)); numfaces = wri; - gzclose( gzf ); + gzclose(gzf); // ------------------------------------------------ if(!numfaces || !numverts || !gotBytes) @@ -226,7 +226,7 @@ static DerivedMesh *fluidsim_read_obj(const char *filename, const MPoly *mp_exam if(!dm) { - gzclose( gzf ); + gzclose(gzf); return NULL; } @@ -245,7 +245,7 @@ static DerivedMesh *fluidsim_read_obj(const char *filename, const MPoly *mp_exam { if(dm) dm->release(dm); - gzclose( gzf ); + gzclose(gzf); return NULL; } @@ -254,7 +254,7 @@ static DerivedMesh *fluidsim_read_obj(const char *filename, const MPoly *mp_exam { if(dm) dm->release(dm); - gzclose( gzf ); + gzclose(gzf); return NULL; } @@ -272,7 +272,7 @@ static DerivedMesh *fluidsim_read_obj(const char *filename, const MPoly *mp_exam printf("Fluidsim: error in reading data from file.\n"); if(dm) dm->release(dm); - gzclose( gzf ); + gzclose(gzf); MEM_freeN(normals); return NULL; } @@ -299,7 +299,7 @@ static DerivedMesh *fluidsim_read_obj(const char *filename, const MPoly *mp_exam } - gzclose( gzf ); + gzclose(gzf); CDDM_calc_edges(dm); diff --git a/source/blender/render/intern/include/sunsky.h b/source/blender/render/intern/include/sunsky.h index 62b68484629..6a41517b113 100644 --- a/source/blender/render/intern/include/sunsky.h +++ b/source/blender/render/intern/include/sunsky.h @@ -79,7 +79,7 @@ void InitSunSky(struct SunSky *sunsky, float turb, float *toSun, float horizon_b void GetSkyXYZRadiance(struct SunSky *sunsky, float theta, float phi, float color_out[3]); void GetSkyXYZRadiancef(struct SunSky *sunsky, const float varg[3], float color_out[3]); void InitAtmosphere(struct SunSky *sunSky, float sun_intens, float mief, float rayf, float inscattf, float extincf, float disf); -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]); void ClipColor(float c[3]); #endif /*__SUNSKY_H__*/ diff --git a/source/blender/render/intern/raytrace/reorganize.h b/source/blender/render/intern/raytrace/reorganize.h index 6efe37b81a3..11d12dac23c 100644 --- a/source/blender/render/intern/raytrace/reorganize.h +++ b/source/blender/render/intern/raytrace/reorganize.h @@ -271,8 +271,9 @@ void pushdown(Node *parent) s_child = next_s_child; } - for(Node *i = parent->child; RE_rayobject_isAligned(i) && i; i = i->sibling) - pushdown( i ); + for (Node *i = parent->child; RE_rayobject_isAligned(i) && i; i = i->sibling) { + pushdown(i); + } } diff --git a/source/blender/render/intern/raytrace/vbvh.h b/source/blender/render/intern/raytrace/vbvh.h index 7d4d25c8d00..e1b4ec420ef 100644 --- a/source/blender/render/intern/raytrace/vbvh.h +++ b/source/blender/render/intern/raytrace/vbvh.h @@ -167,8 +167,8 @@ struct BuildBinaryVBVH { Node *node = create_node(); INIT_MINMAX(node->bb, node->bb+3); - rtbuild_merge_bb(builder, node->bb, node->bb+3); - node->child = (Node*) rtbuild_get_primitive( builder, 0 ); + rtbuild_merge_bb(builder, node->bb, node->bb+3); + node->child = (Node *) rtbuild_get_primitive(builder, 0); return node; } else diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index 9272dcf5b30..c072a664fff 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -134,7 +134,7 @@ static RayObject* RE_rayobject_create(Render *re, int type, int size) if(res) - RE_rayobject_config_control( res, re ); + RE_rayobject_config_control(res, re); return res; } diff --git a/source/blender/render/intern/source/sss.c b/source/blender/render/intern/source/sss.c index a60db8a963f..6e37c81b882 100644 --- a/source/blender/render/intern/source/sss.c +++ b/source/blender/render/intern/source/sss.c @@ -77,8 +77,6 @@ #include "sss.h" #include "zbuf.h" -extern Render R; // meh - /* Generic Multiple Scattering API */ /* Relevant papers: diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h index a992150fad3..a6809716e32 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h +++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h @@ -134,8 +134,8 @@ class SCA_Joystick public: - static SCA_Joystick *GetInstance( short int joyindex ); - static void HandleEvents( void ); + static SCA_Joystick *GetInstance(short int joyindex); + static void HandleEvents(void); void ReleaseInstance(); diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 69e7a7cf5a6..cf3aae2bc90 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -518,7 +518,7 @@ public: return m_pBlenderObject; } - void SetBlenderObject( struct Object* obj) + void SetBlenderObject(struct Object* obj) { m_pBlenderObject = obj; } @@ -528,7 +528,7 @@ public: return m_pBlenderGroupObject; } - void SetBlenderGroupObject( struct Object* obj) + void SetBlenderGroupObject(struct Object* obj) { m_pBlenderGroupObject = obj; } |