From 95670e03a01d30cda5a0f685974f28790be6809d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 3 Mar 2012 20:19:11 +0000 Subject: style cleanup / comment formatting for bli/bke/bmesh --- source/blender/blenkernel/BKE_DerivedMesh.h | 78 +++++----- source/blender/blenkernel/BKE_bmfont_types.h | 9 +- source/blender/blenkernel/BKE_bvhutils.h | 4 +- source/blender/blenkernel/BKE_cdderivedmesh.h | 14 +- source/blender/blenkernel/BKE_cloth.h | 22 +-- source/blender/blenkernel/BKE_context.h | 14 +- source/blender/blenkernel/BKE_customdata.h | 18 +-- source/blender/blenkernel/BKE_depsgraph.h | 4 +- source/blender/blenkernel/BKE_dynamicpaint.h | 2 +- source/blender/blenkernel/BKE_icons.h | 4 +- source/blender/blenkernel/BKE_idprop.h | 134 ++++++++--------- source/blender/blenkernel/BKE_mesh.h | 14 +- source/blender/blenkernel/BKE_modifier.h | 2 +- source/blender/blenkernel/BKE_particle.h | 4 +- source/blender/blenkernel/BKE_screen.h | 2 +- source/blender/blenkernel/BKE_suggestions.h | 26 ++-- source/blender/blenkernel/BKE_tessmesh.h | 29 ++-- source/blender/blenkernel/intern/CCGSubSurf.c | 6 +- source/blender/blenkernel/intern/action.c | 59 ++++---- source/blender/blenkernel/intern/anim.c | 16 +-- source/blender/blenkernel/intern/anim_sys.c | 4 +- source/blender/blenkernel/intern/armature.c | 2 +- source/blender/blenkernel/intern/brush.c | 20 ++- source/blender/blenkernel/intern/bvhutils.c | 40 +++--- source/blender/blenkernel/intern/colortools.c | 4 +- source/blender/blenkernel/intern/curve.c | 48 +++---- source/blender/blenkernel/intern/customdata.c | 16 +-- source/blender/blenkernel/intern/customdata_file.c | 6 +- source/blender/blenkernel/intern/dynamicpaint.c | 12 +- source/blender/blenkernel/intern/editderivedmesh.c | 44 +++--- source/blender/blenkernel/intern/effect.c | 59 ++++---- source/blender/blenkernel/intern/fcurve.c | 4 +- source/blender/blenkernel/intern/font.c | 8 +- source/blender/blenkernel/intern/group.c | 2 +- source/blender/blenkernel/intern/icons.c | 2 +- source/blender/blenkernel/intern/idprop.c | 56 ++++---- source/blender/blenkernel/intern/image.c | 68 +++++---- source/blender/blenkernel/intern/image_gen.c | 2 +- source/blender/blenkernel/intern/ipo.c | 32 +++-- source/blender/blenkernel/intern/key.c | 10 +- source/blender/blenkernel/intern/lamp.c | 6 +- source/blender/blenkernel/intern/lattice.c | 2 +- source/blender/blenkernel/intern/library.c | 32 +++-- source/blender/blenkernel/intern/material.c | 10 +- source/blender/blenkernel/intern/mball.c | 8 +- source/blender/blenkernel/intern/mesh.c | 54 +++---- source/blender/blenkernel/intern/mesh_validate.c | 2 +- source/blender/blenkernel/intern/modifier.c | 30 ++-- source/blender/blenkernel/intern/movieclip.c | 12 +- source/blender/blenkernel/intern/node.c | 12 +- source/blender/blenkernel/intern/object.c | 20 +-- source/blender/blenkernel/intern/ocean.c | 20 +-- source/blender/blenkernel/intern/packedFile.c | 31 ++-- source/blender/blenkernel/intern/particle.c | 6 +- source/blender/blenkernel/intern/particle_system.c | 56 ++++---- source/blender/blenkernel/intern/pointcache.c | 14 +- source/blender/blenkernel/intern/scene.c | 28 ++-- source/blender/blenkernel/intern/script.c | 5 +- source/blender/blenkernel/intern/seqeffects.c | 4 +- source/blender/blenkernel/intern/sequencer.c | 12 +- source/blender/blenkernel/intern/softbody.c | 31 ++-- source/blender/blenkernel/intern/speaker.c | 6 +- source/blender/blenkernel/intern/subsurf_ccg.c | 16 +-- source/blender/blenkernel/intern/text.c | 28 ++-- source/blender/blenkernel/intern/texture.c | 10 +- source/blender/blenkernel/intern/tracking.c | 8 +- source/blender/blenkernel/intern/unit.c | 4 +- source/blender/blenkernel/intern/world.c | 6 +- source/blender/blenlib/BLI_bitmap.h | 4 +- source/blender/blenlib/BLI_bpath.h | 2 +- source/blender/blenlib/BLI_editVert.h | 4 +- source/blender/blenlib/BLI_fnmatch.h | 42 +++--- source/blender/blenlib/BLI_heap.h | 4 +- source/blender/blenlib/BLI_math_geom.h | 10 +- source/blender/blenlib/BLI_math_matrix.h | 2 +- source/blender/blenlib/BLI_md5.h | 10 +- source/blender/blenlib/BLI_path_util.h | 48 +++---- source/blender/blenlib/BLI_pbvh.h | 16 +-- source/blender/blenlib/BLI_scanfill.h | 2 +- source/blender/blenlib/intern/BLI_kdopbvh.c | 27 ++-- source/blender/blenlib/intern/boxpack2d.c | 4 +- source/blender/blenlib/intern/bpath.c | 6 +- source/blender/blenlib/intern/fileops.c | 10 +- source/blender/blenlib/intern/freetypefont.c | 36 ++--- source/blender/blenlib/intern/math_color.c | 14 +- source/blender/blenlib/intern/math_color_inline.c | 6 +- source/blender/blenlib/intern/math_geom.c | 148 ++++++++++--------- source/blender/blenlib/intern/math_matrix.c | 4 +- source/blender/blenlib/intern/math_rotation.c | 74 +++++----- source/blender/blenlib/intern/math_vector.c | 8 +- source/blender/blenlib/intern/math_vector_inline.c | 4 +- source/blender/blenlib/intern/noise.c | 17 ++- source/blender/blenlib/intern/path_util.c | 160 ++++++++++----------- source/blender/blenlib/intern/pbvh.c | 118 +++++++-------- source/blender/blenlib/intern/scanfill.c | 77 +++++----- source/blender/blenlib/intern/storage.c | 6 +- source/blender/blenlib/intern/string.c | 8 +- source/blender/blenlib/intern/string_utf8.c | 12 +- source/blender/blenlib/intern/threads.c | 94 ++++++------ source/blender/blenlib/intern/winstuff.c | 6 +- source/blender/bmesh/intern/bmesh_core.c | 4 +- source/blender/bmesh/intern/bmesh_iterators.h | 2 +- source/blender/bmesh/intern/bmesh_polygon.c | 7 +- source/blender/bmesh/intern/bmesh_walkers.h | 30 ++-- source/blender/bmesh/operators/bmo_triangulate.c | 4 +- source/blender/bmesh/operators/bmo_utils.c | 64 ++++----- 106 files changed, 1240 insertions(+), 1227 deletions(-) (limited to 'source') diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index dff783c1b9b..116b3e05a8e 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -29,37 +29,37 @@ #define __BKE_DERIVEDMESH_H__ /* - Basic design of the DerivedMesh system: - - DerivedMesh is a common set of interfaces for mesh systems. - - There are three main mesh data structures in Blender: Mesh, CDDM, and BMesh. - These, and a few others, all implement DerivedMesh interfaces, - which contains unified drawing interfaces, a few utility interfaces, - and a bunch of read-only interfaces intended mostly for conversion from - one format to another. - - All Mesh structures in blender make use of CustomData, which is used to store - per-element attributes and interpolate them (e.g. uvs, vcols, vgroups, etc). - - Mesh is the "serialized" structure, used for storing object-mode mesh data - and also for saving stuff to disk. It's interfaces are also what DerivedMesh - uses to communicate with. - - CDDM is a little mesh library, that uses Mesh data structures in the backend. - It's mostly used for modifiers, and has the advantages of not taking much - resources. - - BMesh is a full-on brep, used for editmode, some modifiers, etc. It's much - more capable (if memory-intensive) then CDDM. - - DerivedMesh is somewhat hackish. Many places assumes that a DerivedMesh is - a CDDM (most of the time by simply copying it and converting it to one). - CDDM is the original structure for modifiers, but has since been superseded - by BMesh, at least for the foreseeable future. -*/ - -/* + * Basic design of the DerivedMesh system: + * + * DerivedMesh is a common set of interfaces for mesh systems. + * + * There are three main mesh data structures in Blender: Mesh, CDDM, and BMesh. + * These, and a few others, all implement DerivedMesh interfaces, + * which contains unified drawing interfaces, a few utility interfaces, + * and a bunch of read-only interfaces intended mostly for conversion from + * one format to another. + * + * All Mesh structures in blender make use of CustomData, which is used to store + * per-element attributes and interpolate them (e.g. uvs, vcols, vgroups, etc). + * + * Mesh is the "serialized" structure, used for storing object-mode mesh data + * and also for saving stuff to disk. It's interfaces are also what DerivedMesh + * uses to communicate with. + * + * CDDM is a little mesh library, that uses Mesh data structures in the backend. + * It's mostly used for modifiers, and has the advantages of not taking much + * resources. + * + * BMesh is a full-on brep, used for editmode, some modifiers, etc. It's much + * more capable (if memory-intensive) then CDDM. + * + * DerivedMesh is somewhat hackish. Many places assumes that a DerivedMesh is + * a CDDM (most of the time by simply copying it and converting it to one). + * CDDM is the original structure for modifiers, but has since been superseded + * by BMesh, at least for the foreseeable future. + */ + +/* * Note: This sturcture is read-only, for all practical purposes. * At some point in the future, we may want to consider * creating a replacement structure that implements a proper @@ -98,9 +98,9 @@ struct PBVH; #define SUB_ELEMS_FACE 50 /* -Note: all mface interfaces now officially operate on tesselated data. - Also, the mface origindex layer indexes mpolys, not mfaces. -*/ + * Note: all mface interfaces now officially operate on tesselated data. + * Also, the mface origindex layer indexes mpolys, not mfaces. + */ typedef struct DMGridData { float co[3]; @@ -199,8 +199,8 @@ struct DerivedMesh { void *(*getEdgeDataArray)(DerivedMesh *dm, int type); void *(*getTessFaceDataArray)(DerivedMesh *dm, int type); - /*retrieves the base CustomData structures for - verts/edges/tessfaces/loops/facdes*/ + /* retrieves the base CustomData structures for + * verts/edges/tessfaces/loops/facdes*/ CustomData *(*getVertDataLayout)(DerivedMesh *dm); CustomData *(*getEdgeDataLayout)(DerivedMesh *dm); CustomData *(*getTessFaceDataLayout)(DerivedMesh *dm); @@ -576,8 +576,8 @@ void DM_interp_poly_data(struct DerivedMesh *source, struct DerivedMesh *dest, void vDM_ColorBand_store(struct ColorBand *coba); /* Simple function to get me->totvert amount of vertices/normals, - correctly deformed and subsurfered. Needed especially when vertexgroups are involved. - In use now by vertex/weigt paint and particles */ + * correctly deformed and subsurfered. Needed especially when vertexgroups are involved. + * In use now by vertex/weigt paint and particles */ float *mesh_get_mapped_verts_nors(struct Scene *scene, struct Object *ob); /* */ @@ -625,7 +625,7 @@ void makeDerivedMesh(struct Scene *scene, struct Object *ob, struct BMEditMesh * CustomDataMask dataMask, int build_shapekey_layers); /* returns an array of deform matrices for crazyspace correction, and the - number of modifiers left */ + * number of modifiers left */ int editbmesh_get_first_deform_matrices(struct Scene *, struct Object *, struct BMEditMesh *em, float (**deformmats)[3][3], float (**deformcos)[3]); diff --git a/source/blender/blenkernel/BKE_bmfont_types.h b/source/blender/blenkernel/BKE_bmfont_types.h index 73ef0c3a2c3..a5be0be6997 100644 --- a/source/blender/blenkernel/BKE_bmfont_types.h +++ b/source/blender/blenkernel/BKE_bmfont_types.h @@ -34,10 +34,11 @@ */ #define is_power_of_two(N) ((N ^ (N - 1)) == (2 * N - 1)) /* -Moved to IMB_imbuf_types.h where it will live close to the ImBuf type. -It is used as a userflag bit mask. -#define IB_BITMAPFONT 1 -*/ + * Moved to IMB_imbuf_types.h where it will live close to the ImBuf type. + * It is used as a userflag bit mask. + */ +// #define IB_BITMAPFONT 1 + typedef struct bmGlyph { unsigned short unicode; short locx, locy; diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h index 15c93bd58fa..ab3d751cc8e 100644 --- a/source/blender/blenkernel/BKE_bvhutils.h +++ b/source/blender/blenkernel/BKE_bvhutils.h @@ -106,8 +106,8 @@ BVHTree* bvhtree_from_mesh_edges(struct BVHTreeFromMesh *data, struct DerivedMes void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data); /* -* Math functions used by callbacks -*/ + * Math functions used by callbacks + */ float bvhtree_ray_tri_intersection(const BVHTreeRay *ray, const float m_dist, const float v0[3], const float v1[3], const float v2[3]); float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const float v2[3], const float p[3], int *v, int *e, float nearest[3]); diff --git a/source/blender/blenkernel/BKE_cdderivedmesh.h b/source/blender/blenkernel/BKE_cdderivedmesh.h index 8ece5f14a96..027c825663d 100644 --- a/source/blender/blenkernel/BKE_cdderivedmesh.h +++ b/source/blender/blenkernel/BKE_cdderivedmesh.h @@ -50,9 +50,9 @@ struct DerivedMesh *CDDM_new(int numVerts, int numEdges, int numFaces, int CDDM_Check(struct DerivedMesh *dm); /* creates a CDDerivedMesh from the given Mesh, this will reference the - original data in Mesh, but it is safe to apply vertex coordinates or - calculate normals as those functions will automtically create new - data to not overwrite the original */ + * original data in Mesh, but it is safe to apply vertex coordinates or + * calculate normals as those functions will automtically create new + * data to not overwrite the original */ struct DerivedMesh *CDDM_from_mesh(struct Mesh *mesh, struct Object *ob); /* creates a CDDerivedMesh from the given BMEditMesh */ @@ -107,7 +107,7 @@ void CDDM_calc_normals_tessface(struct DerivedMesh *dm); void CDDM_calc_edges_tessface(struct DerivedMesh *dm); /* same as CDDM_calc_edges_tessface only makes edges from ngon faces instead of tessellation - faces*/ + * faces*/ void CDDM_calc_edges(struct DerivedMesh *dm); /* reconstitute face triangulation */ @@ -143,9 +143,9 @@ struct MFace *CDDM_get_tessfaces(struct DerivedMesh *dm); struct MLoop *CDDM_get_loops(struct DerivedMesh *dm); struct MPoly *CDDM_get_polys(struct DerivedMesh *dm); -/*Assigns news m*** layers to the cddm. Note that you must handle - freeing the old ones yourself. Also you must ensure dm->num****Data - is correct.*/ +/* Assigns news m*** layers to the cddm. Note that you must handle + * freeing the old ones yourself. Also you must ensure dm->num****Data + * is correct.*/ void CDDM_set_mvert(struct DerivedMesh *dm, struct MVert *mvert); void CDDM_set_medge(struct DerivedMesh *dm, struct MEdge *medge); void CDDM_set_mface(struct DerivedMesh *dm, struct MFace *mface); diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index c453a9b0497..98e273f59b2 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -51,7 +51,7 @@ struct CollisionTree; #define SOFTGOALSNAP 0.999f /* This is approximately the smallest number that can be -* represented by a float, given its precision. */ + * represented by a float, given its precision. */ #define ALMOST_ZERO FLT_EPSILON /* Bits to or into the ClothVertex.flags. */ @@ -60,15 +60,15 @@ struct CollisionTree; #define CLOTH_VERT_FLAG_PINNED_EM 3 /** -* This structure describes a cloth object against which the -* simulation can run. -* -* The m and n members of this structure represent the assumed -* rectangular ordered grid for which the original paper is written. -* At some point they need to disappear and we need to determine out -* own connectivity of the mesh based on the actual edges in the mesh. -* -**/ + * This structure describes a cloth object against which the + * simulation can run. + * + * The m and n members of this structure represent the assumed + * rectangular ordered grid for which the original paper is written. + * At some point they need to disappear and we need to determine out + * own connectivity of the mesh based on the actual edges in the mesh. + * + */ typedef struct Cloth { struct ClothVertex *verts; /* The vertices that represent this cloth. */ @@ -237,7 +237,7 @@ typedef enum /* This structure defines how to call the solver. -*/ + */ typedef struct { const char *name; diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index c4f860e820f..5966f8e0ff0 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -170,10 +170,10 @@ const char *CTX_wm_operator_poll_msg_get(struct bContext *C); void CTX_wm_operator_poll_msg_set(struct bContext *C, const char *msg); /* Data Context - - - listbases consist of CollectionPointerLink items and must be - freed with BLI_freelistN! - - the dir listbase consits of LinkData items */ + * + * - listbases consist of CollectionPointerLink items and must be + * freed with BLI_freelistN! + * - the dir listbase consits of LinkData items */ /* data type, needed so we can tell between a NULL pointer and an empty list */ enum { @@ -201,8 +201,10 @@ short CTX_data_type_get(struct bContextDataResult *result); int CTX_data_equals(const char *member, const char *str); int CTX_data_dir(const char *member); -/*void CTX_data_pointer_set(bContextDataResult *result, void *data); -void CTX_data_list_add(bContextDataResult *result, void *data);*/ +#if 0 +void CTX_data_pointer_set(bContextDataResult *result, void *data); +void CTX_data_list_add(bContextDataResult *result, void *data); +#endif #define CTX_DATA_BEGIN(C, Type, instance, member) \ { \ diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index b414f36b8c8..67b8668348f 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -78,9 +78,9 @@ extern const CustomDataMask CD_MASK_FACECORNERS; */ int CustomData_layer_has_math(struct CustomData *data, int layern); -/*copies the "value" (e.g. mloopuv uv or mloopcol colors) from one block to - another, while not overwriting anything else (e.g. flags). probably only - implemented for mloopuv/mloopcol, for now.*/ +/* copies the "value" (e.g. mloopuv uv or mloopcol colors) from one block to + * another, while not overwriting anything else (e.g. flags). probably only + * implemented for mloopuv/mloopcol, for now.*/ void CustomData_data_copy_value(int type, void *source, void *dest); /* compares if data1 is equal to data2. type is a valid CustomData type @@ -106,9 +106,9 @@ void CustomData_update_typemap(struct CustomData *data); void CustomData_merge(const struct CustomData *source, struct CustomData *dest, CustomDataMask mask, int alloctype, int totelem); -/*bmesh version of CustomData_merge; merges the layouts of source and dest, - then goes through the mesh and makes sure all the customdata blocks are - consistent with the new layout.*/ +/* bmesh version of CustomData_merge; merges the layouts of source and dest, + * then goes through the mesh and makes sure all the customdata blocks are + * consistent with the new layout.*/ void CustomData_bmesh_merge(struct CustomData *source, struct CustomData *dest, int mask, int alloctype, struct BMesh *bm, const char htype); @@ -210,8 +210,8 @@ void CustomData_bmesh_interp(struct CustomData *data, void **src_blocks, /* swaps the data in the element corners, to new corners with indices as - specified in corner_indices. for edges this is an array of length 2, for - faces an array of length 4 */ + * specified in corner_indices. for edges this is an array of length 2, for + * faces an array of length 4 */ void CustomData_swap(struct CustomData *data, int index, const int *corner_indices); /* gets a pointer to the data element at index from the first layer of type @@ -311,7 +311,7 @@ void CustomData_set_layer_unique_name(struct CustomData *data, int index); void CustomData_validate_layer_name(const struct CustomData *data, int type, char *name, char *outname); /* for file reading compatibility, returns false if the layer was freed, - only after this test passes, layer->data should be assigned */ + * only after this test passes, layer->data should be assigned */ int CustomData_verify_versions(struct CustomData *data, int index); /*BMesh specific customdata stuff*/ diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h index fcc9f860471..b7edf04724d 100644 --- a/source/blender/blenkernel/BKE_depsgraph.h +++ b/source/blender/blenkernel/BKE_depsgraph.h @@ -34,9 +34,7 @@ extern "C" { #endif -/* -#define DEPS_DEBUG -*/ +// #define DEPS_DEBUG struct ID; struct Main; diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h index b6de8188536..a71522773fe 100644 --- a/source/blender/blenkernel/BKE_dynamicpaint.h +++ b/source/blender/blenkernel/BKE_dynamicpaint.h @@ -32,7 +32,7 @@ typedef struct PaintSurfaceData { typedef struct PaintPoint { /* Wet paint is handled at effect layer only - * and mixed to surface when drying */ + * and mixed to surface when drying */ float e_color[3]; float e_alpha; float wetness; diff --git a/source/blender/blenkernel/BKE_icons.h b/source/blender/blenkernel/BKE_icons.h index 3be11913f9e..e1f8df941cb 100644 --- a/source/blender/blenkernel/BKE_icons.h +++ b/source/blender/blenkernel/BKE_icons.h @@ -33,8 +33,8 @@ */ /* - Resizable Icons for Blender -*/ + * Resizable Icons for Blender + */ typedef void (*DrawInfoFreeFP) (void *drawinfo); diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h index c4321d25271..55dbca99684 100644 --- a/source/blender/blenkernel/BKE_idprop.h +++ b/source/blender/blenkernel/BKE_idprop.h @@ -58,8 +58,8 @@ typedef union IDPropertyTemplate { /* ----------- Property Array Type ---------- */ -/*note: as a start to move away from the stupid IDP_New function, this type - has it's own allocation function.*/ +/* note: as a start to move away from the stupid IDP_New function, this type + * has it's own allocation function.*/ IDProperty *IDP_NewIDPArray(const char *name); IDProperty *IDP_CopyIDPArray(IDProperty *array); @@ -93,104 +93,108 @@ void IDP_UnlinkID(struct IDProperty *prop); void IDP_SyncGroupValues(struct IDProperty *dest, struct IDProperty *src); /** - replaces all properties with the same name in a destination group from a source group. -*/ + * replaces all properties with the same name in a destination group from a source group. + */ void IDP_ReplaceGroupInGroup(struct IDProperty *dest, struct IDProperty *src); -/** checks if a property with the same name as prop exists, and if so replaces it. - Use this to preserve order!*/ +/** + * Checks if a property with the same name as prop exists, and if so replaces it. + * Use this to preserve order!*/ void IDP_ReplaceInGroup(struct IDProperty *group, struct IDProperty *prop); /** -This function has a sanity check to make sure ID properties with the same name don't -get added to the group. - -The sanity check just means the property is not added to the group if another property -exists with the same name; the client code using ID properties then needs to detect this -(the function that adds new properties to groups, IDP_AddToGroup, returns 0 if a property can't -be added to the group, and 1 if it can) and free the property. - -Currently the code to free ID properties is designesd to leave the actual struct -you pass it un-freed, this is needed for how the system works. This means -to free an ID property, you first call IDP_FreeProperty then MEM_freeN the -struct. In the future this will just be IDP_FreeProperty and the code will -be reorganized to work properly. -*/ + * This function has a sanity check to make sure ID properties with the same name don't + * get added to the group. + * + * The sanity check just means the property is not added to the group if another property + * exists with the same name; the client code using ID properties then needs to detect this + * (the function that adds new properties to groups, IDP_AddToGroup, returns 0 if a property can't + * be added to the group, and 1 if it can) and free the property. + * + * Currently the code to free ID properties is designesd to leave the actual struct + * you pass it un-freed, this is needed for how the system works. This means + * to free an ID property, you first call IDP_FreeProperty then MEM_freeN the + * struct. In the future this will just be IDP_FreeProperty and the code will + * be reorganized to work properly. + */ int IDP_AddToGroup(struct IDProperty *group, struct IDProperty *prop); /** this is the same as IDP_AddToGroup, only you pass an item - in the group list to be inserted after.*/ + * in the group list to be inserted after. */ int IDP_InsertToGroup(struct IDProperty *group, struct IDProperty *previous, struct IDProperty *pnew); /** \note this does not free the property!! - - To free the property, you have to do: - IDP_FreeProperty(prop); //free all subdata - MEM_freeN(prop); //free property struct itself - -*/ + * + * To free the property, you have to do: + * IDP_FreeProperty(prop); //free all subdata + * MEM_freeN(prop); //free property struct itself + */ void IDP_RemFromGroup(struct IDProperty *group, struct IDProperty *prop); IDProperty *IDP_GetPropertyFromGroup(struct IDProperty *prop, const char *name); /** same as above but ensure type match */ IDProperty *IDP_GetPropertyTypeFromGroup(struct IDProperty *prop, const char *name, const char type); -/** Get an iterator to iterate over the members of an id property group. - Note that this will automatically free the iterator once iteration is complete; - if you stop the iteration before hitting the end, make sure to call - IDP_FreeIterBeforeEnd().*/ +/** + * Get an iterator to iterate over the members of an id property group. + * Note that this will automatically free the iterator once iteration is complete; + * if you stop the iteration before hitting the end, make sure to call + * IDP_FreeIterBeforeEnd(). */ void *IDP_GetGroupIterator(struct IDProperty *prop); -/** Returns the next item in the iteration. To use, simple for a loop like the following: - while (IDP_GroupIterNext(iter) != NULL) { - . . . - }*/ +/** + * Returns the next item in the iteration. To use, simple for a loop like the following: + * while (IDP_GroupIterNext(iter) != NULL) { + * ... + * } + */ IDProperty *IDP_GroupIterNext(void *vself); -/** Frees the iterator pointed to at vself, only use this if iteration is stopped early; - when the iterator hits the end of the list it'll automatially free itself.*/ +/** + * Frees the iterator pointed to at vself, only use this if iteration is stopped early; + * when the iterator hits the end of the list it'll automatially free itself.*/ void IDP_FreeIterBeforeEnd(void *vself); /*-------- Main Functions --------*/ /** Get the Group property that contains the id properties for ID id. Set create_if_needed - to create the Group property and attach it to id if it doesn't exist; otherwise - the function will return NULL if there's no Group property attached to the ID.*/ + * to create the Group property and attach it to id if it doesn't exist; otherwise + * the function will return NULL if there's no Group property attached to the ID.*/ struct IDProperty *IDP_GetProperties(struct ID *id, int create_if_needed); struct IDProperty *IDP_CopyProperty(struct IDProperty *prop); int IDP_EqualsProperties(struct IDProperty *prop1, struct IDProperty *prop2); /** -Allocate a new ID. - -This function takes three arguments: the ID property type, a union which defines -it's initial value, and a name. - -The union is simple to use; see the top of this header file for its definition. -An example of using this function: - - IDPropertyTemplate val; - IDProperty *group, *idgroup, *color; - group = IDP_New(IDP_GROUP, val, "group1"); //groups don't need a template. - - val.array.len = 4 - val.array.type = IDP_FLOAT; - color = IDP_New(IDP_ARRAY, val, "color1"); - - idgroup = IDP_GetProperties(some_id, 1); - IDP_AddToGroup(idgroup, color); - IDP_AddToGroup(idgroup, group); - -Note that you MUST either attach the id property to an id property group with -IDP_AddToGroup or MEM_freeN the property, doing anything else might result in -a memory leak. -*/ + * Allocate a new ID. + * + * This function takes three arguments: the ID property type, a union which defines + * it's initial value, and a name. + * + * The union is simple to use; see the top of this header file for its definition. + * An example of using this function: + * + * IDPropertyTemplate val; + * IDProperty *group, *idgroup, *color; + * group = IDP_New(IDP_GROUP, val, "group1"); //groups don't need a template. + * + * val.array.len = 4 + * val.array.type = IDP_FLOAT; + * color = IDP_New(IDP_ARRAY, val, "color1"); + * + * idgroup = IDP_GetProperties(some_id, 1); + * IDP_AddToGroup(idgroup, color); + * IDP_AddToGroup(idgroup, group); + * + * Note that you MUST either attach the id property to an id property group with + * IDP_AddToGroup or MEM_freeN the property, doing anything else might result in + * a memory leak. + */ struct IDProperty *IDP_New(const int type, const IDPropertyTemplate *val, const char *name); /** \note this will free all child properties of list arrays and groups! - Also, note that this does NOT unlink anything! Plus it doesn't free - the actual struct IDProperty struct either.*/ + * Also, note that this does NOT unlink anything! Plus it doesn't free + * the actual struct IDProperty struct either.*/ void IDP_FreeProperty(struct IDProperty *prop); /** Unlinks any struct IDProperty<->ID linkage that might be going on.*/ diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 4a37252e3fb..65ebd23d742 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -100,14 +100,14 @@ float mesh_calc_poly_area(struct MPoly *mpoly, struct MLoop *loopstart, struct MVert *mvarray, float polynormal[3]); /* Find the index of the loop in 'poly' which references vertex, - returns -1 if not found */ + * returns -1 if not found */ int poly_find_loop_from_vert(const struct MPoly *poly, const struct MLoop *loopstart, unsigned vert); /* Fill 'adj_r' with the loop indices in 'poly' adjacent to the - vertex. Returns the index of the loop matching vertex, or -1 if the - vertex is not in 'poly' */ + * vertex. Returns the index of the loop matching vertex, or -1 if the + * vertex is not in 'poly' */ int poly_get_adj_loops_from_vert(unsigned adj_r[3], const struct MPoly *poly, const struct MLoop *mloop, unsigned vert); @@ -141,10 +141,10 @@ void mesh_set_smooth_flag(struct Object *meshOb, int enableSmooth); void convert_mfaces_to_mpolys(struct Mesh *mesh); void mesh_calc_normals_tessface(struct MVert *mverts, int numVerts,struct MFace *mfaces, int numFaces, float (*faceNors_r)[3]); -/*used for unit testing; compares two meshes, checking only - differences we care about. should be usable with leaf's - testing framework I get RNA work done, will use hackish - testing code for now.*/ +/* used for unit testing; compares two meshes, checking only + * differences we care about. should be usable with leaf's + * testing framework I get RNA work done, will use hackish + * testing code for now.*/ const char *mesh_cmp(struct Mesh *me1, struct Mesh *me2, float thresh); struct BoundBox *mesh_get_bb(struct Object *ob); diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index de4f0a7eac6..937eb02743f 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -92,7 +92,7 @@ typedef enum { eModifierTypeFlag_RequiresOriginalData = (1<<5), /* For modifiers that support pointcache, so we can check to see if it has files we need to deal with - */ + */ eModifierTypeFlag_UsesPointCache = (1<<6), /* For physics modifiers, max one per type */ diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index 4407be4c8be..08f9dfb05f3 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -80,8 +80,8 @@ typedef struct ParticleSimulationData { struct ParticleSystemModifierData *psmd; struct ListBase *colliders; /* Courant number. This is used to implement an adaptive time step. Only the - maximum value per time step is important. Only sph_integrate makes use of - this at the moment. Other solvers could, too. */ + * maximum value per time step is important. Only sph_integrate makes use of + * this at the moment. Other solvers could, too. */ float courant_num; } ParticleSimulationData; diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index c254144b812..fbb93c761c2 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -55,7 +55,7 @@ struct wmWindowManager; #include "RNA_types.h" /* spacetype has everything stored to get an editor working, it gets initialized via - ED_spacetypes_init() in editors/area/spacetypes.c */ + * ED_spacetypes_init() in editors/area/spacetypes.c */ /* an editor in Blender is a combined ScrArea + SpaceType + SpaceData */ #define BKE_ST_MAXNAME 64 diff --git a/source/blender/blenkernel/BKE_suggestions.h b/source/blender/blenkernel/BKE_suggestions.h index 6168b98ac4c..9b61d9141fb 100644 --- a/source/blender/blenkernel/BKE_suggestions.h +++ b/source/blender/blenkernel/BKE_suggestions.h @@ -36,19 +36,19 @@ extern "C" { #endif /* **************************************************************************** -Suggestions should be added in sorted order although a linear sorting method is -implemented. The list is then divided up based on the prefix provided by -update_suggestions: - -Example: - Prefix: ab - aaa <-- first - aab - aba <-- firstmatch - abb <-- lastmatch - baa - bab <-- last -**************************************************************************** */ + * Suggestions should be added in sorted order although a linear sorting method is + * implemented. The list is then divided up based on the prefix provided by + * update_suggestions: + * + * Example: + * Prefix: ab + * aaa <-- first + * aab + * aba <-- firstmatch + * abb <-- lastmatch + * baa + * bab <-- last + **************************************************************************** */ struct Text; diff --git a/source/blender/blenkernel/BKE_tessmesh.h b/source/blender/blenkernel/BKE_tessmesh.h index d935c932387..451fbcdfd28 100644 --- a/source/blender/blenkernel/BKE_tessmesh.h +++ b/source/blender/blenkernel/BKE_tessmesh.h @@ -31,20 +31,19 @@ struct BMFace; struct Mesh; struct DerivedMesh; -/* -ok: the EDBM module is for editmode bmesh stuff. in contrast, the - BMEdit module is for code shared with blenkernel that concerns - the BMEditMesh structure. -*/ +/* ok: the EDBM module is for editmode bmesh stuff. in contrast, the + * BMEdit module is for code shared with blenkernel that concerns + * the BMEditMesh structure. + */ -/*this structure replaces EditMesh. - - through this, you get access to both the edit bmesh, - it's tessellation, and various stuff that doesn't belong in the BMesh - struct itself. - - the entire derivedmesh and modifier system works with this structure, - and not BMesh. Mesh->edit_bmesh stores a pointer to this structure.*/ +/* this structure replaces EditMesh. + * + * through this, you get access to both the edit bmesh, + * it's tessellation, and various stuff that doesn't belong in the BMesh + * struct itself. + * + * the entire derivedmesh and modifier system works with this structure, + * and not BMesh. Mesh->edit_bmesh stores a pointer to this structure. */ typedef struct BMEditMesh { struct BMesh *bm; @@ -52,8 +51,8 @@ typedef struct BMEditMesh { struct BMEditMesh *emcopy; int emcopyusers; - /*we store tessellations as triplets of three loops, - which each define a triangle.*/ + /* we store tessellations as triplets of three loops, + * which each define a triangle.*/ struct BMLoop *(*looptris)[3]; int tottri; diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c index f843d21a975..c6adc3ea494 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.c +++ b/source/blender/blenkernel/intern/CCGSubSurf.c @@ -2468,7 +2468,7 @@ CCGError ccgSubSurf_updateToFaces(CCGSubSurf *ss, int lvl, CCGFace **effectedF, } /* stitch together face grids, averaging coordinates at edges - and vertices, for multires displacements */ + * and vertices, for multires displacements */ CCGError ccgSubSurf_stitchFaces(CCGSubSurf *ss, int lvl, CCGFace **effectedF, int numEffectedF) { CCGVert **effectedV; @@ -2634,8 +2634,8 @@ CCGError ccgSubSurf_updateNormals(CCGSubSurf *ss, CCGFace **effectedF, int numEf } /* compute subdivision levels from a given starting point, used by - multires subdivide/propagate, by filling in coordinates at a - certain level, and then subdividing that up to the highest level */ + * multires subdivide/propagate, by filling in coordinates at a + * certain level, and then subdividing that up to the highest level */ CCGError ccgSubSurf_updateLevels(CCGSubSurf *ss, int lvl, CCGFace **effectedF, int numEffectedF) { CCGVert **effectedV; diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index c181548eb19..b1b98c030eb 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -65,17 +65,17 @@ #include "RNA_access.h" /* *********************** NOTE ON POSE AND ACTION ********************** - - - Pose is the local (object level) component of armature. The current - object pose is saved in files, and (will be) is presorted for dependency - - Actions have fewer (or other) channels, and write data to a Pose - - Currently ob->pose data is controlled in where_is_pose only. The (recalc) - event system takes care of calling that - - The NLA system (here too) uses Poses as interpolation format for Actions - - Therefore we assume poses to be static, and duplicates of poses have channels in - same order, for quick interpolation reasons - - ****************************** (ton) ************************************ */ + * + * - Pose is the local (object level) component of armature. The current + * object pose is saved in files, and (will be) is presorted for dependency + * - Actions have fewer (or other) channels, and write data to a Pose + * - Currently ob->pose data is controlled in where_is_pose only. The (recalc) + * event system takes care of calling that + * - The NLA system (here too) uses Poses as interpolation format for Actions + * - Therefore we assume poses to be static, and duplicates of poses have channels in + * same order, for quick interpolation reasons + * + * ****************************** (ton) ************************************ */ /* ***************** Library data level operations on action ************** */ @@ -1214,23 +1214,22 @@ static void blend_pose_strides(bPose *dst, bPose *src, float srcweight, short mo } -/* - -bone matching diagram, strips A and B - - .------------------------. - | A | - '------------------------' - . . b2 - . .-------------v----------. - . | B . | - . '------------------------' - . . . - . . . -offset: . 0 . A-B . A-b2+B - . . . - -*/ +/* + * bone matching diagram, strips A and B + * + * .------------------------. + * | A | + * '------------------------' + * . . b2 + * . .-------------v----------. + * . | B . | + * . '------------------------' + * . . . + * . . . + * offset: . 0 . A-B . A-b2+B + * . . . + * + * */ static void blend_pose_offset_bone(bActionStrip *strip, bPose *dst, bPose *src, float srcweight, short mode) @@ -1294,8 +1293,8 @@ static void blend_pose_offset_bone(bActionStrip *strip, bPose *dst, bPose *src, } /* added "sizecorr" here, to allow armatures to be scaled and still have striding. - Only works for uniform scaling. In general I'd advise against scaling armatures ever though! (ton) -*/ + * Only works for uniform scaling. In general I'd advise against scaling armatures ever though! (ton) + */ static float stridechannel_frame(Object *ob, float sizecorr, bActionStrip *strip, Path *path, float pathdist, float *stride_offset) { bAction *act= strip->act; diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index a9b58ea1f99..743cfba0185 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -955,8 +955,8 @@ static void vertex_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, fl /* par_space_mat - only used for groups so we can modify the space dupli's are in - when par_space_mat is NULL ob->obmat can be used instead of ob__obmat - */ + * when par_space_mat is NULL ob->obmat can be used instead of ob__obmat + */ if(par_space_mat) mult_m4_m4m4(vdd.obmat, par_space_mat, ob->obmat); else @@ -1085,8 +1085,8 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa /* End Scene/Group object loop, below is generic */ /* par_space_mat - only used for groups so we can modify the space dupli's are in - when par_space_mat is NULL ob->obmat can be used instead of ob__obmat - */ + * when par_space_mat is NULL ob->obmat can be used instead of ob__obmat + */ if(par_space_mat) mult_m4_m4m4(ob__obmat, par_space_mat, ob->obmat); else @@ -1117,11 +1117,11 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa v1= mvert[(mv1= loopstart[0].v)].co; v2= mvert[(mv2= loopstart[1].v)].co; v3= mvert[(mv3= loopstart[2].v)].co; - /* +#if 0 if (mp->totloop > 3) { v4= mvert[(mv4= loopstart[3].v)].co; } - */ +#endif } /* translation */ @@ -1626,8 +1626,8 @@ void free_object_duplilist(ListBase *lb) DupliObject *dob; /* loop in reverse order, if object is instanced multiple times - the original layer may not really be original otherwise, proper - solution is more complicated */ + * the original layer may not really be original otherwise, proper + * solution is more complicated */ for(dob= lb->last; dob; dob= dob->prev) { dob->ob->lay= dob->origlay; copy_m4_m4(dob->ob->obmat, dob->omat); diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 4ac1f126c35..cb54e9158dd 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -1191,8 +1191,8 @@ static short animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_i #endif /* as long as we don't do property update, we still tag datablock - as having been updated. this flag does not cause any updates to - be run, it's for e.g. render engines to synchronize data */ + * as having been updated. this flag does not cause any updates to + * be run, it's for e.g. render engines to synchronize data */ if(new_ptr.id.data) { ID *id= new_ptr.id.data; id->flag |= LIB_ID_RECALC; diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index bc18332844b..263e90b6559 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -1584,7 +1584,7 @@ void where_is_armature_bone(Bone *bone, Bone *prevbone) } /* updates vectors and matrices on rest-position level, only needed - after editing armature itself, now only on reading file */ + * after editing armature itself, now only on reading file */ void where_is_armature(bArmature *arm) { Bone *bone; diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 9e706c48430..c178bf6f0a7 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -201,7 +201,7 @@ void make_local_brush(Brush *brush) if(brush->clone.image) { /* special case: ima always local immediately. Clone image should only - have one user anyway. */ + * have one user anyway. */ id_clear_lib_data(bmain, &brush->clone.image->id); extern_local_brush(brush); } @@ -331,10 +331,8 @@ void brush_debug_print_state(Brush *br) void brush_reset_sculpt(Brush *br) { /* enable this to see any non-default - settings used by a brush: - - brush_debug_print_state(br); - */ + * settings used by a brush: */ + // brush_debug_print_state(br); brush_set_defaults(br); brush_curve_preset(br, CURVE_PRESET_SMOOTH); @@ -857,8 +855,8 @@ static void brush_painter_do_partial(BrushPainter *painter, ImBuf *oldtexibuf, dotexold = (oldtexibuf != NULL); /* not sure if it's actually needed or it's a mistake in coords/sizes - calculation in brush_painter_fixed_tex_partial_update(), but without this - limitation memory gets corrupted at fast strokes with quite big spacing (sergey) */ + * calculation in brush_painter_fixed_tex_partial_update(), but without this + * limitation memory gets corrupted at fast strokes with quite big spacing (sergey) */ w = MIN2(w, ibuf->x); h = MIN2(h, ibuf->y); @@ -1049,7 +1047,7 @@ void brush_jitter_pos(const Scene *scene, Brush *brush, const float pos[2], floa int use_jitter= brush->jitter != 0; /* jitter-ed brush gives weird and unpredictable result for this - kinds of stroke, so manyally disable jitter usage (sergey) */ + * kinds of stroke, so manyally disable jitter usage (sergey) */ use_jitter &= (brush->flag & (BRUSH_RESTORE_MESH|BRUSH_ANCHORED)) == 0; if (use_jitter) { @@ -1139,7 +1137,7 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, const float pos[2 const int radius= brush_size(scene, brush); /* compute brush spacing adapted to brush radius, spacing may depend - on pressure, so update it */ + * on pressure, so update it */ brush_apply_pressure(painter, brush, painter->lastpressure); spacing= MAX2(1.0f, radius)*brush->spacing*0.01f; @@ -1188,8 +1186,8 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, const float pos[2 } /* do airbrush paint ops, based on the number of paint ops left over - from regular painting. this is a temporary solution until we have - accurate time stamps for mouse move events */ + * from regular painting. this is a temporary solution until we have + * accurate time stamps for mouse move events */ if (brush->flag & BRUSH_AIRBRUSH) { double curtime= time; double painttime= brush->rate*totpaintops; diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c index 0af3c9c9f02..8d9333c8aec 100644 --- a/source/blender/blenkernel/intern/bvhutils.c +++ b/source/blender/blenkernel/intern/bvhutils.c @@ -588,17 +588,17 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float { BMEditMesh *em= data->em_evil; if(em) { - /*data->em_evil is only set for snapping, and only for the mesh of the object - which is currently open in edit mode. When set, the bvhtree should not contain - faces that will interfere with snapping (e.g. faces that are hidden/selected - or faces that have selected verts).*/ + /* data->em_evil is only set for snapping, and only for the mesh of the object + * which is currently open in edit mode. When set, the bvhtree should not contain + * faces that will interfere with snapping (e.g. faces that are hidden/selected + * or faces that have selected verts).*/ /* XXX, for snap only, em & dm are assumed to be aligned, since dm is the em's cage */ - /*Insert BMesh-tessellation triangles into the bvh tree, unless they are hidden - and/or selected. Even if the faces themselves are not selected for the snapped - transform, having a vertex selected means the face (and thus it's tesselated - triangles) will be moving and will not be a good snap targets.*/ + /* Insert BMesh-tessellation triangles into the bvh tree, unless they are hidden + * and/or selected. Even if the faces themselves are not selected for the snapped + * transform, having a vertex selected means the face (and thus it's tesselated + * triangles) will be moving and will not be a good snap targets.*/ for (i = 0; i < em->tottri; i++) { BMLoop **tri = em->looptris[i]; BMFace *f; @@ -606,28 +606,28 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float BMIter iter; int insert; - /*Each loop of the triangle points back to the BMFace it was tesselated from. - All three should point to the same face, so just use the face from the first - loop.*/ + /* Each loop of the triangle points back to the BMFace it was tesselated from. + * All three should point to the same face, so just use the face from the first + * loop.*/ f = tri[0]->f; - /*If the looptris is ordered such that all triangles tesselated from a single - faces are consecutive elements in the array, then we could speed up the tests - below by using the insert value from the previous iteration.*/ + /* If the looptris is ordered such that all triangles tesselated from a single + * faces are consecutive elements in the array, then we could speed up the tests + * below by using the insert value from the previous iteration.*/ /*Start with the assumption the triangle should be included for snapping.*/ insert = 1; if (BM_elem_flag_test(f, BM_ELEM_SELECT) || BM_elem_flag_test(f, BM_ELEM_HIDDEN)) { - /*Don't insert triangles tesselated from faces that are hidden - or selected*/ + /* Don't insert triangles tesselated from faces that are hidden + * or selected*/ insert = 0; } else { BM_ITER(v, &iter, em->bm, BM_VERTS_OF_FACE, f) { if (BM_elem_flag_test(v, BM_ELEM_SELECT)) { - /*Don't insert triangles tesselated from faces that have - any selected verts.*/ + /* Don't insert triangles tesselated from faces that have + * any selected verts.*/ insert = 0; } } @@ -635,8 +635,8 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float if (insert) { - /*No reason found to block hit-testing the triangle for snap, - so insert it now.*/ + /* No reason found to block hit-testing the triangle for snap, + * so insert it now.*/ float co[4][3]; copy_v3_v3(co[0], tri[0]->v->co); copy_v3_v3(co[1], tri[1]->v->co); diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index 108b4e48a95..4f288594dc9 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -386,7 +386,7 @@ static void calchandle_curvemap(BezTriple *bezt, BezTriple *prev, BezTriple *nex } /* in X, out Y. - X is presumed to be outside first or last */ + * X is presumed to be outside first or last */ static float curvemap_calc_extend(CurveMap *cuma, float x, const float first[2], const float last[2]) { if(x <= first[0]) { @@ -454,7 +454,7 @@ static void curvemap_make_table(CurveMap *cuma, rctf *clipr) } /* first and last handle need correction, instead of pointing to center of next/prev, - we let it point to the closest handle */ + * we let it point to the closest handle */ if(cuma->totpoint>2) { float hlen, nlen, vec[3]; diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 931934f8052..5af72e6115c 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -1135,13 +1135,13 @@ float *make_orco_surf(Object *ob) nu= cu->nurb.first; while(nu) { /* as we want to avoid the seam in a cyclic nurbs - texture wrapping, reserve extra orco data space to save these extra needed - vertex based UV coordinates for the meridian vertices. - Vertices on the 0/2pi boundary are not duplicated inside the displist but later in - the renderface/vert construction. - - See also convertblender.c: init_render_surf() - */ + * texture wrapping, reserve extra orco data space to save these extra needed + * vertex based UV coordinates for the meridian vertices. + * Vertices on the 0/2pi boundary are not duplicated inside the displist but later in + * the renderface/vert construction. + * + * See also convertblender.c: init_render_surf() + */ resolu= cu->resolu_ren ? cu->resolu_ren : nu->resolu; resolv= cu->resolv_ren ? cu->resolv_ren : nu->resolv; @@ -1505,11 +1505,11 @@ static int cu_isectLL(const float v1[3], const float v2[3], const float v3[3], c float *labda, float *mu, float vec[3]) { /* return: - -1: colliniar - 0: no intersection of segments - 1: exact intersection of segments - 2: cross-intersection of segments - */ + * -1: colliniar + * 0: no intersection of segments + * 1: exact intersection of segments + * 2: cross-intersection of segments + */ float deler; deler= (v1[cox]-v2[cox])*(v3[coy]-v4[coy])-(v3[cox]-v4[cox])*(v1[coy]-v2[coy]); @@ -1572,7 +1572,7 @@ static short bevelinside(BevList *bl1,BevList *bl2) /* there's a transition, calc intersection point */ mode= cu_isectLL(prevbevp->vec, bevp->vec, hvec1, hvec2, 0, 1, &lab, &mu, vec); /* if lab==0.0 or lab==1.0 then the edge intersects exactly a transition - only allow for one situation: we choose lab= 1.0 + * only allow for one situation: we choose lab= 1.0 */ if(mode >= 0 && lab != 0.0f) { if(vec[0]disps); s->totdisp= (s->totdisp/corners)*nverts; @@ -1481,7 +1481,7 @@ static CustomDataLayer *customData_add_layer__internal(CustomData *data, void *newlayerdata = NULL; /* Passing a layerdata to copy from with an alloctype that won't copy is - most likely a bug */ + * most likely a bug */ BLI_assert(!layerdata || (alloctype == CD_ASSIGN) || (alloctype == CD_DUPLICATE) || @@ -2307,8 +2307,8 @@ int CustomData_layer_has_math(struct CustomData *data, int layern) return 0; } -/*copies the "value" (e.g. mloopuv uv or mloopcol colors) from one block to - another, while not overwriting anything else (e.g. flags)*/ +/* copies the "value" (e.g. mloopuv uv or mloopcol colors) from one block to + * another, while not overwriting anything else (e.g. flags)*/ void CustomData_data_copy_value(int type, void *source, void *dest) { const LayerTypeInfo *typeInfo = layerType_getInfo(type); @@ -2626,8 +2626,8 @@ void CustomData_validate_layer_name(const CustomData *data, int type, char *name if(index < 0) { /* either no layer was specified, or the layer we want has been - * deleted, so assign the active layer to name - */ + * deleted, so assign the active layer to name + */ index = CustomData_get_active_layer_index(data, type); strcpy(outname, data->layers[index].name); } diff --git a/source/blender/blenkernel/intern/customdata_file.c b/source/blender/blenkernel/intern/customdata_file.c index 75898018a2b..4386132fc18 100644 --- a/source/blender/blenkernel/intern/customdata_file.c +++ b/source/blender/blenkernel/intern/customdata_file.c @@ -109,13 +109,15 @@ static int cdf_endian(void) return CDF_ENDIAN_BIG; } -/*static int cdf_data_type_size(int datatype) +#if 0 +static int cdf_data_type_size(int datatype) { if(datatype == CDF_DATA_FLOAT) return sizeof(float); return 0; -}*/ +} +#endif CDataFile *cdf_create(int type) { diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 83d64f693e2..9e4762a2dbe 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -4763,8 +4763,8 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, Scene *sc } /* -* Do Dynamic Paint step. Paints scene brush objects of current state/frame to the surface. -*/ + * Do Dynamic Paint step. Paints scene brush objects of current state/frame to the surface. + */ static int dynamicPaint_doStep(Scene *scene, Object *ob, DynamicPaintSurface *surface, float timescale, float subframe) { PaintSurfaceData *sData = surface->data; @@ -4775,8 +4775,8 @@ static int dynamicPaint_doStep(Scene *scene, Object *ob, DynamicPaintSurface *su dynamicPaint_surfacePreStep(surface, timescale); /* - * Loop through surface's target paint objects and do painting - */ + * Loop through surface's target paint objects and do painting + */ { Base *base = NULL; GroupObject *go = NULL; @@ -4924,8 +4924,8 @@ static int dynamicPaint_doStep(Scene *scene, Object *ob, DynamicPaintSurface *su } /* -* Calculate a single frame and included subframes for surface -*/ + * Calculate a single frame and included subframes for surface + */ int dynamicPaint_calculateFrame(DynamicPaintSurface *surface, Scene *scene, Object *cObject, int frame) { float timescale = 1.0f; diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index 139f7d55438..0080367d9d0 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -90,13 +90,13 @@ BMEditMesh *BMEdit_Copy(BMEditMesh *tm) tm2->bm = BM_mesh_copy(tm->bm); - /*The tessellation is NOT calculated on the copy here, - because currently all the callers of this function use - it to make a backup copy of the BMEditMesh to restore - it in the case of errors in an operation. For perf - reasons, in that case it makes more sense to do the - tessellation only when/if that copy ends up getting - used.*/ + /* The tessellation is NOT calculated on the copy here, + * because currently all the callers of this function use + * it to make a backup copy of the BMEditMesh to restore + * it in the case of errors in an operation. For perf + * reasons, in that case it makes more sense to do the + * tessellation only when/if that copy ends up getting + * used.*/ tm2->looptris = NULL; tm2->vert_index = NULL; @@ -311,18 +311,18 @@ void BMEdit_Free(BMEditMesh *em) } /* -ok, basic design: - -the bmesh derivedmesh exposes the mesh as triangles. it stores pointers -to three loops per triangle. the derivedmesh stores a cache of tessellations -for each face. this cache will smartly update as needed (though at first -it'll simply be more brute force). keeping track of face/edge counts may -be a small problbm. - -this won't be the most efficient thing, considering that internal edges and -faces of tessellations are exposed. looking up an edge by index in particular -is likely to be a little slow. -*/ + * ok, basic design: + * + * the bmesh derivedmesh exposes the mesh as triangles. it stores pointers + * to three loops per triangle. the derivedmesh stores a cache of tessellations + * for each face. this cache will smartly update as needed (though at first + * it'll simply be more brute force). keeping track of face/edge counts may + * be a small problbm. + * + * this won't be the most efficient thing, considering that internal edges and + * faces of tessellations are exposed. looking up an edge by index in particular + * is likely to be a little slow. + */ typedef struct EditDerivedBMesh { DerivedMesh dm; @@ -342,7 +342,7 @@ typedef struct EditDerivedBMesh { static void emDM_calcNormals(DerivedMesh *UNUSED(dm)) { /* Nothing to do: normals are already calculated and stored on the - BMVerts and BMFaces */ + * BMVerts and BMFaces */ } static void emDM_recalcTessellation(DerivedMesh *UNUSED(dm)) @@ -1511,8 +1511,8 @@ static void *emDM_getTessFaceDataArray(DerivedMesh *dm, int type) data = datalayer = DM_get_tessface_data_layer(dm, type); for (i=0; itc->tottri; i++, data+=size) { efa = bmdm->tc->looptris[i][0]->f; - /*BMESH_TODO: need to still add tface data, - derived from the loops.*/ + /* BMESH_TODO: need to still add tface data, + * derived from the loops.*/ bmdata = CustomData_bmesh_get(&bm->pdata, efa->head.data, type); memcpy(data, bmdata, size); } diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index 82a5d9aba3a..21c798c3cae 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -717,11 +717,11 @@ static void get_effector_tot(EffectorCache *eff, EffectorData *efd, EffectedPoin if(eff->pd->forcefield == PFIELD_CHARGE) { /* Only the charge of the effected particle is used for - interaction, not fall-offs. If the fall-offs aren't the - same this will be unphysical, but for animation this - could be the wanted behavior. If you want physical - correctness the fall-off should be spherical 2.0 anyways. - */ + * interaction, not fall-offs. If the fall-offs aren't the + * same this will be unphysical, but for animation this + * could be the wanted behavior. If you want physical + * correctness the fall-off should be spherical 2.0 anyways. + */ efd->charge = eff->pd->f_strength; } else if(eff->pd->forcefield == PFIELD_HARMONIC && (eff->pd->flag & PFIELD_MULTIPLE_SPRINGS)==0) { @@ -943,34 +943,33 @@ static void do_physical_effector(EffectorCache *eff, EffectorData *efd, Effected } /* -------- pdDoEffectors() -------- - generic force/speed system, now used for particles and softbodies - scene = scene where it runs in, for time and stuff - lb = listbase with objects that take part in effecting - opco = global coord, as input - force = force accumulator - speed = actual current speed which can be altered - cur_time = "external" time in frames, is constant for static particles - loc_time = "local" time in frames, range <0-1> for the lifetime of particle - par_layer = layer the caller is in - flags = only used for softbody wind now - guide = old speed of particle - -*/ + * generic force/speed system, now used for particles and softbodies + * scene = scene where it runs in, for time and stuff + * lb = listbase with objects that take part in effecting + * opco = global coord, as input + * force = force accumulator + * speed = actual current speed which can be altered + * cur_time = "external" time in frames, is constant for static particles + * loc_time = "local" time in frames, range <0-1> for the lifetime of particle + * par_layer = layer the caller is in + * flags = only used for softbody wind now + * guide = old speed of particle + */ void pdDoEffectors(ListBase *effectors, ListBase *colliders, EffectorWeights *weights, EffectedPoint *point, float *force, float *impulse) { /* - Modifies the force on a particle according to its - relation with the effector object - Different kind of effectors include: - Forcefields: Gravity-like attractor - (force power is related to the inverse of distance to the power of a falloff value) - Vortex fields: swirling effectors - (particles rotate around Z-axis of the object. otherwise, same relation as) - (Forcefields, but this is not done through a force/acceleration) - Guide: particles on a path - (particles are guided along a curve bezier or old nurbs) - (is independent of other effectors) -*/ + * Modifies the force on a particle according to its + * relation with the effector object + * Different kind of effectors include: + * Forcefields: Gravity-like attractor + * (force power is related to the inverse of distance to the power of a falloff value) + * Vortex fields: swirling effectors + * (particles rotate around Z-axis of the object. otherwise, same relation as) + * (Forcefields, but this is not done through a force/acceleration) + * Guide: particles on a path + * (particles are guided along a curve bezier or old nurbs) + * (is independent of other effectors) + */ EffectorCache *eff; EffectorData efd; int p=0, tot = 1, step = 1; diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 1c6c229d8fc..3efcd3d8dcf 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -827,7 +827,7 @@ void calchandles_fcurve (FCurve *fcu) * -> Auto handles: become aligned when selection status is NOT(000 || 111) * -> Vector handles: become 'nothing' when (one half selected AND other not) * - PHASE 2: recalculate handles -*/ + */ void testhandles_fcurve (FCurve *fcu, const short use_handle) { BezTriple *bezt; @@ -1686,7 +1686,7 @@ static float evaluate_driver (ChannelDriver *driver, const float evaltime) /* The total length of the handles is not allowed to be more * than the horizontal distance between (v1-v4). * This is to prevent curve loops. -*/ + */ void correct_bezpart(float v1[2], float v2[2], float v3[2], float v4[2]) { float h1[2], h2[2], len1, len2, len, fac; diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 5a37a65ddbf..ba23b2123d6 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -372,7 +372,7 @@ static void buildchar(Main *bmain, Curve *cu, unsigned long character, CharInfo vfd= vfont_get_data(bmain, which_vfont(cu, info)); if (!vfd) return; - /* +#if 0 if (cu->selend < cu->selstart) { if ((charidx >= (cu->selend)) && (charidx <= (cu->selstart-2))) sel= 1; @@ -381,7 +381,7 @@ static void buildchar(Main *bmain, Curve *cu, unsigned long character, CharInfo if ((charidx >= (cu->selstart-1)) && (charidx <= (cu->selend-1))) sel= 1; } - */ +#endif /* make a copy at distance ofsx,ofsy with shear*/ fsize= cu->fsize; @@ -541,7 +541,7 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m wchar_t *mem, *tmp, ascii; /* renark: do calculations including the trailing '\0' of a string - because the cursor can be at that location */ + * because the cursor can be at that location */ if(ob->type!=OB_FONT) return NULL; @@ -941,7 +941,7 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m if(mode==FO_CURSUP || mode==FO_CURSDOWN || mode==FO_PAGEUP || mode==FO_PAGEDOWN) { /* 2: curs up - 3: curs down */ + * 3: curs down */ ct= chartransdata+cu->pos; if((mode==FO_CURSUP || mode==FO_PAGEUP) && ct->linenr==0); diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c index 183483ef7a8..ce840b63d5f 100644 --- a/source/blender/blenkernel/intern/group.c +++ b/source/blender/blenkernel/intern/group.c @@ -337,7 +337,7 @@ static void group_replaces_nla(Object *parent, Object *target, char mode) #endif /* puts all group members in local timing system, after this call -you can draw everything, leaves tags in objects to signal it needs further updating */ + * you can draw everything, leaves tags in objects to signal it needs further updating */ /* note: does not work for derivedmesh and render... it recreates all again in convertblender.c */ void group_handle_recalc_and_update(Scene *scene, Object *UNUSED(parent), Group *group) diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c index 58c88682d3f..533dd783422 100644 --- a/source/blender/blenkernel/intern/icons.c +++ b/source/blender/blenkernel/intern/icons.c @@ -79,7 +79,7 @@ static void icon_free(void *val) } /* create an id for a new icon and make sure that ids from deleted icons get reused - after the integer number range is used up */ + * after the integer number range is used up */ static int get_next_free_id(void) { int startId = gFirstIconId; diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c index 5cef30894ef..163c3721dc8 100644 --- a/source/blender/blenkernel/intern/idprop.c +++ b/source/blender/blenkernel/intern/idprop.c @@ -60,8 +60,8 @@ static char idp_size_table[] = { /* --------- property array type -------------*/ -/*note: as a start to move away from the stupid IDP_New function, this type - has it's own allocation function.*/ +/* note: as a start to move away from the stupid IDP_New function, this type + * has it's own allocation function.*/ IDProperty *IDP_NewIDPArray(const char *name) { IDProperty *prop = MEM_callocN(sizeof(IDProperty), "IDProperty prop array"); @@ -82,12 +82,12 @@ IDProperty *IDP_CopyIDPArray(IDProperty *array) narray->data.pointer = MEM_dupallocN(array->data.pointer); for (i=0; ilen; i++) { - /*ok, the copy functions always allocate a new structure, - which doesn't work here. instead, simply copy the - contents of the new structure into the array cell, - then free it. this makes for more maintainable - code than simply reimplementing the copy functions - in this loop.*/ + /* ok, the copy functions always allocate a new structure, + * which doesn't work here. instead, simply copy the + * contents of the new structure into the array cell, + * then free it. this makes for more maintainable + * code than simply reimplementing the copy functions + * in this loop.*/ tmp = IDP_CopyProperty(GETPROP(narray, i)); memcpy(GETPROP(narray, i), tmp, sizeof(IDProperty)); MEM_freeN(tmp); @@ -368,8 +368,8 @@ void IDP_ConcatStringC(IDProperty *prop, const char *st) int newlen; newlen = prop->len + strlen(st); - /*we have to remember that prop->len includes the null byte for strings. - so there's no need to add +1 to the resize function.*/ + /* we have to remember that prop->len includes the null byte for strings. + * so there's no need to add +1 to the resize function.*/ IDP_ResizeArray(prop, newlen); strcat(prop->data.pointer, st); } @@ -378,8 +378,8 @@ void IDP_ConcatString(IDProperty *str1, IDProperty *append) { int newlen; - /*since ->len for strings includes the NULL byte, we have to subtract one or - we'll get an extra null byte after each concatination operation.*/ + /* since ->len for strings includes the NULL byte, we have to subtract one or + * we'll get an extra null byte after each concatination operation.*/ newlen = str1->len + append->len - 1; IDP_ResizeArray(str1, newlen); strcat(str1->data.pointer, append->data.pointer); @@ -455,8 +455,8 @@ void IDP_SyncGroupValues(IDProperty *dest, IDProperty *src) } /* - replaces all properties with the same name in a destination group from a source group. -*/ + * replaces all properties with the same name in a destination group from a source group. + */ void IDP_ReplaceGroupInGroup(IDProperty *dest, IDProperty *src) { IDProperty *loop, *prop; @@ -483,9 +483,9 @@ void IDP_ReplaceGroupInGroup(IDProperty *dest, IDProperty *src) } } /* - replaces a property with the same name in a group, or adds - it if the propery doesn't exist. -*/ + * replaces a property with the same name in a group, or adds + * it if the propery doesn't exist. + */ void IDP_ReplaceInGroup(IDProperty *group, IDProperty *prop) { IDProperty *loop; @@ -502,8 +502,8 @@ void IDP_ReplaceInGroup(IDProperty *group, IDProperty *prop) } } -/*returns 0 if an id property with the same name exists and it failed, - or 1 if it succeeded in adding to the group.*/ +/* returns 0 if an id property with the same name exists and it failed, + * or 1 if it succeeded in adding to the group.*/ int IDP_AddToGroup(IDProperty *group, IDProperty *prop) { if (IDP_GetPropertyFromGroup(group, prop->name) == NULL) { @@ -574,10 +574,10 @@ void IDP_FreeIterBeforeEnd(void *vself) MEM_freeN(vself); } -/*Ok, the way things work, Groups free the ID Property structs of their children. - This is because all ID Property freeing functions free only direct data (not the ID Property - struct itself), but for Groups the child properties *are* considered - direct data.*/ +/* Ok, the way things work, Groups free the ID Property structs of their children. + * This is because all ID Property freeing functions free only direct data (not the ID Property + * struct itself), but for Groups the child properties *are* considered + * direct data. */ static void IDP_FreeGroup(IDProperty *prop) { IDProperty *loop; @@ -761,9 +761,9 @@ IDProperty *IDP_New(const int type, const IDPropertyTemplate *val, const char *n return prop; } -/*NOTE: this will free all child properties including list arrays and groups! - Also, note that this does NOT unlink anything! Plus it doesn't free - the actual IDProperty struct either.*/ +/* NOTE: this will free all child properties including list arrays and groups! + * Also, note that this does NOT unlink anything! Plus it doesn't free + * the actual IDProperty struct either.*/ void IDP_FreeProperty(IDProperty *prop) { switch (prop->type) { @@ -782,8 +782,8 @@ void IDP_FreeProperty(IDProperty *prop) } } -/*Unlinks any IDProperty<->ID linkage that might be going on. - note: currently unused.*/ +/* Unlinks any IDProperty<->ID linkage that might be going on. + * note: currently unused.*/ void IDP_UnlinkProperty(IDProperty *prop) { switch (prop->type) { diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 37a95382c25..22e9d1ccf4b 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -324,7 +324,7 @@ Image *copy_image(Image *ima) static void extern_local_image(Image *UNUSED(ima)) { /* Nothing to do: images don't link to other IDs. This function exists to - match id_make_local pattern. */ + * match id_make_local pattern. */ } void make_local_image(struct Image *ima) @@ -343,7 +343,7 @@ void make_local_image(struct Image *ima) if(ima->id.lib==NULL) return; /* Can't take short cut here: must check meshes at least because of bogus - texface ID refs. - z0r */ + * texface ID refs. - z0r */ #if 0 if(ima->id.us==1) { id_clear_lib_data(bmain, &ima->id); @@ -438,8 +438,8 @@ void make_local_image(struct Image *ima) brush= brush->id.next; } /* Transfer references in texfaces. Texfaces don't add to image ID - user count *unless* there are no other users. See - readfile.c:lib_link_mtface. */ + * user count *unless* there are no other users. See + * readfile.c:lib_link_mtface. */ me= bmain->mesh.first; while(me) { if(me->mtface) { @@ -697,9 +697,9 @@ void free_old_images(void) int ctime = (int)PIL_check_seconds_timer(); /* - Run garbage collector once for every collecting period of time - if textimeout is 0, that's the option to NOT run the collector - */ + * Run garbage collector once for every collecting period of time + * if textimeout is 0, that's the option to NOT run the collector + */ if (U.textimeout == 0 || ctime % U.texcollectrate || ctime == lasttime) return; @@ -712,10 +712,8 @@ void free_old_images(void) ima= G.main->image.first; while(ima) { if((ima->flag & IMA_NOCOLLECT)==0 && ctime - ima->lastused > U.textimeout) { - /* - If it's in GL memory, deallocate and set time tag to current time - This gives textures a "second chance" to be used before dying. - */ + /* If it's in GL memory, deallocate and set time tag to current time + * This gives textures a "second chance" to be used before dying. */ if(ima->bindcode || ima->repbind) { GPU_free_image(ima); ima->lastused = ctime; @@ -797,11 +795,12 @@ void BKE_image_free_all_textures(void) if(ibuf->userflags & IB_BITMAPDIRTY) break; - /* if(ibuf->mipmap[0]) +#if 0 + if(ibuf->mipmap[0]) totsize+= 1.33*ibuf->x*ibuf->y*4; else - totsize+= ibuf->x*ibuf->y*4;*/ - + totsize+= ibuf->x*ibuf->y*4; +#endif } if(ibuf==NULL) image_free_buffers(ima); @@ -1722,22 +1721,21 @@ struct anim *openanim(const char *name, int flags, int streamindex) /* Notes about Image storage -- packedfile - -> written in .blend -- filename - -> written in .blend -- movie - -> comes from packedfile or filename -- renderresult - -> comes from packedfile or filename -- listbase - -> ibufs from exrhandle -- flipbook array - -> ibufs come from movie, temporary renderresult or sequence -- ibuf - -> comes from packedfile or filename or generated - -*/ + * - packedfile + * -> written in .blend + * - filename + * -> written in .blend + * - movie + * -> comes from packedfile or filename + * - renderresult + * -> comes from packedfile or filename + * - listbase + * -> ibufs from exrhandle + * - flipbook array + * -> ibufs come from movie, temporary renderresult or sequence + * - ibuf + * -> comes from packedfile or filename or generated + */ /* forces existence of 1 Image for renderout or nodes, returns Image */ @@ -1910,7 +1908,7 @@ void BKE_image_release_renderresult(Scene *scene, Image *ima) void BKE_image_backup_render(Scene *scene, Image *ima) { /* called right before rendering, ima->renders contains render - result pointers for everything but the current render */ + * result pointers for everything but the current render */ Render *re= RE_GetRender(scene->id.name); int slot= ima->render_slot, last= ima->last_render_slot; @@ -2229,7 +2227,7 @@ static ImBuf *image_get_ibuf_multilayer(Image *ima, ImageUser *iuser) /* showing RGBA result itself (from compo/sequence) or - like exr, using layers etc */ + * like exr, using layers etc */ /* always returns a single ibuf, also during render progress */ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_r) { @@ -2321,8 +2319,8 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_ ibuf->y= rres.recty; /* free rect buffer if float buffer changes, so it can be recreated with - the updated result, and also in case we got byte buffer from sequencer, - so we don't keep reference to freed buffer */ + * the updated result, and also in case we got byte buffer from sequencer, + * so we don't keep reference to freed buffer */ if(ibuf->rect_float!=rectf || rect || !rectf) imb_freerectImBuf(ibuf); @@ -2513,7 +2511,7 @@ ImBuf *BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **lock_r) else if(ima->source == IMA_SRC_VIEWER) { if(ima->type==IMA_TYPE_R_RESULT) { /* always verify entirely, and potentially - returns pointer to release later */ + * returns pointer to release later */ ibuf= image_get_render_result(ima, iuser, lock_r); } else if(ima->type==IMA_TYPE_COMPOSITE) { diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c index c6cb8c9582a..111350bb1bb 100644 --- a/source/blender/blenkernel/intern/image_gen.c +++ b/source/blender/blenkernel/intern/image_gen.c @@ -69,7 +69,7 @@ void BKE_image_buf_fill_color(unsigned char *rect, float *rect_float, int width, void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int width, int height) { /* these two passes could be combined into one, but it's more readable and - * easy to tweak like this, speed isn't really that much of an issue in this situation... */ + * easy to tweak like this, speed isn't really that much of an issue in this situation... */ int checkerwidth= 32, dark= 1; int x, y; diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 40fe3626848..5c5fe2f4156 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -663,8 +663,10 @@ static const char *sound_adrcodes_to_paths (int adrcode, int *array_index) case SND_PITCH: return "pitch"; /* XXX Joshua -- I had wrapped panning in rna, but someone commented out, calling it "unused" */ - /* case SND_PANNING: - return "panning"; */ +#if 0 + case SND_PANNING: + return "panning"; +#endif case SND_ATTEN: return "attenuation"; } @@ -762,11 +764,12 @@ static const char *particle_adrcodes_to_paths (int adrcode, int *array_index) return "settings.billboard_tilt"; /* PartDeflect needs to be sorted out properly in rna_object_force; - If anyone else works on this, but is unfamiliar, these particular - settings reference the particles of the system themselves - being used as forces -- it will use the same rna structure - as the similar object forces */ - /*case PART_PD_FSTR: + * If anyone else works on this, but is unfamiliar, these particular + * settings reference the particles of the system themselves + * being used as forces -- it will use the same rna structure + * as the similar object forces */ +#if 0 + case PART_PD_FSTR: if (part->pd) poin= &(part->pd->f_strength); break; case PART_PD_FFALL: @@ -783,11 +786,12 @@ static const char *particle_adrcodes_to_paths (int adrcode, int *array_index) break; case PART_PD2_FMAXD: if (part->pd2) poin= &(part->pd2->maxdist); - break;*/ + break; +#endif - } - - return NULL; + } + + return NULL; } /* ------- */ @@ -1914,9 +1918,9 @@ void do_versions_ipos_to_animato(Main *main) } /* patch adrcode, so that we can map - to different DNA variables later - (semi-hack (tm) ) - */ + * to different DNA variables later + * (semi-hack (tm) ) + */ switch (seq->type) { case SEQ_IMAGE: case SEQ_META: diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 1b678225135..0b4b6d164ce 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -221,9 +221,9 @@ void make_local_key(Key *key) { /* - only lib users: do nothing - * - only local users: set flag - * - mixed: make copy - */ + * - only local users: set flag + * - mixed: make copy + */ if(key==NULL) return; key->id.lib= NULL; @@ -265,7 +265,7 @@ void sort_keys(Key *key) if(key->ipo && key->ipo->curve.first != key->ipo->curve.last ) { for(icu= key->ipo->curve.first; icu; icu= icu->next) { /* if we find the curve, remove it and reinsert in the - right place */ + * right place */ if(icu->adrcode==kb->adrcode) { IpoCurve *icu2; BLI_remlink(&key->ipo->curve, icu); @@ -537,7 +537,7 @@ static char *key_block_get_data(Key *key, KeyBlock *actkb, KeyBlock *kb, char ** { if(kb == actkb) { /* this hack makes it possible to edit shape keys in - edit mode with shape keys blending applied */ + * edit mode with shape keys blending applied */ if(GS(key->from->name) == ID_ME) { Mesh *me; BMVert *eve; diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c index 6b4cdc70aea..4e4dca51e7d 100644 --- a/source/blender/blenkernel/intern/lamp.c +++ b/source/blender/blenkernel/intern/lamp.c @@ -161,9 +161,9 @@ void make_local_lamp(Lamp *la) int is_local= FALSE, is_lib= FALSE; /* - only lib users: do nothing - * - only local users: set flag - * - mixed: make copy - */ + * - only local users: set flag + * - mixed: make copy + */ if(la->id.lib==NULL) return; if(la->id.us==1) { diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index 79922e47564..0cddd978263 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -459,7 +459,7 @@ void end_latt_deform(Object *ob) } /* calculations is in local space of deformed object - so we store in latmat transform from path coord inside object + * so we store in latmat transform from path coord inside object */ typedef struct { float dmin[3], dmax[3]; diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 63c9d799f04..367a722d8c3 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -123,8 +123,8 @@ #define MAX_IDPUP 60 /* was 24 */ /* GS reads the memory pointed at in a specific ordering. - only use this definition, makes little and big endian systems - work fine, in conjunction with MAKE_ID */ + * only use this definition, makes little and big endian systems + * work fine, in conjunction with MAKE_ID */ /* from blendef: */ #define GS(a) (*((short *)(a))) @@ -409,7 +409,7 @@ int id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop) /* copy animation actions too */ BKE_copy_animdata_id_action(id); /* us is 1 by convention, but RNA_property_pointer_set - will also incremement it, so set it to zero */ + * will also incremement it, so set it to zero */ newid->us= 0; /* assign copy */ @@ -577,14 +577,14 @@ int set_listbasepointers(Main *main, ListBase **lb) } /* *********** ALLOC AND FREE ***************** - -free_libblock(ListBase *lb, ID *id ) - provide a list-basis and datablock, but only ID is read - -void *alloc_libblock(ListBase *lb, type, name) - inserts in list and returns a new ID - - ***************************** */ + * + * free_libblock(ListBase *lb, ID *id ) + * provide a list-basis and datablock, but only ID is read + * + * void *alloc_libblock(ListBase *lb, type, name) + * inserts in list and returns a new ID + * + * **************************** */ static ID *alloc_libblock_notest(short type) { @@ -1268,16 +1268,18 @@ int new_id(ListBase *lb, ID *id, const char *tname) * however all data in blender should be sorted, not just duplicate names * sorting should not hurt, but noting just incause it alters the way other * functions work, so sort every time */ - /* if( result ) - sort_alpha_id(lb, id);*/ - +#if 0 + if( result ) + sort_alpha_id(lb, id); +#endif + sort_alpha_id(lb, id); return result; } /* Pull an ID out of a library (make it local). Only call this for IDs that - don't have other library users. */ + * don't have other library users. */ void id_clear_lib_data(Main *bmain, ID *id) { BKE_id_lib_local_paths(bmain, id->lib, id); diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index db9f6325e89..898f881857a 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -290,9 +290,9 @@ void make_local_material(Material *ma) int a, is_local= FALSE, is_lib= FALSE; /* - only lib users: do nothing - * - only local users: set flag - * - mixed: make copy - */ + * - only local users: set flag + * - mixed: make copy + */ if (ma->id.lib==NULL) return; @@ -304,7 +304,7 @@ void make_local_material(Material *ma) } /* Check which other IDs reference this one to determine if it's used by - lib or local */ + * lib or local */ /* test objects */ ob= bmain->object.first; while(ob) { @@ -1614,7 +1614,7 @@ static void calculate_tface_materialname(char *matname, char *newname, int flag) // otherwise do: int digits = integer_getdigits(flag); /* clamp the old name, remove the MA prefix and add the .TF.flag suffix - e.g. matname = "MALoooooooooooooongName"; newname = "Loooooooooooooon.TF.2" */ + * e.g. matname = "MALoooooooooooooongName"; newname = "Loooooooooooooon.TF.2" */ BLI_snprintf(newname, MAX_ID_NAME, "%.*s.TF.%0*d", MAX_ID_NAME-(digits+5), matname, digits, flag); } diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index ed7e84cf174..b143e496446 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -278,7 +278,7 @@ void tex_space_mball(Object *ob) min[0] = min[1] = min[2] = -1.0f; max[0] = max[1] = max[2] = 1.0f; } - /* +#if 0 loc[0]= (min[0]+max[0])/2.0f; loc[1]= (min[1]+max[1])/2.0f; loc[2]= (min[2]+max[2])/2.0f; @@ -286,7 +286,7 @@ void tex_space_mball(Object *ob) size[0]= (max[0]-min[0])/2.0f; size[1]= (max[1]-min[1])/2.0f; size[2]= (max[2]-min[2])/2.0f; - */ +#endif boundbox_set_from_min_max(bb, min, max); } @@ -485,7 +485,7 @@ Object *find_basis_mball(Scene *scene, Object *basis) * "An Implicit Surface Polygonizer" * by Jules Bloomenthal, jbloom@beauty.gmu.edu * in "Graphics Gems IV", Academic Press, 1994 - + * * Authored by Jules Bloomenthal, Xerox PARC. * Copyright (c) Xerox Corporation, 1991. All rights reserved. * Permission is granted to reproduce, use and distribute this code for @@ -949,7 +949,7 @@ void testface(int i, int j, int k, CUBE* old, int bit, int c1, int c2, int c3, i } /* setcorner: return corner with the given lattice location - set (and cache) its function value */ + * set (and cache) its function value */ CORNER *setcorner (PROCESS* p, int i, int j, int k) { diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 1cab220836b..1d7d8a23107 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -121,8 +121,8 @@ static const char *cmpcode_to_str(int code) } } -/*thresh is threshold for comparing vertices, uvs, vertex colors, - weights, etc.*/ +/* thresh is threshold for comparing vertices, uvs, vertex colors, + * weights, etc.*/ static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2, float thresh) { CustomDataLayer *l1, *l2; @@ -438,8 +438,8 @@ void copy_dverts(MDeformVert *dst, MDeformVert *src, int copycount) void free_dverts(MDeformVert *dvert, int totvert) { /* Instead of freeing the verts directly, - call this function to delete any special - vert data */ + * call this function to delete any special + * vert data */ int i; if (!dvert) @@ -738,7 +738,7 @@ void transform_mesh_orco_verts(Mesh *me, float (*orco)[3], int totvert, int inve } /* rotates the vertices of a face in case v[2] or v[3] (vertex index) is = 0. - this is necessary to make the if (mface->v4) check for quads work */ + * this is necessary to make the if (mface->v4) check for quads work */ int test_index_face(MFace *mface, CustomData *fdata, int mfindex, int nr) { /* first test if the face is legal */ @@ -1852,8 +1852,8 @@ static void bm_corners_to_loops(Mesh *me, int findex, int loopstart, int numTex, if (corners == 0) { /* Empty MDisp layers appear in at least one of the sintel.blend files. - Not sure why this happens, but it seems fine to just ignore them here. - If corners==0 for a non-empty layer though, something went wrong. */ + * Not sure why this happens, but it seems fine to just ignore them here. + * If corners==0 for a non-empty layer though, something went wrong. */ BLI_assert(fd->totdisp == 0); } else { @@ -2071,8 +2071,8 @@ void free_uv_vert_map(UvVertMap *vmap) } /* Generates a map where the key is the vertex and the value is a list - of polys that use that vertex as a corner. The lists are allocated - from one memory pool. */ + * of polys that use that vertex as a corner. The lists are allocated + * from one memory pool. */ void create_vert_poly_map(ListBase **map, IndexNode **mem, MPoly *mpoly, MLoop *mloop, const int totvert, const int totpoly, const int totloop) @@ -2097,8 +2097,8 @@ void create_vert_poly_map(ListBase **map, IndexNode **mem, } /* Generates a map where the key is the vertex and the value is a list - of edges that use that vertex as an endpoint. The lists are allocated - from one memory pool. */ + * of edges that use that vertex as an endpoint. The lists are allocated + * from one memory pool. */ void create_vert_edge_map(ListBase **map, IndexNode **mem, const MEdge *medge, const int totvert, const int totedge) { int i, j; @@ -2185,8 +2185,8 @@ void mesh_loops_to_mface_corners(CustomData *fdata, CustomData *ldata, } /* - this function recreates a tessellation. - returns number of tessellation faces. + * this function recreates a tessellation. + * returns number of tessellation faces. */ int mesh_recalcTessellation(CustomData *fdata, CustomData *ldata, CustomData *pdata, @@ -2585,7 +2585,7 @@ int mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata, * polygon See Graphics Gems for * computing newell normal. * -*/ + */ static void mesh_calc_ngon_normal(MPoly *mpoly, MLoop *loopstart, MVert *mvert, float normal[3]) { @@ -2612,16 +2612,16 @@ static void mesh_calc_ngon_normal(MPoly *mpoly, MLoop *loopstart, } /* newell's method - - so thats?: - (a[1] - b[1]) * (a[2] + b[2]); - a[1]*b[2] - b[1]*a[2] - b[1]*b[2] + a[1]*a[2] - - odd. half of that is the cross product. . .what's the - other half? - - also could be like a[1]*(b[2] + a[2]) - b[1]*(a[2] - b[2]) - */ + * + * so thats?: + * (a[1] - b[1]) * (a[2] + b[2]); + * a[1]*b[2] - b[1]*a[2] - b[1]*b[2] + a[1]*a[2] + * + * odd. half of that is the cross product. . .what's the + * other half? + * + * also could be like a[1]*(b[2] + a[2]) - b[1]*(a[2] - b[2]) + */ n[0] += (u[1] - v[1]) * (u[2] + v[2]); n[1] += (u[2] - v[2]) * (u[0] + v[0]); @@ -2834,7 +2834,7 @@ float mesh_calc_poly_area(MPoly *mpoly, MLoop *loopstart, } /* Find the index of the loop in 'poly' which references vertex, - returns -1 if not found */ + * returns -1 if not found */ int poly_find_loop_from_vert(const MPoly *poly, const MLoop *loopstart, unsigned vert) { @@ -2848,8 +2848,8 @@ int poly_find_loop_from_vert(const MPoly *poly, const MLoop *loopstart, } /* Fill 'adj_r' with the loop indices in 'poly' adjacent to the - vertex. Returns the index of the loop matching vertex, or -1 if the - vertex is not in 'poly' */ + * vertex. Returns the index of the loop matching vertex, or -1 if the + * vertex is not in 'poly' */ int poly_get_adj_loops_from_vert(unsigned adj_r[3], const MPoly *poly, const MLoop *mloop, unsigned vert) { diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c index 4a988f0b278..fbd7a5fb47b 100644 --- a/source/blender/blenkernel/intern/mesh_validate.c +++ b/source/blender/blenkernel/intern/mesh_validate.c @@ -538,7 +538,7 @@ void BKE_mesh_calc_edges(Mesh *mesh, int update) if (mesh->totpoly) { /* second pass, iterate through all loops again and assign - the newly created edges to them. */ + * the newly created edges to them. */ MPoly *mp= mesh->mpoly; for(i=0; i < mesh->totpoly; i++, mp++) { MLoop *l= &mesh->mloop[mp->loopstart]; diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 9a67260ded4..4ba47eb6673 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -373,11 +373,11 @@ LinkNode *modifiers_calcDataMasks(struct Scene *scene, Object *ob, ModifierData } /* build the list of required data masks - each mask in the list must - * include all elements of the masks that follow it - * - * note the list is currently in reverse order, so "masks that follow it" - * actually means "masks that precede it" at the moment - */ + * include all elements of the masks that follow it + * + * note the list is currently in reverse order, so "masks that follow it" + * actually means "masks that precede it" at the moment + */ for(curr = dataMasks, prev = NULL; curr; prev = curr, curr = curr->next) { if(prev) { CustomDataMask prev_mask = (CustomDataMask)GET_INT_FROM_POINTER(prev->link); @@ -414,9 +414,9 @@ ModifierData *modifiers_getLastPreview(struct Scene *scene, ModifierData *md, in ModifierData *modifiers_getVirtualModifierList(Object *ob) { - /* Kinda hacky, but should be fine since we are never - * reentrant and avoid free hassles. - */ + /* Kinda hacky, but should be fine since we are never + * reentrant and avoid free hassles. + */ static ArmatureModifierData amd; static CurveModifierData cmd; static LatticeModifierData lmd; @@ -491,8 +491,7 @@ Object *modifiers_isDeformedByArmature(Object *ob) ModifierData *md = modifiers_getVirtualModifierList(ob); ArmatureModifierData *amd= NULL; - /* return the first selected armature, this lets us use multiple armatures - */ + /* return the first selected armature, this lets us use multiple armatures */ for (; md; md=md->next) { if (md->type==eModifierType_Armature) { amd = (ArmatureModifierData*) md; @@ -508,16 +507,15 @@ Object *modifiers_isDeformedByArmature(Object *ob) } /* Takes an object and returns its first selected lattice, else just its -* lattice -* This should work for multiple lattics per object -*/ + * lattice + * This should work for multiple lattics per object + */ Object *modifiers_isDeformedByLattice(Object *ob) { ModifierData *md = modifiers_getVirtualModifierList(ob); LatticeModifierData *lmd= NULL; - /* return the first selected lattice, this lets us use multiple lattices - */ + /* return the first selected lattice, this lets us use multiple lattices */ for (; md; md=md->next) { if (md->type==eModifierType_Lattice) { lmd = (LatticeModifierData*) md; @@ -614,7 +612,7 @@ void test_object_modifiers(Object *ob) ModifierData *md; /* just multires checked for now, since only multires - modifies mesh data */ + * modifies mesh data */ if(ob->type != OB_MESH) return; diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index 4d8f76467b1..0af6b9dd219 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -154,7 +154,7 @@ static void get_sequence_fname(MovieClip *clip, int framenr, char *name) BLI_stringdec(name, head, tail, &numlen); /* movieclips always points to first image from sequence, - autoguess offset for now. could be something smarter in the future */ + * autoguess offset for now. could be something smarter in the future */ offset= sequence_guess_offset(clip->name, strlen(head), numlen); if (numlen) BLI_stringenc(name, head, tail, numlen, offset+framenr-1); @@ -396,9 +396,9 @@ static MovieClip *movieclip_alloc(const char *name) } /* checks if image was already loaded, then returns same image - otherwise creates new. - does not load ibuf itself - pass on optional frame for #name images */ + * otherwise creates new. + * does not load ibuf itself + * pass on optional frame for #name images */ MovieClip *BKE_add_movieclip_file(const char *name) { MovieClip *clip; @@ -484,7 +484,7 @@ static ImBuf *get_undistorted_ibuf(MovieClip *clip, struct MovieDistortion *dist ImBuf *undistibuf; /* XXX: because of #27997 do not use float buffers to undistort, - otherwise, undistorted proxy can be darker than it should */ + * otherwise, undistorted proxy can be darker than it should */ imb_freerectfloatImBuf(ibuf); if(distortion) @@ -640,7 +640,7 @@ static ImBuf *movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *u int framenr= user->framenr, need_postprocess= 0; /* cache isn't threadsafe itself and also loading of movies - can't happen from concurent threads that's why we use lock here */ + * can't happen from concurent threads that's why we use lock here */ BLI_lock_thread(LOCK_MOVIECLIP); /* try to obtain cached postprocessed frame first */ diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index f9817d5b6f5..9d61a12d237 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -827,8 +827,8 @@ void ntreeClearPreview(bNodeTree *ntree) } /* hack warning! this function is only used for shader previews, and -since it gets called multiple times per pixel for Ztransp we only -add the color once. Preview gets cleared before it starts render though */ + * since it gets called multiple times per pixel for Ztransp we only + * add the color once. Preview gets cleared before it starts render though */ void nodeAddToPreview(bNode *node, float *col, int x, int y, int do_manage) { bNodePreview *preview= node->preview; @@ -1036,7 +1036,7 @@ void ntreeSetOutput(bNodeTree *ntree) } /* here we could recursively set which nodes have to be done, - might be different for editor or for "real" use... */ + * might be different for editor or for "real" use... */ } typedef struct MakeLocalCallData { @@ -1083,9 +1083,9 @@ void ntreeMakeLocal(bNodeTree *ntree) MakeLocalCallData cd; /* - only lib users: do nothing - * - only local users: set flag - * - mixed: make copy - */ + * - only local users: set flag + * - mixed: make copy + */ if(ntree->id.lib==NULL) return; if(ntree->id.us==1) { diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 52ddfb67bf8..32a3ca2b732 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1950,9 +1950,9 @@ void where_is_object_time(Scene *scene, Object *ob, float ctime) } /* get object transformation matrix without recalculating dependencies and - constraints -- assume dependencies are already solved by depsgraph. - no changes to object and it's parent would be done. - used for bundles orientation in 3d space relative to parented blender camera */ + * constraints -- assume dependencies are already solved by depsgraph. + * no changes to object and it's parent would be done. + * used for bundles orientation in 3d space relative to parented blender camera */ void where_is_object_mat(Scene *scene, Object *ob, float obmat[4][4]) { float slowmat[4][4] = MAT4_UNITY; @@ -2058,7 +2058,7 @@ void where_is_object(struct Scene *scene, Object *ob) void where_is_object_simul(Scene *scene, Object *ob) /* was written for the old game engine (until 2.04) */ /* It seems that this function is only called -for a lamp that is the child of another object */ + * for a lamp that is the child of another object */ { Object *par; float *fp1, *fp2; @@ -2472,16 +2472,16 @@ void object_handle_update(Scene *scene, Object *ob) if (ob->recalc & OB_RECALC_DATA) { if (ob->type==OB_ARMATURE) { /* this happens for reading old files and to match library armatures - with poses we do it ahead of where_is_object to ensure animation - is evaluated on the rebuilt pose, otherwise we get incorrect poses - on file load */ + * with poses we do it ahead of where_is_object to ensure animation + * is evaluated on the rebuilt pose, otherwise we get incorrect poses + * on file load */ if (ob->pose==NULL || (ob->pose->flag & POSE_RECALC)) armature_rebuild_pose(ob, ob->data); } } /* XXX new animsys warning: depsgraph tag OB_RECALC_DATA should not skip drivers, - which is only in where_is_object now */ + * which is only in where_is_object now */ // XXX: should this case be OB_RECALC_OB instead? if (ob->recalc & OB_RECALC_ALL) { @@ -2658,8 +2658,8 @@ void object_sculpt_modifiers_changed(Object *ob) if (!ss->cache) { /* we free pbvh on changes, except during sculpt since it can't deal with - changing PVBH node organization, we hope topology does not change in - the meantime .. weak */ + * changing PVBH node organization, we hope topology does not change in + * the meantime .. weak */ if (ss->pbvh) { BLI_pbvh_free(ss->pbvh); ss->pbvh= NULL; diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c index 65db275b61f..dd9444d87e0 100644 --- a/source/blender/blenkernel/intern/ocean.c +++ b/source/blender/blenkernel/intern/ocean.c @@ -726,14 +726,14 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount } fftw_execute(o->_N_z_plan); - /*for ( i = 0 ; i < o->_M ; ++i) - { - for ( j = 0 ; j < o->_N ; ++j) - { - o->_N_y[i*o->_N+j] = 1.0f/scale; - } - } - (MEM01)*/ +#if 0 + for ( i = 0 ; i < o->_M ; ++i) { + for ( j = 0 ; j < o->_N ; ++j) { + o->_N_y[i*o->_N+j] = 1.0f/scale; + } + } + (MEM01) +#endif o->_N_y = 1.0f/scale; } } // section 8 @@ -1260,12 +1260,12 @@ void BKE_bake_ocean(struct Ocean *o, struct OceanCache *och, void (*update_cb)(v // break up the foam where height (Y) is low (wave valley), // and X and Z displacement is greatest - /* +#if 0 vec[0] = ocr.disp[0]; vec[1] = ocr.disp[2]; hor_stretch = len_v2(vec); CLAMP(hor_stretch, 0.0, 1.0); - */ +#endif neg_disp = ocr.disp[1] < 0.0f ? 1.0f+ocr.disp[1] : 1.0f; neg_disp = neg_disp < 0.0f ? 0.0f : neg_disp; diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index 2decc40da81..aaf15d683d8 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -321,16 +321,14 @@ int writePackedFile(ReportList *reports, const char *filename, PackedFile *pf, i return (ret_value); } -/* - -This function compares a packed file to a 'real' file. -It returns an integer indicating if: - -PF_EQUAL - the packed file and original file are identical -PF_DIFFERENT - the packed file and original file differ -PF_NOFILE - the original file doens't exist - -*/ +/* + * This function compares a packed file to a 'real' file. + * It returns an integer indicating if: + * + * PF_EQUAL - the packed file and original file are identical + * PF_DIFFERENT - the packed file and original file differ + * PF_NOFILE - the original file doens't exist + */ int checkPackedFile(const char *filename, PackedFile *pf) { @@ -380,14 +378,11 @@ int checkPackedFile(const char *filename, PackedFile *pf) return(ret_val); } -/* - - unpackFile() looks at the existing files (abs_name, local_name) and a packed file. - -It returns a char *to the existing file name / new file name or NULL when -there was an error or when the user desides to cancel the operation. - -*/ +/* unpackFile() looks at the existing files (abs_name, local_name) and a packed file. + * + * It returns a char *to the existing file name / new file name or NULL when + * there was an error or when the user desides to cancel the operation. + */ char *unpackFile(ReportList *reports, const char *abs_name, const char *local_name, PackedFile *pf, int how) { diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 33e2c2376a3..78df8d26c4d 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -2859,8 +2859,8 @@ static void cache_key_incremental_rotation(ParticleCacheKey *key0, ParticleCache cosangle= dot_v3v3(tangent, prev_tangent); /* note we do the comparison on cosangle instead of - * angle, since floating point accuracy makes it give - * different results across platforms */ + * angle, since floating point accuracy makes it give + * different results across platforms */ if(cosangle > 0.999999f) { copy_v4_v4(key1->rot, key2->rot); } @@ -4426,7 +4426,7 @@ void psys_get_dupli_texture(ParticleSystem *psys, ParticleSettings *part, Partic if (num >= psmd->dm->getNumTessFaces(psmd->dm)) { /* happens when simplify is enabled - * gives invalid coords but would crash otherwise */ + * gives invalid coords but would crash otherwise */ num= DMCACHE_NOTFOUND; } diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index e4800ac25a3..ee4f3d1701e 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -332,11 +332,11 @@ static void alloc_child_particles(ParticleSystem *psys, int tot) void psys_calc_dmcache(Object *ob, DerivedMesh *dm, ParticleSystem *psys) { /* use for building derived mesh mapping info: - - node: the allocated links - total derived mesh element count - nodearray: the array of nodes aligned with the base mesh's elements, so - each original elements can reference its derived elements - */ + * + * node: the allocated links - total derived mesh element count + * nodearray: the array of nodes aligned with the base mesh's elements, so + * each original elements can reference its derived elements + */ Mesh *me= (Mesh*)ob->data; PARTICLE_P; @@ -2213,19 +2213,19 @@ static void integrate_particle(ParticleSettings *part, ParticleData *pa, float d } /********************************************************************************************************* - SPH fluid physics - - In theory, there could be unlimited implementation of SPH simulators - - This code uses in some parts adapted algorithms from the pseudo code as outlined in the Research paper: - - Titled: Particle-based Viscoelastic Fluid Simulation. - Authors: Simon Clavet, Philippe Beaudoin and Pierre Poulin - Website: http://www.iro.umontreal.ca/labs/infographie/papers/Clavet-2005-PVFS/ - - Presented at Siggraph, (2005) - -***********************************************************************************************************/ + * SPH fluid physics + * + * In theory, there could be unlimited implementation of SPH simulators + * + * This code uses in some parts adapted algorithms from the pseudo code as outlined in the Research paper: + * + * Titled: Particle-based Viscoelastic Fluid Simulation. + * Authors: Simon Clavet, Philippe Beaudoin and Pierre Poulin + * Website: http://www.iro.umontreal.ca/labs/infographie/papers/Clavet-2005-PVFS/ + * + * Presented at Siggraph, (2005) + * + * ********************************************************************************************************/ #define PSYS_FLUID_SPRINGS_INITIAL_SIZE 256 static ParticleSpring *sph_spring_add(ParticleSystem *psys, ParticleSpring *spring) { @@ -2344,7 +2344,7 @@ typedef struct SPHData { EdgeHash *eh; float *gravity; /* Average distance to neighbours (other particles in the support domain), - for calculating the Courant number (adaptive time step). */ + * for calculating the Courant number (adaptive time step). */ int pass; float element_size; float flow[3]; @@ -3234,9 +3234,9 @@ static int collision_response(ParticleData *pa, ParticleCollision *col, BVHTreeR sub_v3_v3v3(v1_tan, v0_tan, vc_tan); /* The resulting velocity is a weighted average of particle cm & surface - * velocity. This weight (related to particle's moment of inertia) could - * be made a parameter for angular <-> linear conversion. - */ + * velocity. This weight (related to particle's moment of inertia) could + * be made a parameter for angular <-> linear conversion. + */ madd_v3_v3fl(v1_tan, vr_tan, -0.4); mul_v3_fl(v1_tan, 1.0f/1.4f); /* 1/(1+0.4) */ @@ -3699,17 +3699,17 @@ static void save_hair(ParticleSimulationData *sim, float UNUSED(cfra)) } /* Code for an adaptive time step based on the Courant-Friedrichs-Lewy - condition. */ + * condition. */ #define MIN_TIMESTEP 1.0f / 101.0f /* Tolerance of 1.5 means the last subframe neither favours growing nor - shrinking (e.g if it were 1.3, the last subframe would tend to be too - small). */ + * shrinking (e.g if it were 1.3, the last subframe would tend to be too + * small). */ #define TIMESTEP_EXPANSION_TOLERANCE 1.5f /* Calculate the speed of the particle relative to the local scale of the - simulation. This should be called once per particle during a simulation - step, after the velocity has been updated. element_size defines the scale of - the simulation, and is typically the distance to neighbourning particles. */ + * simulation. This should be called once per particle during a simulation + * step, after the velocity has been updated. element_size defines the scale of + * the simulation, and is typically the distance to neighbourning particles. */ void update_courant_num(ParticleSimulationData *sim, ParticleData *pa, float dtime, SPHData *sphdata) { diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 705f198865a..fab3f096d3e 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -1026,11 +1026,11 @@ void BKE_ptcache_ids_from_object(ListBase *lb, Object *ob, Scene *scene, int dup /* File handling */ -/* Takes an Object ID and returns a unique name - - id: object id - - cfra: frame for the cache, can be negative - - stack_index: index in the modifier stack. we can have cache for more then one stack_index -*/ +/* Takes an Object ID and returns a unique name + * - id: object id + * - cfra: frame for the cache, can be negative + * - stack_index: index in the modifier stack. we can have cache for more then one stack_index + */ #define MAX_PTCACHE_PATH FILE_MAX #define MAX_PTCACHE_FILE ((FILE_MAX)*2) @@ -2107,8 +2107,8 @@ int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra) } /* youll need to close yourself after! * mode - PTCACHE_CLEAR_ALL, + */ -*/ /* Clears & resets */ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra) { @@ -2687,7 +2687,7 @@ void BKE_ptcache_quick_cache_all(Main *bmain, Scene *scene) } /* Simulation thread, no need for interlocks as data written in both threads - are only unitary integers (I/O assumed to be atomic for them) */ + * are only unitary integers (I/O assumed to be atomic for them) */ typedef struct { int break_operation; int thread_ended; diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 150bb05d2d9..3d84278c878 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -719,8 +719,8 @@ int next_object(Scene **scene, int val, Base **base, Object **ob) if (fase!=F_DUPLI) { if ( (*base)->object->transflag & OB_DUPLI) { /* groups cannot be duplicated for mballs yet, - this enters eternal loop because of - makeDispListMBall getting called inside of group_duplilist */ + * this enters eternal loop because of + * makeDispListMBall getting called inside of group_duplilist */ if ((*base)->object->dup_group == NULL) { duplilist= object_duplilist((*scene), (*base)->object); @@ -757,10 +757,12 @@ int next_object(Scene **scene, int val, Base **base, Object **ob) } } } - - /* if (ob && *ob) { + +#if 0 + if (ob && *ob) { printf("Scene: '%s', '%s'\n", (*scene)->id.name+2, (*ob)->id.name+2); - } */ + } +#endif /* reset recursion test */ in_next_object= 0; @@ -836,7 +838,7 @@ char *scene_find_marker_name(Scene *scene, int frame) } /* return the current marker for this frame, -we can have more then 1 marker per frame, this just returns the first :/ */ + * we can have more then 1 marker per frame, this just returns the first :/ */ char *scene_find_last_marker_name(Scene *scene, int frame) { TimeMarker *marker, *best_marker = NULL; @@ -973,7 +975,7 @@ static void scene_update_tagged_recursive(Main *bmain, Scene *scene, Scene *scen scene->customdata_mask= scene_parent->customdata_mask; /* sets first, we allow per definition current scene to have - dependencies on sets, but not the other way around. */ + * dependencies on sets, but not the other way around. */ if (scene->set) scene_update_tagged_recursive(bmain, scene->set, scene_parent); @@ -1009,10 +1011,10 @@ void scene_update_tagged(Main *bmain, Scene *scene) scene->physics_settings.quick_cache_step= 0; /* update all objects: drivers, matrices, displists, etc. flags set - by depgraph or manual, no layer check here, gets correct flushed - - in the future this should handle updates for all datablocks, not - only objects and scenes. - brecht */ + * by depgraph or manual, no layer check here, gets correct flushed + * + * in the future this should handle updates for all datablocks, not + * only objects and scenes. - brecht */ scene_update_tagged_recursive(bmain, scene, scene); /* extra call here to recalc scene animation (for sequencer) */ @@ -1057,8 +1059,8 @@ void scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay) } /* flush recalc flags to dependencies, if we were only changing a frame - this would not be necessary, but if a user or a script has modified - some datablock before scene_update_tagged was called, we need the flush */ + * this would not be necessary, but if a user or a script has modified + * some datablock before scene_update_tagged was called, we need the flush */ DAG_ids_flush_tagged(bmain); /* Following 2 functions are recursive diff --git a/source/blender/blenkernel/intern/script.c b/source/blender/blenkernel/intern/script.c index 5fadebc80f8..2d1577a86c1 100644 --- a/source/blender/blenkernel/intern/script.c +++ b/source/blender/blenkernel/intern/script.c @@ -33,12 +33,11 @@ #include "MEM_guardedalloc.h" -/* - +#if 0 #ifdef WITH_PYTHON #include "BPY_extern.h" // Blender Python library #endif -*/ +#endif /* XXX this function and so also the file should not be needed anymore, * since we have to force clearing all Python related data before freeing diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index aebdf3cef65..6a72933332b 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -3098,8 +3098,8 @@ void sequence_effect_speed_rebuild_map(Scene *scene, Sequence * seq, int force) } /* ********************************************************************** - sequence effect factory - ********************************************************************** */ + * sequence effect factory + * ********************************************************************** */ static void init_noop(struct Sequence *UNUSED(seq)) diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 92199eadf5b..cdb2b5318a4 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -3024,14 +3024,14 @@ void seq_tx_handle_xlimits(Sequence *seq, int leftflag, int rightflag) } /* dosnt work now - TODO */ - /* +#if 0 if (seq_tx_get_start(seq) >= seq_tx_get_final_right(seq, 0)) { int ofs; ofs = seq_tx_get_start(seq) - seq_tx_get_final_right(seq, 0); seq->start -= ofs; seq_tx_set_final_left(seq, seq_tx_get_final_left(seq, 0) + ofs ); - }*/ - + } +#endif } } @@ -3061,7 +3061,7 @@ void seq_single_fix(Sequence *seq) return; /* make sure the image is always at the start since there is only one, - adjusting its start should be ok */ + * adjusting its start should be ok */ left = seq_tx_get_final_left(seq, 0); start = seq->start; if (start != left) { @@ -3290,13 +3290,13 @@ static void seq_update_muting_recursive(ListBase *seqbasep, Sequence *metaseq, i int seqmute; /* for sound we go over full meta tree to update muted state, - since sound is played outside of evaluating the imbufs, */ + * since sound is played outside of evaluating the imbufs, */ for(seq=seqbasep->first; seq; seq=seq->next) { seqmute= (mute || (seq->flag & SEQ_MUTE)); if(seq->type == SEQ_META) { /* if this is the current meta sequence, unmute because - all sequences above this were set to mute */ + * all sequences above this were set to mute */ if(seq == metaseq) seqmute= 0; diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 8fef6baa34d..65a01eef175 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -3860,16 +3860,16 @@ static void softbody_reset(Object *ob, SoftBody *sb, float (*vertexCos)[3], int bp->vec[0]= bp->vec[1]= bp->vec[2]= 0.0f; /* the bp->prev*'s are for rolling back from a canceled try to propagate in time - adaptive step size algo in a nutshell: - 1. set sheduled time step to new dtime - 2. try to advance the sheduled time step, beeing optimistic execute it - 3. check for success - 3.a we 're fine continue, may be we can increase sheduled time again ?? if so, do so! - 3.b we did exceed error limit --> roll back, shorten the sheduled time and try again at 2. - 4. check if we did reach dtime - 4.a nope we need to do some more at 2. - 4.b yup we're done - */ + * adaptive step size algo in a nutshell: + * 1. set sheduled time step to new dtime + * 2. try to advance the sheduled time step, beeing optimistic execute it + * 3. check for success + * 3.a we 're fine continue, may be we can increase sheduled time again ?? if so, do so! + * 3.b we did exceed error limit --> roll back, shorten the sheduled time and try again at 2. + * 4. check if we did reach dtime + * 4.a nope we need to do some more at 2. + * 4.b yup we're done + */ copy_v3_v3(bp->prevpos, bp->pos); copy_v3_v3(bp->prevvec, bp->vec); @@ -3917,9 +3917,9 @@ static void softbody_step(Scene *scene, Object *ob, SoftBody *sb, float dtime) sst=PIL_check_seconds_timer(); /* Integration back in time is possible in theory, but pretty useless here. - So we refuse to do so. Since we do not know anything about 'outside' canges - especially colliders we refuse to go more than 10 frames. - */ + * So we refuse to do so. Since we do not know anything about 'outside' canges + * especially colliders we refuse to go more than 10 frames. + */ if (dtime < 0 || dtime > 10.5f) return; ccd_update_deflector_hash(scene, ob, sb->scratch->colliderhash); @@ -3938,9 +3938,8 @@ static void softbody_step(Scene *scene, Object *ob, SoftBody *sb, float dtime) float forcetimemax = 1.0f; /* set defaults guess we shall do one frame */ float forcetimemin = 0.01f; /* set defaults guess 1/100 is tight enough */ float timedone =0.0; /* how far did we get without violating error condition */ - /* loops = counter for emergency brake - * we don't want to lock up the system if physics fail - */ + /* loops = counter for emergency brake + * we don't want to lock up the system if physics fail */ int loops = 0; SoftHeunTol = sb->rklimit; /* humm .. this should be calculated from sb parameters and sizes */ diff --git a/source/blender/blenkernel/intern/speaker.c b/source/blender/blenkernel/intern/speaker.c index d2c8a8031ee..a5d24c79bba 100644 --- a/source/blender/blenkernel/intern/speaker.c +++ b/source/blender/blenkernel/intern/speaker.c @@ -83,9 +83,9 @@ void make_local_speaker(Speaker *spk) int is_local= FALSE, is_lib= FALSE; /* - only lib users: do nothing - * - only local users: set flag - * - mixed: make copy - */ + * - only local users: set flag + * - mixed: make copy + */ if(spk->id.lib==NULL) return; if(spk->id.us==1) { diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 7f67bb27bf6..8d381299ab3 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -2239,7 +2239,7 @@ static void ccgDM_drawMappedFaces(DerivedMesh *dm, } /* no need to set shading mode to flat because - * normals are already used to change shading */ + * normals are already used to change shading */ glShadeModel(GL_SMOOTH); for (S=0; Smultires.mmd; /* both of multires and subsurm modifiers are CCG, but - grids should only be used when sculpting on multires */ + * grids should only be used when sculpting on multires */ if(!mmd) return 0; @@ -2822,9 +2822,9 @@ static struct PBVH *ccgDM_getPBVH(Object *ob, DerivedMesh *dm) if(ob->sculpt->pbvh) { if(grid_pbvh) { /* pbvh's grids, gridadj and gridfaces points to data inside ccgdm - but this can be freed on ccgdm release, this updates the pointers - when the ccgdm gets remade, the assumption is that the topology - does not change. */ + * but this can be freed on ccgdm release, this updates the pointers + * when the ccgdm gets remade, the assumption is that the topology + * does not change. */ ccgdm_create_grids(dm); BLI_pbvh_grids_update(ob->sculpt->pbvh, ccgdm->gridData, ccgdm->gridAdjacency, (void**)ccgdm->gridFaces); } @@ -2836,8 +2836,8 @@ static struct PBVH *ccgDM_getPBVH(Object *ob, DerivedMesh *dm) return ccgdm->pbvh; /* no pbvh exists yet, we need to create one. only in case of multires - we build a pbvh over the modified mesh, in other cases the base mesh - is being sculpted, so we build a pbvh from that. */ + * we build a pbvh over the modified mesh, in other cases the base mesh + * is being sculpted, so we build a pbvh from that. */ if(grid_pbvh) { ccgdm_create_grids(dm); @@ -3423,7 +3423,7 @@ void subsurf_calculate_limit_positions(Mesh *me, float (*positions_r)[3]) } /* ad-hoc correction for boundary vertices, to at least avoid them - moving completely out of place (brecht) */ + * moving completely out of place (brecht) */ if(numFaces && numFaces != N) mul_v3_fl(face_sum, (float)N/(float)numFaces); diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 8e3ec4766e9..a60ea879954 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -440,11 +440,11 @@ Text *add_text(const char *file, const char *relpath) } /* create new line in cases: - - rest of line (if last line in file hasn't got \n terminator). - in this case content of such line would be used to fill text line buffer - - file is empty. in this case new line is needed to start editing from. - - last characted in buffer is \n. in this case new line is needed to - deal with newline at end of file. (see [#28087]) (sergey) */ + * - rest of line (if last line in file hasn't got \n terminator). + * in this case content of such line would be used to fill text line buffer + * - file is empty. in this case new line is needed to start editing from. + * - last characted in buffer is \n. in this case new line is needed to + * deal with newline at end of file. (see [#28087]) (sergey) */ if (llen!=0 || ta->nlines==0 || buffer[len-1]=='\n') { tmp= (TextLine*) MEM_mallocN(sizeof(TextLine), "textline"); tmp->line= (char*) MEM_mallocN(llen+1, "textline_string"); @@ -3062,8 +3062,8 @@ void txt_add_marker(Text *text, TextLine *line, int start, int end, const unsign } /* Returns the first matching marker on the specified line between two points. - If the group or flags fields are non-zero the returned flag must be in the - specified group and have at least the specified flags set. */ + * If the group or flags fields are non-zero the returned flag must be in the + * specified group and have at least the specified flags set. */ TextMarker *txt_find_marker_region(Text *text, TextLine *line, int start, int end, int group, int flags) { TextMarker *marker, *next; @@ -3085,8 +3085,8 @@ TextMarker *txt_find_marker_region(Text *text, TextLine *line, int start, int en } /* Clears all markers on the specified line between two points. If the group or - flags fields are non-zero the returned flag must be in the specified group - and have at least the specified flags set. */ + * flags fields are non-zero the returned flag must be in the specified group + * and have at least the specified flags set. */ short txt_clear_marker_region(Text *text, TextLine *line, int start, int end, int group, int flags) { TextMarker *marker, *next; @@ -3111,8 +3111,8 @@ short txt_clear_marker_region(Text *text, TextLine *line, int start, int end, in } /* Clears all markers in the specified group (if given) with at least the - specified flags set. Useful for clearing temporary markers (group=0, - flags=TMARK_TEMP) */ + * specified flags set. Useful for clearing temporary markers (group=0, + * flags=TMARK_TEMP) */ short txt_clear_markers(Text *text, int group, int flags) { TextMarker *marker, *next; @@ -3131,7 +3131,7 @@ short txt_clear_markers(Text *text, int group, int flags) } /* Finds the marker at the specified line and cursor position with at least the - specified flags set in the given group (if non-zero). */ + * specified flags set in the given group (if non-zero). */ TextMarker *txt_find_marker(Text *text, TextLine *line, int curs, int group, int flags) { TextMarker *marker; @@ -3150,7 +3150,7 @@ TextMarker *txt_find_marker(Text *text, TextLine *line, int curs, int group, int } /* Finds the previous marker in the same group. If no other is found, the same - marker will be returned */ + * marker will be returned */ TextMarker *txt_prev_marker(Text *text, TextMarker *marker) { TextMarker *tmp= marker; @@ -3164,7 +3164,7 @@ TextMarker *txt_prev_marker(Text *text, TextMarker *marker) } /* Finds the next marker in the same group. If no other is found, the same - marker will be returned */ + * marker will be returned */ TextMarker *txt_next_marker(Text *text, TextMarker *marker) { TextMarker *tmp= marker; diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 4c40dca3365..23a30b6522b 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -911,9 +911,9 @@ void make_local_texture(Tex *tex) int a, is_local= FALSE, is_lib= FALSE; /* - only lib users: do nothing - * - only local users: set flag - * - mixed: make copy - */ + * - only local users: set flag + * - mixed: make copy + */ if(tex->id.lib==NULL) return; @@ -1157,8 +1157,8 @@ Tex *give_current_material_texture(Material *ma) if(ma && ma->use_nodes && ma->nodetree) { /* first check texture, then material, this works together - with a hack that clears the active ID flag for textures on - making a material node active */ + * with a hack that clears the active ID flag for textures on + * making a material node active */ node= nodeGetActiveID(ma->nodetree, ID_TE); if(node) { diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index 4a509473ac8..35aeb869bdd 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -745,8 +745,8 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking) } /* duplicate currently operating tracks to temporary list. - this is needed to keep names in unique state and it's faster to change names - of currently operating tracks (if needed) */ + * this is needed to keep names in unique state and it's faster to change names + * of currently operating tracks (if needed) */ for(a= 0; anum_tracks; a++) { int replace_sel= 0, replace_rot= 0; MovieTrackingTrack *new_track, *old; @@ -1480,7 +1480,7 @@ int BKE_tracking_next(MovieTrackingContext *context) #pragma omp critical { /* check if there's no keyframe/tracked markers before tracking marker. - if so -- create disabled marker before currently tracking "segment" */ + * if so -- create disabled marker before currently tracking "segment" */ put_disabled_marker(track, marker, !context->backwards, 0); } } @@ -2684,7 +2684,7 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, if(tangle==0.0f) { /* if angle is zero, then it's much faster to use rect copy - but could be issues with subpixel precisions */ + * but could be issues with subpixel precisions */ IMB_rectcpy(tmpibuf, ibuf, tloc[0]-(tscale-1.0f)*width/2.0f, tloc[1]-(tscale-1.0f)*height/2.0f, 0, 0, ibuf->x, ibuf->y); } else { float mat[4][4]; diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index 9ab91fce302..c3ba8f1ad6a 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -120,10 +120,10 @@ static struct bUnitDef buMetricLenDef[] = { /* These get displayed because of float precision problems in the transform header, * could work around, but for now probably people wont use these */ - /* +#if 0 {"nanometer", "Nanometers", "nm", NULL, 0.000000001, 0.0, B_UNIT_DEF_NONE}, {"picometer", "Picometers", "pm", NULL, 0.000000000001, 0.0,B_UNIT_DEF_NONE}, - */ +#endif {NULL, NULL, NULL, NULL, NULL, 0.0, 0.0} }; static struct bUnitCollection buMetricLenCollecton = {buMetricLenDef, 3, 0, sizeof(buMetricLenDef)/sizeof(bUnitDef)}; diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index b3f1e140829..a4fc4c7bfe3 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -169,9 +169,9 @@ void make_local_world(World *wrld) int is_local= FALSE, is_lib= FALSE; /* - only lib users: do nothing - * - only local users: set flag - * - mixed: make copy - */ + * - only local users: set flag + * - mixed: make copy + */ if(wrld->id.lib==NULL) return; if(wrld->id.us==1) { diff --git a/source/blender/blenlib/BLI_bitmap.h b/source/blender/blenlib/BLI_bitmap.h index 16a6fb8ee15..2aed71a7d44 100644 --- a/source/blender/blenlib/BLI_bitmap.h +++ b/source/blender/blenlib/BLI_bitmap.h @@ -29,7 +29,7 @@ typedef unsigned int* BLI_bitmap; /* warning: the bitmap does not keep track of its own size or check - for out-of-bounds access */ + * for out-of-bounds access */ /* internal use */ /* 2^5 = 32 (bits) */ @@ -46,7 +46,7 @@ typedef unsigned int* BLI_bitmap; (BLI_BITMAP_NUM_BLOCKS(_tot) * sizeof(unsigned int)) /* allocate memory for a bitmap with '_tot' bits; free - with MEM_freeN() */ + * with MEM_freeN() */ #define BLI_BITMAP_NEW(_tot, _alloc_string) \ ((BLI_bitmap)MEM_callocN(BLI_BITMAP_SIZE(_tot), \ _alloc_string)) diff --git a/source/blender/blenlib/BLI_bpath.h b/source/blender/blenlib/BLI_bpath.h index f1639bdb3c1..a0f253d9ad4 100644 --- a/source/blender/blenlib/BLI_bpath.h +++ b/source/blender/blenlib/BLI_bpath.h @@ -40,7 +40,7 @@ struct Main; struct ReportList; /* Function that does something with an ID's file path. Should return 1 if the - path has changed, and in that case, should write the result to pathOut. */ + * path has changed, and in that case, should write the result to pathOut. */ typedef int (*BPathVisitor)(void *userdata, char *path_dst, const char *path_src); /* Executes 'visit' for each path associated with 'id'. */ void bpath_traverse_id(struct Main *bmain, struct ID *id, BPathVisitor visit_cb, const int flag, void *userdata); diff --git a/source/blender/blenlib/BLI_editVert.h b/source/blender/blenlib/BLI_editVert.h index b5096abc5bc..0f754d5fc98 100644 --- a/source/blender/blenlib/BLI_editVert.h +++ b/source/blender/blenlib/BLI_editVert.h @@ -64,8 +64,8 @@ typedef struct EditVert short xs, ys; /* used to store a screenspace 2d projection of the verts */ /* f stores selection eg. if (eve->f & SELECT) {... - h for hidden. if (!eve->h) {... - f1 and f2 can be used for temp data, clear them first*/ + * h for hidden. if (!eve->h) {... + * f1 and f2 can be used for temp data, clear them first*/ unsigned char f, h, f1, f2; float bweight; short fast; /* only 0 or 1, for editmesh_fastmalloc, do not store temp data here! */ diff --git a/source/blender/blenlib/BLI_fnmatch.h b/source/blender/blenlib/BLI_fnmatch.h index 711d1aa756b..5914d150d56 100644 --- a/source/blender/blenlib/BLI_fnmatch.h +++ b/source/blender/blenlib/BLI_fnmatch.h @@ -1,21 +1,21 @@ /* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. - -NOTE: The canonical source of this file is maintained with the GNU C Library. -Bugs can be reported to bug-glibc@prep.ai.mit.edu. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software Foundation, -Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + * + * NOTE: The canonical source of this file is maintained with the GNU C Library. + * Bugs can be reported to bug-glibc@prep.ai.mit.edu. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __BLI_FNMATCH_H__ #define __BLI_FNMATCH_H__ @@ -35,13 +35,13 @@ extern "C" { #undef __P #define __P(protos) () /* We can get away without defining `const' here only because in this file - it is used only inside the prototype for `fnmatch', which is elided in - non-ANSI C where `const' is problematical. */ + * it is used only inside the prototype for `fnmatch', which is elided in + * non-ANSI C where `const' is problematical. */ #endif /* C++ or ANSI C. */ /* We #undef these before defining them because some losing systems - (HP-UX A.08.07 for example) define these in . */ + * (HP-UX A.08.07 for example) define these in . */ #undef FNM_PATHNAME #undef FNM_NOESCAPE #undef FNM_PERIOD @@ -61,7 +61,7 @@ extern "C" { #define FNM_NOMATCH 1 /* Match STRING against the filename pattern PATTERN, - returning zero if it matches, FNM_NOMATCH if not. */ + * returning zero if it matches, FNM_NOMATCH if not. */ extern int fnmatch __P ((const char *__pattern, const char *__string, int __flags)); diff --git a/source/blender/blenlib/BLI_heap.h b/source/blender/blenlib/BLI_heap.h index 5c67bf52b9a..5ceccda96e4 100644 --- a/source/blender/blenlib/BLI_heap.h +++ b/source/blender/blenlib/BLI_heap.h @@ -41,12 +41,12 @@ typedef struct HeapNode HeapNode; typedef void (*HeapFreeFP)(void *ptr); /* Creates a new heap. BLI_memarena is used for allocating nodes. Removed nodes - are recycled, so memory usage will not shrink. */ + * are recycled, so memory usage will not shrink. */ Heap* BLI_heap_new (void); void BLI_heap_free (Heap *heap, HeapFreeFP ptrfreefp); /* Insert heap node with a value (often a 'cost') and pointer into the heap, - duplicate values are allowed. */ + * duplicate values are allowed. */ HeapNode* BLI_heap_insert (Heap *heap, float value, void *ptr); /* Remove a heap node. */ diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index 2a5543b10ed..a725a3ff4c1 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -103,8 +103,8 @@ int isect_line_line_strict_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3], float vi[3], float *r_lambda); -/*if clip is nonzero, will only return true if lambda is >= 0.0 - (i.e. intersection point is along positive d)*/ +/* if clip is nonzero, will only return true if lambda is >= 0.0 + * (i.e. intersection point is along positive d)*/ int isect_ray_plane_v3(const float p1[3], const float d[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda, const int clip); @@ -248,9 +248,9 @@ void vcloud_estimate_transform(int list_size, float (*pos)[3], float *weight, /****************************** Spherical Harmonics *************************/ /* Uses 2nd order SH => 9 coefficients, stored in this order: - 0 = (0,0), - 1 = (1,-1), 2 = (1,0), 3 = (1,1), - 4 = (2,-2), 5 = (2,-1), 6 = (2,0), 7 = (2,1), 8 = (2,2) */ + * 0 = (0,0), + * 1 = (1,-1), 2 = (1,0), 3 = (1,1), + * 4 = (2,-2), 5 = (2,-1), 6 = (2,0), 7 = (2,1), 8 = (2,2) */ MINLINE void zero_sh(float r[9]); MINLINE void copy_sh_sh(float r[9], const float a[9]); diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h index 8c19941e18c..328b5614f52 100644 --- a/source/blender/blenlib/BLI_math_matrix.h +++ b/source/blender/blenlib/BLI_math_matrix.h @@ -71,7 +71,7 @@ void mul_m3_m3m3(float R[3][3], float A[3][3], float B[3][3]); void mul_m4_m3m4(float R[4][4], float A[3][3], float B[4][4]); void mul_m4_m4m3(float R[4][4], float A[4][4], float B[3][3]); /* note: the A,B arguments are reversed compared to previous mul_m4_m4m4 - function, for consistency with above functions & math notation. */ + * function, for consistency with above functions & math notation. */ void mult_m4_m4m4(float R[4][4], float A[4][4], float B[4][4]); void mult_m3_m3m4(float R[3][3], float A[4][4], float B[3][3]); diff --git a/source/blender/blenlib/BLI_md5.h b/source/blender/blenlib/BLI_md5.h index 51211d548cd..8ce479b1801 100644 --- a/source/blender/blenlib/BLI_md5.h +++ b/source/blender/blenlib/BLI_md5.h @@ -29,15 +29,15 @@ #include /* Compute MD5 message digest for LEN bytes beginning at BUFFER. The - result is always in little endian byte order, so that a byte-wise - output yields to the wanted ASCII representation of the message - digest. */ + * result is always in little endian byte order, so that a byte-wise + * output yields to the wanted ASCII representation of the message + * digest. */ void *md5_buffer(const char *buffer, size_t len, void *resblock); /* Compute MD5 message digest for bytes read from STREAM. The - resulting message digest number will be written into the 16 bytes - beginning at RESBLOCK. */ + * resulting message digest number will be written into the 16 bytes + * beginning at RESBLOCK. */ int md5_stream(FILE *stream, void *resblock); diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h index 3ee548098ff..e02b48feda7 100644 --- a/source/blender/blenlib/BLI_path_util.h +++ b/source/blender/blenlib/BLI_path_util.h @@ -115,10 +115,10 @@ void BLI_splitdirstring(char *di,char *fi); void BLI_clean(char *path); /** - * dir can be any input, like from buttons, and this function - * converts it to a regular full path. - * Also removes garbage from directory paths, like /../ or double slashes etc - */ + * dir can be any input, like from buttons, and this function + * converts it to a regular full path. + * Also removes garbage from directory paths, like /../ or double slashes etc + */ void BLI_cleanup_file(const char *relabase, char *dir); /* removes trailing slash */ void BLI_cleanup_dir(const char *relabase, char *dir); /* same as above but adds a trailing slash */ void BLI_cleanup_path(const char *relabase, char *dir); /* doesn't touch trailing slash */ @@ -129,18 +129,18 @@ int BLI_parent_dir(char *path); /* return whether directory is root and thus has no parent dir */ int BLI_has_parent(char *path); - /** - * Blender's path code replacement function. - * Bases \a path strings leading with "//" by the - * directory \a basepath, and replaces instances of - * '#' with the \a framenum. Results are written - * back into \a path. - * - * \a path The path to convert - * \a basepath The directory to base relative paths with. - * \a framenum The framenumber to replace the frame code with. - * \retval Returns true if the path was relative (started with "//"). - */ +/** + * Blender's path code replacement function. + * Bases \a path strings leading with "//" by the + * directory \a basepath, and replaces instances of + * '#' with the \a framenum. Results are written + * back into \a path. + * + * \a path The path to convert + * \a basepath The directory to base relative paths with. + * \a framenum The framenumber to replace the frame code with. + * \retval Returns true if the path was relative (started with "//"). + */ int BLI_path_abs(char *path, const char *basepath); int BLI_path_frame(char *path, int frame, int digits); int BLI_path_frame_range(char *path, int sta, int end, int digits); @@ -155,14 +155,14 @@ void BLI_path_rel(char *file, const char *relfile); # define BLI_path_ncmp strncmp #endif - /** - * Change every \a from in \a string into \a to. The - * result will be in \a string - * - * \a string The string to work on - * \a from The character to replace - * \a to The character to replace with - */ +/** + * Change every \a from in \a string into \a to. The + * result will be in \a string + * + * \a string The string to work on + * \a from The character to replace + * \a to The character to replace with + */ void BLI_char_switch(char *string, char from, char to); /* Initialize path to program executable */ diff --git a/source/blender/blenlib/BLI_pbvh.h b/source/blender/blenlib/BLI_pbvh.h index 3b52c9b77db..f60f8d90b09 100644 --- a/source/blender/blenlib/BLI_pbvh.h +++ b/source/blender/blenlib/BLI_pbvh.h @@ -60,8 +60,8 @@ void BLI_pbvh_build_grids(PBVH *bvh, struct DMGridData **grids, void BLI_pbvh_free(PBVH *bvh); /* Hierarchical Search in the BVH, two methods: - * for each hit calling a callback - * gather nodes in an array (easy to multithread) */ + * - for each hit calling a callback + * - gather nodes in an array (easy to multithread) */ void BLI_pbvh_search_callback(PBVH *bvh, BLI_pbvh_SearchCallback scb, void *search_data, @@ -72,9 +72,9 @@ void BLI_pbvh_search_gather(PBVH *bvh, PBVHNode ***array, int *tot); /* Raycast - the hit callback is called for all leaf nodes intersecting the ray; - it's up to the callback to find the primitive within the leaves that is - hit first */ + * the hit callback is called for all leaf nodes intersecting the ray; + * it's up to the callback to find the primitive within the leaves that is + * hit first */ void BLI_pbvh_raycast(PBVH *bvh, BLI_pbvh_HitOccludedCallback cb, void *data, float ray_start[3], float ray_normal[3], int original); @@ -131,8 +131,8 @@ int BLI_pbvh_isDeformed(struct PBVH *pbvh); /* Vertex Iterator */ /* this iterator has quite a lot of code, but it's designed to: - - allow the compiler to eliminate dead code and variables - - spend most of the time in the relatively simple inner loop */ + * - allow the compiler to eliminate dead code and variables + * - spend most of the time in the relatively simple inner loop */ #define PBVH_ITER_ALL 0 #define PBVH_ITER_UNIQUE 1 @@ -159,7 +159,7 @@ typedef struct PBVHVertexIter { int *vert_indices; /* result: these are all computed in the macro, but we assume - that compiler optimizations will skip the ones we don't use */ + * that compiler optimizations will skip the ones we don't use */ struct MVert *mvert; float *co; short *no; diff --git a/source/blender/blenlib/BLI_scanfill.h b/source/blender/blenlib/BLI_scanfill.h index d497ffa4941..9589ee6e305 100644 --- a/source/blender/blenlib/BLI_scanfill.h +++ b/source/blender/blenlib/BLI_scanfill.h @@ -82,7 +82,7 @@ struct ScanFillVert *BLI_addfillvert(const float vec[3]); struct ScanFillEdge *BLI_addfilledge(struct ScanFillVert *v1, struct ScanFillVert *v2); /* Optionally set ScanFillEdge f to this to mark original boundary edges. - Only needed if there are internal diagonal edges pased to BLI_edgefill. */ + * Only needed if there are internal diagonal edges pased to BLI_edgefill. */ #define FILLBOUNDARY 1 int BLI_begin_edgefill(void); diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index afc8a6a4aa6..1c0bac4a82f 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -201,16 +201,18 @@ static int ADJUST_MEMORY(void *local_memblock, void **memblock, int new_size, in ////////////////////////////////////////////////////////////////////////////////////////////////////// //static int size_threshold = 16; /* -* Common methods for all algorithms -*/ -/*static int floor_lg(int a) + * Common methods for all algorithms + */ +#if 0 +static int floor_lg(int a) { return (int)(floor(log(a)/log(2))); -}*/ +} +#endif /* -* Insertion sort algorithm -*/ + * Insertion sort algorithm + */ static void bvh_insertionsort(BVHNode **a, int lo, int hi, int axis) { int i,j; @@ -244,8 +246,8 @@ static int bvh_partition(BVHNode **a, int lo, int hi, BVHNode * x, int axis) } /* -* Heapsort algorithm -*/ + * Heapsort algorithm + */ #if 0 static void bvh_downheap(BVHNode **a, int i, int n, int lo, int axis) { @@ -310,8 +312,8 @@ static BVHNode *bvh_medianof3(BVHNode **a, int lo, int mid, int hi, int axis) // #if 0 /* -* Quicksort algorithm modified for Introsort -*/ + * Quicksort algorithm modified for Introsort + */ static void bvh_introsort_loop (BVHNode **a, int lo, int hi, int depth_limit, int axis) { int p; @@ -1210,7 +1212,7 @@ static float calc_nearest_point(const float proj[3], BVHNode *node, float *neare nearest[i] = proj[i]; } -/* +#if 0 //nearest on a general hull copy_v3_v3(nearest, data->co); for(i = data->tree->start_axis; i != data->tree->stop_axis; i++, bv+=2) @@ -1228,7 +1230,8 @@ static float calc_nearest_point(const float proj[3], BVHNode *node, float *neare madd_v3_v3fl(nearest, KDOP_AXES[i], du); } } -*/ +#endif + return len_squared_v3v3(proj, nearest); } diff --git a/source/blender/blenlib/intern/boxpack2d.c b/source/blender/blenlib/intern/boxpack2d.c index 57174d0c0dd..7a1f7bee1ce 100644 --- a/source/blender/blenlib/intern/boxpack2d.c +++ b/source/blender/blenlib/intern/boxpack2d.c @@ -277,8 +277,8 @@ void boxPack2D(boxPack *boxarray, const int len, float *tot_width, float *tot_he } /* Now we need to check that the box intersects - * with any other boxes - * Assume no intersection... */ + * with any other boxes + * Assume no intersection... */ isect = 0; if (/* Constrain boxes to positive X/Y values */ diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c index fdda9166c94..7bc2446b64b 100644 --- a/source/blender/blenlib/intern/bpath.c +++ b/source/blender/blenlib/intern/bpath.c @@ -499,7 +499,7 @@ void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int fla Tex *tex = (Tex *)id; if (tex->plugin) { /* FIXME: rewrite_path assumes path length of FILE_MAX, but - tex->plugin->name is 160. ... is this field even a path? */ + * tex->plugin->name is 160. ... is this field even a path? */ //rewrite_path(tex->plugin->name, visit_cb, bpath_user_data); } if (tex->type == TEX_VOXELDATA && TEX_VD_IS_SOURCE_PATH(tex->vd->file_format)) { @@ -594,7 +594,7 @@ void bpath_traverse_main(Main *bmain, BPathVisitor visit_cb, const int flag, voi } /* Rewrites a relative path to be relative to the main file - unless the path is - absolute, in which case it is not altered. */ + * absolute, in which case it is not altered. */ int bpath_relocate_visitor(void *pathbase_v, char *path_dst, const char *path_src) { /* be sure there is low chance of the path being too short */ @@ -609,7 +609,7 @@ int bpath_relocate_visitor(void *pathbase_v, char *path_dst, const char *path_sr } /* Make referenced file absolute. This would be a side-effect of - BLI_cleanup_file, but we do it explicitely so we know if it changed. */ + * BLI_cleanup_file, but we do it explicitely so we know if it changed. */ BLI_strncpy(filepath, path_src, FILE_MAX); if (BLI_path_abs(filepath, base_old)) { /* Path was relative and is now absolute. Remap. diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 895ae03ab0f..a868cf8ea96 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -60,9 +60,9 @@ /* gzip the file in from and write it to "to". - return -1 if zlib fails, -2 if the originating file does not exist - note: will remove the "from" file - */ + * return -1 if zlib fails, -2 if the originating file does not exist + * note: will remove the "from" file + */ int BLI_file_gzip(const char *from, const char *to) { char buffer[10240]; @@ -106,8 +106,8 @@ int BLI_file_gzip(const char *from, const char *to) } /* gzip the file in from_file and write it to memery to_mem, at most size bytes. - return the unziped size - */ + * return the unziped size + */ char *BLI_file_ungzip_to_mem(const char *from_file, int *size_r) { gzFile gzfile; diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c index 3a0d44db12e..8fe081fe70b 100644 --- a/source/blender/blenlib/intern/freetypefont.c +++ b/source/blender/blenlib/intern/freetypefont.c @@ -322,13 +322,13 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf) const char *fontname; VFontData *vfd; -/* +#if 0 FT_CharMap found = 0; FT_CharMap charmap; FT_UShort my_platform_id = TT_PLATFORM_MICROSOFT; FT_UShort my_encoding_id = TT_MS_ID_UNICODE_CS; int n; -*/ +#endif // load the freetype font err = FT_New_Memory_Face( library, @@ -338,7 +338,8 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf) &face ); if(err) return NULL; -/* + +#if 0 for ( n = 0; n < face->num_charmaps; n++ ) { charmap = face->charmaps[n]; @@ -355,7 +356,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf) // now, select the charmap for the face object err = FT_Set_Charmap( face, found ); if ( err ) { return NULL; } -*/ +#endif // allocate blender font vfd= MEM_callocN(sizeof(*vfd), "FTVFontData"); @@ -416,13 +417,13 @@ static int check_freetypefont(PackedFile * pf) FT_Face face; FT_GlyphSlot glyph; FT_UInt glyph_index; -/* +#if 0 FT_CharMap charmap; FT_CharMap found; FT_UShort my_platform_id = TT_PLATFORM_MICROSOFT; FT_UShort my_encoding_id = TT_MS_ID_UNICODE_CS; int n; -*/ +#endif int success = 0; err = FT_New_Memory_Face( library, @@ -435,24 +436,23 @@ static int check_freetypefont(PackedFile * pf) //XXX error("This is not a valid font"); } else { -/* - for ( n = 0; n < face->num_charmaps; n++ ) - { - charmap = face->charmaps[n]; - if ( charmap->platform_id == my_platform_id && - charmap->encoding_id == my_encoding_id ) - { - found = charmap; - break; - } + +#if 0 + for ( n = 0; n < face->num_charmaps; n++) { + charmap = face->charmaps[n]; + if (charmap->platform_id == my_platform_id && charmap->encoding_id == my_encoding_id) { + found = charmap; + break; + } } - if ( !found ) { return 0; } + if (!found ) { return 0; } // now, select the charmap for the face object err = FT_Set_Charmap( face, found ); if ( err ) { return 0; } -*/ +#endif + glyph_index = FT_Get_Char_Index( face, 'A' ); err = FT_Load_Glyph(face, glyph_index, FT_LOAD_NO_SCALE | FT_LOAD_NO_BITMAP); if(err) success = 0; diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index b9772b1f3b4..96600b6665f 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -290,8 +290,8 @@ void xyz_to_rgb(float xc, float yc, float zc, float *r, float *g, float *b, int } /* we define a 'cpack' here as a (3 byte color code) number that can be expressed like 0xFFAA66 or so. - for that reason it is sensitive for endianness... with this function it works correctly -*/ + * for that reason it is sensitive for endianness... with this function it works correctly + */ unsigned int hsv_to_cpack(float h, float s, float v) { @@ -413,11 +413,11 @@ void minmax_rgb(short c[]) } /*If the requested RGB shade contains a negative weight for - one of the primaries, it lies outside the color gamut - accessible from the given triple of primaries. Desaturate - it by adding white, equal quantities of R, G, and B, enough - to make RGB all positive. The function returns 1 if the - components were modified, zero otherwise.*/ + * one of the primaries, it lies outside the color gamut + * accessible from the given triple of primaries. Desaturate + * it by adding white, equal quantities of R, G, and B, enough + * to make RGB all positive. The function returns 1 if the + * components were modified, zero otherwise.*/ int constrain_rgb(float *r, float *g, float *b) { float w; diff --git a/source/blender/blenlib/intern/math_color_inline.c b/source/blender/blenlib/intern/math_color_inline.c index f497470fa4c..47ee54d6215 100644 --- a/source/blender/blenlib/intern/math_color_inline.c +++ b/source/blender/blenlib/intern/math_color_inline.c @@ -79,9 +79,9 @@ MINLINE void linearrgb_to_srgb_uchar4(unsigned char srgb[4], const float linear[ } /* predivide versions to work on associated/premultipled alpha. if this should - be done or not depends on the background the image will be composited over, - ideally you would never do color space conversion on an image with alpha - because it is ill defined */ + * be done or not depends on the background the image will be composited over, + * ideally you would never do color space conversion on an image with alpha + * because it is ill defined */ MINLINE void srgb_to_linearrgb_predivide_v4(float linear[4], const float srgb[4]) { diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 64b31df9c8e..9f5e191c9ff 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -331,8 +331,9 @@ int isect_line_line_v2(const float v1[2], const float v2[2], const float v3[2], } /* get intersection point of two 2D segments and return intersection type: - -1: colliniar - 1: intersection */ + * -1: colliniar + * 1: intersection + */ int isect_seg_seg_v2_point(const float v1[2], const float v2[2], const float v3[2], const float v4[2], float vi[2]) { float a1, a2, b1, b2, c1, c2, d; @@ -531,29 +532,28 @@ int isect_line_sphere_v2(const float l1[2], const float l2[2], } /* --1: colliniar - 1: intersection - -*/ + * -1: colliniar + * 1: intersection + */ static short IsectLLPt2Df(const float x0, const float y0, const float x1, const float y1, const float x2, const float y2, const float x3, const float y3, float *xi,float *yi) { /* - this function computes the intersection of the sent lines - and returns the intersection point, note that the function assumes - the lines intersect. the function can handle vertical as well - as horizontal lines. note the function isn't very clever, it simply - applies the math, but we don't need speed since this is a - pre-processing step - */ + * this function computes the intersection of the sent lines + * and returns the intersection point, note that the function assumes + * the lines intersect. the function can handle vertical as well + * as horizontal lines. note the function isn't very clever, it simply + * applies the math, but we don't need speed since this is a + * pre-processing step + */ float c1,c2, // constants of linear equations det_inv, // the inverse of the determinant of the coefficient m1,m2; // the slopes of each line /* - compute slopes, note the cludge for infinity, however, this will - be close enough - */ + * compute slopes, note the cludge for infinity, however, this will + * be close enough + */ if (fabs(x1-x0) > 0.000001) m1 = (y1-y0) / (x1-x0); else @@ -629,9 +629,9 @@ int isect_point_quad_v2(const float pt[2], const float v1[2], const float v2[2], } /* moved from effect.c - test if the line starting at p1 ending at p2 intersects the triangle v0..v2 - return non zero if it does -*/ + * test if the line starting at p1 ending at p2 intersects the triangle v0..v2 + * return non zero if it does + */ int isect_line_tri_v3(const float p1[3], const float p2[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2]) @@ -670,9 +670,9 @@ int isect_line_tri_v3(const float p1[3], const float p2[3], return 1; } /* moved from effect.c - test if the ray starting at p1 going in d direction intersects the triangle v0..v2 - return non zero if it does -*/ + * test if the ray starting at p1 going in d direction intersects the triangle v0..v2 + * return non zero if it does + */ int isect_ray_tri_v3(const float p1[3], const float d[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2]) @@ -1512,14 +1512,12 @@ int isect_point_tri_v2(float v0[2], float v1[2], float v2[2], float pt[2]) #endif /* - - x1,y2 - | \ - | \ .(a,b) - | \ - x1,y1-- x2,y1 - -*/ + * x1,y2 + * | \ + * | \ .(a,b) + * | \ + * x1,y1-- x2,y1 + */ int isect_point_tri_v2_int(const int x1, const int y1, const int x2, const int y2, const int a, const int b) { float v1[2], v2[2], v3[2], p[2]; @@ -1541,18 +1539,18 @@ int isect_point_tri_v2_int(const int x1, const int y1, const int x2, const int y static int point_in_slice(const float p[3], const float v1[3], const float l1[3], const float l2[3]) { -/* -what is a slice ? -some maths: -a line including l1,l2 and a point not on the line -define a subset of R3 delimeted by planes parallel to the line and orthogonal -to the (point --> line) distance vector,one plane on the line one on the point, -the room inside usually is rather small compared to R3 though still infinte -useful for restricting (speeding up) searches -e.g. all points of triangular prism are within the intersection of 3 'slices' -onother trivial case : cube -but see a 'spat' which is a deformed cube with paired parallel planes needs only 3 slices too -*/ + /* + * what is a slice ? + * some maths: + * a line including l1,l2 and a point not on the line + * define a subset of R3 delimeted by planes parallel to the line and orthogonal + * to the (point --> line) distance vector,one plane on the line one on the point, + * the room inside usually is rather small compared to R3 though still infinte + * useful for restricting (speeding up) searches + * e.g. all points of triangular prism are within the intersection of 3 'slices' + * onother trivial case : cube + * but see a 'spat' which is a deformed cube with paired parallel planes needs only 3 slices too + */ float h,rp[3],cp[3],q[3]; closest_to_line_v3(cp,v1,l1,l2); @@ -1565,8 +1563,8 @@ but see a 'spat' which is a deformed cube with paired parallel planes needs only } #if 0 -/*adult sister defining the slice planes by the origin and the normal -NOTE |normal| may not be 1 but defining the thickness of the slice*/ +/* adult sister defining the slice planes by the origin and the normal + * NOTE |normal| may not be 1 but defining the thickness of the slice */ static int point_in_slice_as(float p[3],float origin[3],float normal[3]) { float h,rp[3]; @@ -1791,7 +1789,7 @@ void interp_weights_face_v3(float w[4], const float v1[3], const float v2[3], co if(degenerate || (w[0] < 0.0f)) { /* if w[1] is negative, co is on the other side of the v1-v3 edge, - so we interpolate using the other triangle */ + * so we interpolate using the other triangle */ degenerate= barycentric_weights(v2, v3, v4, co, n, w2); if(!degenerate) { @@ -2035,8 +2033,8 @@ void interp_cubic_v3(float x[3], float v[3], const float x1[3], const float v1[3 void resolve_tri_uv(float r_uv[2], const float st[2], const float st0[2], const float st1[2], const float st2[2]) { /* find UV such that - t= u*t0 + v*t1 + (1-u-v)*t2 - u*(t0-t2) + v*(t1-t2)= t-t2 */ + * t= u*t0 + v*t1 + (1-u-v)*t2 + * u*(t0-t2) + v*(t1-t2)= t-t2 */ const double a= st0[0]-st2[0], b= st1[0]-st2[0]; const double c= st0[1]-st2[1], d= st1[1]-st2[1]; const double det= a*d - c*b; @@ -2056,7 +2054,7 @@ void resolve_quad_uv(float r_uv[2], const float st[2], const float st0[2], const (st2[0]*st3[1] - st2[1]*st3[0]) + (st3[0]*st0[1] - st3[1]*st0[0]); /* X is 2D cross product (determinant) - A= (p0-p) X (p0-p3)*/ + * A= (p0-p) X (p0-p3)*/ const double a= (st0[0]-st[0])*(st0[1]-st3[1]) - (st0[1]-st[1])*(st0[0]-st3[0]); /* B= ( (p0-p) X (p1-p2) + (p1-p) X (p0-p3) ) / 2 */ @@ -2083,7 +2081,7 @@ void resolve_quad_uv(float r_uv[2], const float st[2], const float st0[2], const } /* find UV such that - fST = (1-u)(1-v)*ST0 + u*(1-v)*ST1 + u*v*ST2 + (1-u)*v*ST3 */ + * fST = (1-u)(1-v)*ST0 + u*(1-v)*ST1 + u*v*ST2 + (1-u)*v*ST3 */ { const double denom_s= (1-r_uv[0])*(st0[0]-st3[0]) + r_uv[0]*(st1[0]-st2[0]); const double denom_t= (1-r_uv[0])*(st0[1]-st3[1]) + r_uv[0]*(st1[1]-st2[1]); @@ -2386,7 +2384,7 @@ void accumulate_vertex_normals(float n1[3], float n2[3], float n3[3], } /* Add weighted face normal component into normals of the face vertices. - Caller must pass pre-allocated vdiffs of nverts length. */ + * Caller must pass pre-allocated vdiffs of nverts length. */ void accumulate_vertex_normals_poly(float **vertnos, float polyno[3], float **vertcos, float vdiffs[][3], int nverts) { @@ -2405,9 +2403,9 @@ void accumulate_vertex_normals_poly(float **vertnos, float polyno[3], for(i=0; i 1.0e-35f) { d= sqrtf(d); mul_v3_v3fl(r, a, 1.0f/d); @@ -541,7 +541,7 @@ MINLINE double normalize_v3_d(double n[3]) double d= n[0]*n[0] + n[1]*n[1] + n[2]*n[2]; /* a larger value causes normalize errors in a - scaled down models with camera xtreme close */ + * scaled down models with camera xtreme close */ if(d > 1.0e-35) { double mul; diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index f77ea3895c3..ddf165662fc 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -1043,7 +1043,8 @@ float BLI_hnoisep(float noisesize, float x, float y, float z) return noise3_perlin(vec); } -/*static float turbulencep(float noisesize, float x, float y, float z, int nr) +#if 0 +static float turbulencep(float noisesize, float x, float y, float z, int nr) { float vec[3]; @@ -1052,7 +1053,8 @@ float BLI_hnoisep(float noisesize, float x, float y, float z) vec[2]= z/noisesize; nr++; return turbulence_perlin(vec, 1.0, (float)(1< 2 && relfile[1] != ':') { char* ptemp; /* fix missing volume name in relative base, - can happen with old recent-files.txt files */ + * can happen with old recent-files.txt files */ get_default_root(temp); ptemp = &temp[2]; if (relfile[0] != '\\' && relfile[0] != '/') { @@ -471,7 +471,7 @@ void BLI_path_rel(char *file, const char *relfile) if (lslash) { /* find the prefix of the filename that is equal for both filenames. - This is replaced by the two slashes at the beginning */ + * This is replaced by the two slashes at the beginning */ char *p= temp; char *q= file; @@ -490,8 +490,8 @@ void BLI_path_rel(char *file, const char *relfile) } /* we might have passed the slash when the beginning of a dir matches - so we rewind. Only check on the actual filename - */ + * so we rewind. Only check on the actual filename + */ if (*q != '/') { while ( (q >= file) && (*q != '/') ) { --q; --p; } } @@ -502,10 +502,10 @@ void BLI_path_rel(char *file, const char *relfile) strcpy(res, "//"); /* p now points to the slash that is at the beginning of the part - where the path is different from the relative path. - We count the number of directories we need to go up in the - hierarchy to arrive at the common 'prefix' of the path - */ + * where the path is different from the relative path. + * We count the number of directories we need to go up in the + * hierarchy to arrive at the common 'prefix' of the path + */ while (p && p < lslash) { if (*p == '/') strcat(res, "../"); @@ -646,9 +646,9 @@ int BLI_path_abs(char *path, const char *basepath) BLI_strncpy(vol, path, 3); /* we are checking here if we have an absolute path that is not in the current - blend file as a lib main - we are basically checking for the case that a - UNIX root '/' is passed. - */ + * blend file as a lib main - we are basically checking for the case that a + * UNIX root '/' is passed. + */ if (!wasrelative && (vol[1] != ':' && (vol[0] == '\0' || vol[0] == '/' || vol[0] == '\\'))) { char *p = path; get_default_root(tmp); @@ -685,11 +685,11 @@ int BLI_path_abs(char *path, const char *basepath) BLI_cleanup_path(NULL, base); /* push slashes into unix mode - strings entering this part are - potentially messed up: having both back- and forward slashes. - Here we push into one conform direction, and at the end we - push them into the system specific dir. This ensures uniformity - of paths and solving some problems (and prevent potential future - ones) -jesterKing. */ + * potentially messed up: having both back- and forward slashes. + * Here we push into one conform direction, and at the end we + * push them into the system specific dir. This ensures uniformity + * of paths and solving some problems (and prevent potential future + * ones) -jesterKing. */ BLI_char_switch(tmp, '\\', '/'); BLI_char_switch(base, '\\', '/'); @@ -716,11 +716,11 @@ int BLI_path_abs(char *path, const char *basepath) #ifdef WIN32 /* skip first two chars, which in case of - absolute path will be drive:/blabla and - in case of relpath //blabla/. So relpath - // will be retained, rest will be nice and - shiny win32 backward slashes :) -jesterKing - */ + * absolute path will be drive:/blabla and + * in case of relpath //blabla/. So relpath + * // will be retained, rest will be nice and + * shiny win32 backward slashes :) -jesterKing + */ BLI_char_switch(path+2, '/', '\\'); #endif @@ -753,12 +753,12 @@ int BLI_path_cwd(char *path) printf( "Could not get the current working directory - $PWD for an unknown reason."); } else { /* uses the blend path relative to cwd important for loading relative linked files. - * - * cwd should contain c:\ etc on win32 so the relbase can be NULL - * relbase being NULL also prevents // being misunderstood as relative to the current - * blend file which isnt a feature we want to use in this case since were dealing - * with a path from the command line, rather than from inside Blender */ - + * + * cwd should contain c:\ etc on win32 so the relbase can be NULL + * relbase being NULL also prevents // being misunderstood as relative to the current + * blend file which isnt a feature we want to use in this case since were dealing + * with a path from the command line, rather than from inside Blender */ + char origpath[FILE_MAX]; BLI_strncpy(origpath, path, FILE_MAX); @@ -805,7 +805,7 @@ void BLI_getlastdir(const char* dir, char *last, const size_t maxlen) /* This is now only used to really get the user's default document folder */ /* On Windows I chose the 'Users//Documents' since it's used - as default location to save documents */ + * as default location to save documents */ const char *BLI_getDefaultDocumentFolder(void) { #ifndef WIN32 @@ -1196,8 +1196,8 @@ void BLI_setenv(const char *env, const char*val) /** - Only set an env var if already not there. - Like Unix setenv(env, val, 0); + * Only set an env var if already not there. + * Like Unix setenv(env, val, 0); */ void BLI_setenv_if_new(const char *env, const char* val) { @@ -1288,13 +1288,13 @@ void BLI_make_file_string(const char *relabase, char *string, const char *dir, /* we first push all slashes into unix mode, just to make sure we don't get - any mess with slashes later on. -jesterKing */ + * any mess with slashes later on. -jesterKing */ /* constant strings can be passed for those parameters - don't change them - elubie */ - /* +#if 0 BLI_char_switch(relabase, '\\', '/'); BLI_char_switch(dir, '\\', '/'); BLI_char_switch(file, '\\', '/'); - */ +#endif /* Resolve relative references */ if (relabase && dir[0] == '/' && dir[1] == '/') { @@ -1547,31 +1547,31 @@ char *BLI_path_basename(char *path) return filename ? filename + 1 : path; } -/* - Produce image export path. - - Fails returning 0 if image filename is empty or if destination path - matches image path (i.e. both are the same file). - - Trailing slash in dest_dir is optional. - - Logic: - - - if an image is "below" current .blend file directory, rebuild the - same dir structure in dest_dir - - For example //textures/foo/bar.png becomes - [dest_dir]/textures/foo/bar.png. - - - if an image is not "below" current .blend file directory, - disregard it's path and copy it in the same directory where 3D file - goes. - - For example //../foo/bar.png becomes [dest_dir]/bar.png. - - This logic will help ensure that all image paths are relative and - that a user gets his images in one place. It'll also provide - consistent behavior across exporters. +/** + * Produce image export path. + * + * Fails returning 0 if image filename is empty or if destination path + * matches image path (i.e. both are the same file). + * + * Trailing slash in dest_dir is optional. + * + * Logic: + * + * - if an image is "below" current .blend file directory, rebuild the + * same dir structure in dest_dir + * + * For example //textures/foo/bar.png becomes + * [dest_dir]/textures/foo/bar.png. + * + * - if an image is not "below" current .blend file directory, + * disregard it's path and copy it in the same directory where 3D file + * goes. + * + * For example //../foo/bar.png becomes [dest_dir]/bar.png. + * + * This logic will help ensure that all image paths are relative and + * that a user gets his images in one place. It'll also provide + * consistent behavior across exporters. */ int BKE_rebase_path(char *abs, size_t abs_len, char *rel, size_t rel_len, const char *base_dir, const char *src_dir, const char *dest_dir) { @@ -1740,18 +1740,18 @@ static int add_win32_extension(char *name) return (retval); } -/* -* Checks if name is a fully qualified filename to an executable. -* If not it searches $PATH for the file. On Windows it also -* adds the correct extension (.com .exe etc) from -* $PATHEXT if necessary. Also on Windows it translates -* the name to its 8.3 version to prevent problems with -* spaces and stuff. Final result is returned in fullname. -* -* \param fullname The full path and full name of the executable -* (must be FILE_MAX minimum) -* \param name The name of the executable (usually argv[0]) to be checked -*/ +/** + * Checks if name is a fully qualified filename to an executable. + * If not it searches $PATH for the file. On Windows it also + * adds the correct extension (.com .exe etc) from + * $PATHEXT if necessary. Also on Windows it translates + * the name to its 8.3 version to prevent problems with + * spaces and stuff. Final result is returned in fullname. + * + * \param fullname The full path and full name of the executable + * (must be FILE_MAX minimum) + * \param name The name of the executable (usually argv[0]) to be checked + */ static void bli_where_am_i(char *fullname, const size_t maxlen, const char *name) { char filename[FILE_MAX]; @@ -1849,15 +1849,15 @@ const char *BLI_program_dir(void) } /** -* Gets the temp directory when blender first runs. -* If the default path is not found, use try $TEMP -* -* Also make sure the temp dir has a trailing slash -* -* \param fullname The full path to the temp directory -* \param maxlen The size of the fullname buffer -* \param userdir Directory specified in user preferences -*/ + * Gets the temp directory when blender first runs. + * If the default path is not found, use try $TEMP + * + * Also make sure the temp dir has a trailing slash + * + * \param fullname The full path to the temp directory + * \param maxlen The size of the fullname buffer + * \param userdir Directory specified in user preferences + */ static void BLI_where_is_temp(char *fullname, const size_t maxlen, char *userdir) { fullname[0] = '\0'; diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c index 318cd15d2e9..9e785f30ec7 100644 --- a/source/blender/blenlib/intern/pbvh.c +++ b/source/blender/blenlib/intern/pbvh.c @@ -63,52 +63,52 @@ struct PBVHNode { BB orig_vb; /* For internal nodes, the offset of the children in the PBVH - 'nodes' array. */ + * 'nodes' array. */ int children_offset; /* Pointer into the PBVH prim_indices array and the number of - primitives used by this leaf node. - - Used for leaf nodes in both mesh- and multires-based PBVHs. - */ + * primitives used by this leaf node. + * + * Used for leaf nodes in both mesh- and multires-based PBVHs. + */ int *prim_indices; unsigned int totprim; /* Array of indices into the mesh's MVert array. Contains the - indices of all vertices used by faces that are within this - node's bounding box. - - Note that a vertex might be used by a multiple faces, and - these faces might be in different leaf nodes. Such a vertex - will appear in the vert_indices array of each of those leaf - nodes. - - In order to support cases where you want access to multiple - nodes' vertices without duplication, the vert_indices array - is ordered such that the first part of the array, up to - index 'uniq_verts', contains "unique" vertex indices. These - vertices might not be truly unique to this node, but if - they appear in another node's vert_indices array, they will - be above that node's 'uniq_verts' value. - - Used for leaf nodes in a mesh-based PBVH (not multires.) - */ + * indices of all vertices used by faces that are within this + * node's bounding box. + * + * Note that a vertex might be used by a multiple faces, and + * these faces might be in different leaf nodes. Such a vertex + * will appear in the vert_indices array of each of those leaf + * nodes. + * + * In order to support cases where you want access to multiple + * nodes' vertices without duplication, the vert_indices array + * is ordered such that the first part of the array, up to + * index 'uniq_verts', contains "unique" vertex indices. These + * vertices might not be truly unique to this node, but if + * they appear in another node's vert_indices array, they will + * be above that node's 'uniq_verts' value. + * + * Used for leaf nodes in a mesh-based PBVH (not multires.) + */ int *vert_indices; unsigned int uniq_verts, face_verts; /* An array mapping face corners into the vert_indices - array. The array is sized to match 'totprim', and each of - the face's corners gets an index into the vert_indices - array, in the same order as the corners in the original - MFace. The fourth value should not be used if the original - face is a triangle. - - Used for leaf nodes in a mesh-based PBVH (not multires.) - */ + * array. The array is sized to match 'totprim', and each of + * the face's corners gets an index into the vert_indices + * array, in the same order as the corners in the original + * MFace. The fourth value should not be used if the original + * face is a triangle. + * + * Used for leaf nodes in a mesh-based PBVH (not multires.) + */ int (*face_vert_indices)[4]; /* Indicates whether this node is a leaf or not; also used for - marking various updates that need to be applied. */ + * marking various updates that need to be applied. */ PBVHNodeFlags flag : 8; /* Used for raycasting: how close bb is to the ray point. */ @@ -140,7 +140,7 @@ struct PBVH { int gridsize; /* Only used during BVH build and update, - don't need to remain valid after */ + * don't need to remain valid after */ BLI_bitmap vert_bitmap; #ifdef PERFCNTRS @@ -311,7 +311,7 @@ static void grow_nodes(PBVH *bvh, int totnode) } /* Add a vertex to the map, with a positive value for unique vertices and - a negative value for additional vertices */ + * a negative value for additional vertices */ static int map_insert_vert(PBVH *bvh, GHash *map, unsigned int *face_verts, unsigned int *uniq_verts, int vertex) @@ -417,15 +417,15 @@ static void build_grids_leaf_node(PBVH *bvh, PBVHNode *node) } /* Recursively build a node in the tree - - vb is the voxel box around all of the primitives contained in - this node. - - cb is the bounding box around all the centroids of the primitives - contained in this node - - offset and start indicate a range in the array of primitive indices -*/ + * + * vb is the voxel box around all of the primitives contained in + * this node. + * + * cb is the bounding box around all the centroids of the primitives + * contained in this node + * + * offset and start indicate a range in the array of primitive indices + */ static void build_sub(PBVH *bvh, int node_index, BB *cb, BBC *prim_bbc, int offset, int count) @@ -689,7 +689,7 @@ static PBVHNode *pbvh_iter_next(PBVHIter *iter) int revisiting; /* purpose here is to traverse tree, visiting child nodes before their - parents, this order is necessary for e.g. computing bounding boxes */ + * parents, this order is necessary for e.g. computing bounding boxes */ while(iter->stacksize) { /* pop node */ @@ -925,18 +925,18 @@ static void pbvh_update_normals(PBVH *bvh, PBVHNode **nodes, return; /* could be per node to save some memory, but also means - we have to store for each vertex which node it is in */ + * we have to store for each vertex which node it is in */ vnor= MEM_callocN(sizeof(float)*3*bvh->totvert, "bvh temp vnors"); - /* subtle assumptions: - - We know that for all edited vertices, the nodes with faces - adjacent to these vertices have been marked with PBVH_UpdateNormals. - This is true because if the vertex is inside the brush radius, the - bounding box of it's adjacent faces will be as well. - - However this is only true for the vertices that have actually been - edited, not for all vertices in the nodes marked for update, so we - can only update vertices marked with ME_VERT_PBVH_UPDATE. - */ + /* subtle assumptions: + * - We know that for all edited vertices, the nodes with faces + * adjacent to these vertices have been marked with PBVH_UpdateNormals. + * This is true because if the vertex is inside the brush radius, the + * bounding box of it's adjacent faces will be as well. + * - However this is only true for the vertices that have actually been + * edited, not for all vertices in the nodes marked for update, so we + * can only update vertices marked with ME_VERT_PBVH_UPDATE. + */ #pragma omp parallel for private(n) schedule(static) for(n = 0; n < totnode; n++) { @@ -966,7 +966,7 @@ static void pbvh_update_normals(PBVH *bvh, PBVHNode **nodes, if(bvh->verts[v].flag & ME_VERT_PBVH_UPDATE) { /* this seems like it could be very slow but profile - does not show this, so just leave it for now? */ + * does not show this, so just leave it for now? */ #pragma omp atomic vnor[v][0] += fn[0]; #pragma omp atomic @@ -1454,10 +1454,10 @@ void BLI_pbvh_node_draw(PBVHNode *node, void *UNUSED(data)) } /* Adapted from: - http://www.gamedev.net/community/forums/topic.asp?topic_id=512123 - Returns true if the AABB is at least partially within the frustum - (ok, not a real frustum), false otherwise. -*/ + * http://www.gamedev.net/community/forums/topic.asp?topic_id=512123 + * Returns true if the AABB is at least partially within the frustum + * (ok, not a real frustum), false otherwise. + */ int BLI_pbvh_node_planes_contain_AABB(PBVHNode *node, void *data) { float (*planes)[4] = data; diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index b828ae052f8..7061a0fcf08 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -139,9 +139,9 @@ struct mem_elements { /* simple optimization for allocating thousands of small memory blocks - only to be used within loops, and not by one function at a time - free in the end, with argument '-1' -*/ + * only to be used within loops, and not by one function at a time + * free in the end, with argument '-1' + */ #define MEM_ELEM_BLOCKSIZE 16384 static struct mem_elements * melem__cur= NULL; static int melem__offs= 0; /* the current free address */ @@ -423,7 +423,7 @@ static short boundinsideEV(ScanFillEdge *eed, ScanFillVert *eve) static void testvertexnearedge(void) { /* only vertices with ->h==1 are being tested for - being close to an edge, if true insert */ + * being close to an edge, if true insert */ ScanFillVert *eve; ScanFillEdge *eed,*ed1; @@ -528,7 +528,8 @@ static int scanfill(PolyFill *pf) nr= pf->nr; - /* PRINTS + /* PRINTS */ +#if 0 verts= pf->verts; eve= fillvertbase.first; while(eve) { @@ -539,7 +540,8 @@ static int scanfill(PolyFill *pf) while(eed) { printf("edge: %x verts: %x %x\n",eed,eed->v1,eed->v2); eed= eed->next; - } */ + } +#endif /* STEP 0: remove zero sized edges */ eed= filledgebase.first; @@ -567,8 +569,8 @@ static int scanfill(PolyFill *pf) } /* STEP 1: make using FillVert and FillEdge lists a sorted - ScanFillVertLink list - */ + * ScanFillVertLink list + */ sc= scdata= (ScanFillVertLink *)MEM_callocN(pf->verts*sizeof(ScanFillVertLink),"Scanfill1"); eve= fillvertbase.first; verts= 0; @@ -591,10 +593,10 @@ static int scanfill(PolyFill *pf) nexted= eed->next; BLI_remlink(&filledgebase,eed); /* This code is for handling zero-length edges that get - collapsed in step 0. It was removed for some time to - fix trunk bug #4544, so if that comes back, this code - may need some work, or there will have to be a better - fix to #4544. */ + * collapsed in step 0. It was removed for some time to + * fix trunk bug #4544, so if that comes back, this code + * may need some work, or there will have to be a better + * fix to #4544. */ if(eed->v1->f==255) { v1= eed->v1; while((eed->v1->f == 255) && (eed->v1->tmp.v != v1)) @@ -609,7 +611,7 @@ static int scanfill(PolyFill *pf) eed= nexted; } - /* +#if 0 sc= scdata; for(a=0;av1); @@ -619,7 +621,8 @@ static int scanfill(PolyFill *pf) eed= eed->next; } sc++; - }*/ + } +#endif /* STEP 2: FILL LOOP */ @@ -788,13 +791,13 @@ int BLI_begin_edgefill(void) int BLI_edgefill(short mat_nr) { /* - - fill works with its own lists, so create that first (no faces!) - - for vertices, put in ->tmp.v the old pointer - - struct elements xs en ys are not used here: don't hide stuff in it - - edge flag ->f becomes 2 when it's a new edge - - mode: & 1 is check for crossings, then create edges (TO DO ) - - returns number of triangle faces added. - */ + * - fill works with its own lists, so create that first (no faces!) + * - for vertices, put in ->tmp.v the old pointer + * - struct elements xs en ys are not used here: don't hide stuff in it + * - edge flag ->f becomes 2 when it's a new edge + * - mode: & 1 is check for crossings, then create edges (TO DO ) + * - returns number of triangle faces added. + */ ListBase tempve, temped; ScanFillVert *eve; ScanFillEdge *eed,*nexted; @@ -990,14 +993,14 @@ int BLI_edgefill(short mat_nr) /* CURRENT STATUS: - - eve->f :1= availalble in edges - - eve->xs :polynumber - - eve->h :amount of edges connected to vertex - - eve->tmp.v :store! original vertex number - - - eed->f :1= boundary edge (optionally set by caller) - - eed->f1 :poly number - */ + * - eve->f :1= availalble in edges + * - eve->xs :polynumber + * - eve->h :amount of edges connected to vertex + * - eve->tmp.v :store! original vertex number + * + * - eed->f :1= boundary edge (optionally set by caller) + * - eed->poly_nr :poly number + */ /* STEP 3: MAKE POLYFILL STRUCT */ @@ -1040,13 +1043,15 @@ int BLI_edgefill(short mat_nr) /* so, sort first */ qsort(pflist, poly, sizeof(PolyFill), vergpoly); - - /*pf= pflist; + +#if 0 + pf= pflist; for(a=1;a<=poly;a++) { printf("poly:%d edges:%d verts:%d flag: %d\n",a,pf->edges,pf->verts,pf->f); PRINT2(f, f, pf->min[0], pf->min[1]); pf++; - }*/ + } +#endif polycache= pc= MEM_callocN(sizeof(short)*poly, "polycache"); pf= pflist; @@ -1071,13 +1076,15 @@ int BLI_edgefill(short mat_nr) } MEM_freeN(polycache); } - - /* printf("after merge\n"); + +#if 0 + printf("after merge\n"); pf= pflist; for(a=1;a<=poly;a++) { printf("poly:%d edges:%d verts:%d flag: %d\n",a,pf->edges,pf->verts,pf->f); pf++; - } */ + } +#endif /* STEP 5: MAKE TRIANGLES */ diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 7c48d000d39..29f11ee0550 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -444,9 +444,9 @@ int BLI_exists(const char *name) { #if defined(WIN32) && !defined(__MINGW32__) struct _stat64i32 st; - /* in Windows stat doesn't recognize dir ending on a slash - To not break code where the ending slash is expected we - don't mess with the argument name directly here - elubie */ + /* in Windows stat doesn't recognize dir ending on a slash + * To not break code where the ending slash is expected we + * don't mess with the argument name directly here - elubie */ char tmp[FILE_MAX]; int len, res; BLI_strncpy(tmp, name, FILE_MAX); diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c index e2c86d70872..80f1606414c 100644 --- a/source/blender/blenlib/intern/string.c +++ b/source/blender/blenlib/intern/string.c @@ -326,11 +326,11 @@ int BLI_strncasecmp(const char *s1, const char *s2, size_t len) int BLI_natstrcmp(const char *s1, const char *s2) { int d1= 0, d2= 0; - + /* if both chars are numeric, to a strtol(). - then increase string deltas as long they are - numeric, else do a tolower and char compare */ - + * then increase string deltas as long they are + * numeric, else do a tolower and char compare */ + while(1) { char c1 = tolower(s1[d1]); char c2 = tolower(s2[d2]); diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c index c958648836b..c60df413161 100644 --- a/source/blender/blenlib/intern/string_utf8.c +++ b/source/blender/blenlib/intern/string_utf8.c @@ -27,8 +27,8 @@ */ /** \file blender/blenlib/intern/string_utf8.c - * \ingroup bli - */ + * \ingroup bli + */ #include #include @@ -41,9 +41,9 @@ * http://svn.swish-e.org/libswish3/trunk/src/libswish3/utf8.c r3044 - campbell */ /* based on the valid_utf8 routine from the PCRE library by Philip Hazel - - length is in bytes, since without knowing whether the string is valid - it's hard to know how many characters there are! */ + * + * length is in bytes, since without knowing whether the string is valid + * it's hard to know how many characters there are! */ static const char trailingBytesForUTF8[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -101,7 +101,7 @@ int BLI_utf8_invalid_byte(const char *str, int length) break; /* Check for leading 0xfe or 0xff, - and then for 1111 1100, xx00 00xx */ + * and then for 1111 1100, xx00 00xx */ case 5: if (c == 0xfe || c == 0xff || (c == 0xfc && (*p & 0x3c) == 0)) goto utf8_error; diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c index e92b445c27f..6048ca8cfc3 100644 --- a/source/blender/blenlib/intern/threads.c +++ b/source/blender/blenlib/intern/threads.c @@ -63,48 +63,48 @@ static void *thread_tls_data; #endif /* ********** basic thread control API ************ - -Many thread cases have an X amount of jobs, and only an Y amount of -threads are useful (typically amount of cpus) - -This code can be used to start a maximum amount of 'thread slots', which -then can be filled in a loop with an idle timer. - -A sample loop can look like this (pseudo c); - - ListBase lb; - int maxthreads= 2; - int cont= 1; - - BLI_init_threads(&lb, do_something_func, maxthreads); - - while(cont) { - if(BLI_available_threads(&lb) && !(escape loop event)) { - // get new job (data pointer) - // tag job 'processed - BLI_insert_thread(&lb, job); - } - else PIL_sleep_ms(50); - - // find if a job is ready, this the do_something_func() should write in job somewhere - cont= 0; - for(go over all jobs) - if(job is ready) { - if(job was not removed) { - BLI_remove_thread(&lb, job); - } - } - else cont= 1; - } - // conditions to exit loop - if(if escape loop event) { - if(BLI_available_threadslots(&lb)==maxthreads) - break; - } - } - - BLI_end_threads(&lb); - + * + * Many thread cases have an X amount of jobs, and only an Y amount of + * threads are useful (typically amount of cpus) + * + * This code can be used to start a maximum amount of 'thread slots', which + * then can be filled in a loop with an idle timer. + * + * A sample loop can look like this (pseudo c); + * + * ListBase lb; + * int maxthreads= 2; + * int cont= 1; + * + * BLI_init_threads(&lb, do_something_func, maxthreads); + * + * while(cont) { + * if(BLI_available_threads(&lb) && !(escape loop event)) { + * // get new job (data pointer) + * // tag job 'processed + * BLI_insert_thread(&lb, job); + * } + * else PIL_sleep_ms(50); + * + * // find if a job is ready, this the do_something_func() should write in job somewhere + * cont= 0; + * for(go over all jobs) + * if(job is ready) { + * if(job was not removed) { + * BLI_remove_thread(&lb, job); + * } + * } + * else cont= 1; + * } + * // conditions to exit loop + * if(if escape loop event) { + * if(BLI_available_threadslots(&lb)==maxthreads) + * break; + * } + * } + * + * BLI_end_threads(&lb); + * ************************************************ */ static pthread_mutex_t _malloc_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t _image_lock = PTHREAD_MUTEX_INITIALIZER; @@ -146,8 +146,8 @@ void BLI_threadapi_init(void) } /* tot = 0 only initializes malloc mutex in a safe way (see sequence.c) - problem otherwise: scene render will kill of the mutex! -*/ + * problem otherwise: scene render will kill of the mutex! + */ void BLI_init_threads(ListBase *threadbase, void *(*do_thread)(void *), int tot) { @@ -172,8 +172,8 @@ void BLI_init_threads(ListBase *threadbase, void *(*do_thread)(void *), int tot) #if defined(__APPLE__) && (PARALLEL == 1) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 2) /* workaround for Apple gcc 4.2.1 omp vs background thread bug, - we copy gomp thread local storage pointer to setting it again - inside the thread that we start */ + * we copy gomp thread local storage pointer to setting it again + * inside the thread that we start */ thread_tls_data = pthread_getspecific(gomp_tls_key); #endif } @@ -213,7 +213,7 @@ static void *tslot_thread_start(void *tslot_p) #if defined(__APPLE__) && (PARALLEL == 1) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 2) /* workaround for Apple gcc 4.2.1 omp vs background thread bug, - set gomp thread local storage pointer which was copied beforehand */ + * set gomp thread local storage pointer which was copied beforehand */ pthread_setspecific (gomp_tls_key, thread_tls_data); #endif diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index b2002b63a22..d61f4a8880e 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -227,8 +227,8 @@ void get_default_root(char* root) char str[MAX_PATH+1]; /* the default drive to resolve a directory without a specified drive - should be the Windows installation drive, since this was what the OS - assumes. */ + * should be the Windows installation drive, since this was what the OS + * assumes. */ if (GetWindowsDirectory(str,MAX_PATH+1)) { root[0] = str[0]; root[1] = ':'; @@ -236,7 +236,7 @@ void get_default_root(char* root) root[3] = '\0'; } else { /* if GetWindowsDirectory fails, something has probably gone wrong, - we are trying the blender install dir though */ + * we are trying the blender install dir though */ if (GetModuleFileName(NULL,str,MAX_PATH+1)) { printf("Error! Could not get the Windows Directory - Defaulting to Blender installation Dir!"); root[0] = str[0]; diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c index eeffdc86a16..dd5edcae583 100644 --- a/source/blender/bmesh/intern/bmesh_core.c +++ b/source/blender/bmesh/intern/bmesh_core.c @@ -377,8 +377,8 @@ int bmesh_elem_check(BMesh *UNUSED(bm), void *element, const char htype) if (l->f->len <= 0) err |= (1 << 13); - /* validate boundary loop--invalid for hole loops, of course, - * but we won't be allowing those for a while ye */ + /* validate boundary loop -- invalid for hole loops, of course, + * but we won't be allowing those for a while yet */ l2 = l; i = 0; do { diff --git a/source/blender/bmesh/intern/bmesh_iterators.h b/source/blender/bmesh/intern/bmesh_iterators.h index 24653fc0b73..7b13d2de723 100644 --- a/source/blender/bmesh/intern/bmesh_iterators.h +++ b/source/blender/bmesh/intern/bmesh_iterators.h @@ -37,7 +37,7 @@ * the iterators provided in this file instead * of inspecting the structure directly. * -*/ + */ #include "BLI_mempool.h" diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index 15a5a7d71b0..67bdec16a05 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -825,14 +825,17 @@ void BM_face_triangulate(BMesh *bm, BMFace *f, float (*projectverts)[3], if (newfaces) newfaces[nf_i++] = f; - /* l = f->loopbase; +#if 0 + l = f->loopbase; do { if (l->v == v) { f->loopbase = l; break; } l = l->next; - } while (l != f->loopbase); */ + } while (l != f->loopbase); +#endif + } } diff --git a/source/blender/bmesh/intern/bmesh_walkers.h b/source/blender/bmesh/intern/bmesh_walkers.h index 4c8830e61e3..9ea9e332c5f 100644 --- a/source/blender/bmesh/intern/bmesh_walkers.h +++ b/source/blender/bmesh/intern/bmesh_walkers.h @@ -30,8 +30,8 @@ #include "BLI_ghash.h" /* - NOTE: do NOT modify topology while walking a mesh! -*/ + * NOTE: do NOT modify topology while walking a mesh! + */ typedef enum { BMW_DEPTH_FIRST, @@ -85,19 +85,19 @@ void *BMW_walk(BMWalker *walker); void BMW_reset(BMWalker *walker); /* -example of usage, walking over an island of tool flagged faces: - -BMWalker walker; -BMFace *f; - -BMW_init(&walker, bm, BMW_ISLAND, SOME_OP_FLAG); -f = BMW_begin(&walker, some_start_face); -for (; f; f = BMW_step(&walker)) -{ - //do something with f -} -BMW_end(&walker); -*/ + * example of usage, walking over an island of tool flagged faces: + * + * BMWalker walker; + * BMFace *f; + * + * BMW_init(&walker, bm, BMW_ISLAND, SOME_OP_FLAG); + * f = BMW_begin(&walker, some_start_face); + * for (; f; f = BMW_step(&walker)) + * { + * //do something with f + * } + * BMW_end(&walker); + */ enum { /* walk over connected geometry. can restrict to a search flag, diff --git a/source/blender/bmesh/operators/bmo_triangulate.c b/source/blender/bmesh/operators/bmo_triangulate.c index 42251959c8f..527ffd9a080 100644 --- a/source/blender/bmesh/operators/bmo_triangulate.c +++ b/source/blender/bmesh/operators/bmo_triangulate.c @@ -118,8 +118,8 @@ void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op) if (is_quad_convex_v3(v1->co, v2->co, v3->co, v4->co)) { float len1, len2, len3, len4, len5, len6, opp1, opp2, fac1, fac2; /* testing rule: - * the area divided by the total edge lengths - */ + * the area divided by the total edge lengths + */ len1 = len_v3v3(v1->co, v2->co); len2 = len_v3v3(v2->co, v3->co); len3 = len_v3v3(v3->co, v4->co); diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c index 0486c21b847..8e75d7880ee 100644 --- a/source/blender/bmesh/operators/bmo_utils.c +++ b/source/blender/bmesh/operators/bmo_utils.c @@ -551,12 +551,12 @@ void bmo_similarfaces_exec(BMesh *bm, BMOperator *op) num_total = BM_mesh_elem_count(bm, BM_FACE); /* - ** The first thing to do is to iterate through all the the selected items and mark them since - ** they will be in the selection anyway. - ** This will increase performance, (especially when the number of originaly selected faces is high) - ** so the overall complexity will be less than $O(mn)$ where is the total number of selected faces, - ** and n is the total number of faces - */ + * The first thing to do is to iterate through all the the selected items and mark them since + * they will be in the selection anyway. + * This will increase performance, (especially when the number of originaly selected faces is high) + * so the overall complexity will be less than $O(mn)$ where is the total number of selected faces, + * and n is the total number of faces + */ BMO_ITER(fs, &fs_iter, bm, op, "faces", BM_FACE) { if (!BMO_elem_flag_test(bm, fs, FACE_MARK)) { /* is this really needed ? */ BMO_elem_flag_enable(bm, fs, FACE_MARK); @@ -579,9 +579,9 @@ void bmo_similarfaces_exec(BMesh *bm, BMOperator *op) } /* - ** Save us some computation burden: In case of perimeter/area/coplanar selection we compute - ** only once. - */ + * Save us some computation burden: In case of perimeter/area/coplanar selection we compute + * only once. + */ if (type == SIMFACE_PERIMETER || type == SIMFACE_AREA || type == SIMFACE_COPLANAR || type == SIMFACE_IMAGE) { for (i = 0; i < num_total; i++) { switch (type) { @@ -682,9 +682,9 @@ void bmo_similarfaces_exec(BMesh *bm, BMOperator *op) BMO_slot_buffer_from_flag(bm, op, "faceout", FACE_MARK, BM_FACE); } -/****************************************************************************** -** Similar Edges -**************************************************************************** */ +/**************************************************************************** * + * Similar Edges + **************************************************************************** */ #define EDGE_MARK 1 /* @@ -879,9 +879,9 @@ void bmo_similaredges_exec(BMesh *bm, BMOperator *op) BMO_slot_buffer_from_flag(bm, op, "edgeout", EDGE_MARK, BM_EDGE); } -/****************************************************************************** -** Similar Vertices -**************************************************************************** */ +/**************************************************************************** * + * Similar Vertices + **************************************************************************** */ #define VERT_MARK 1 typedef struct SimSel_VertExt { @@ -995,9 +995,9 @@ void bmo_similarverts_exec(BMesh *bm, BMOperator *op) BMO_slot_buffer_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT); } -/****************************************************************************** -** Cycle UVs for a face -**************************************************************************** */ +/**************************************************************************** * + * Cycle UVs for a face + **************************************************************************** */ void bmo_face_rotateuvs_exec(BMesh *bm, BMOperator *op) { @@ -1062,9 +1062,9 @@ void bmo_face_rotateuvs_exec(BMesh *bm, BMOperator *op) } -/****************************************************************************** -** Reverse UVs for a face -**************************************************************************** */ +/**************************************************************************** * + * Reverse UVs for a face + **************************************************************************** */ void bmo_face_reverseuvs_exec(BMesh *bm, BMOperator *op) { @@ -1105,9 +1105,9 @@ void bmo_face_reverseuvs_exec(BMesh *bm, BMOperator *op) BLI_array_free(uvs); } -/****************************************************************************** -** Cycle colors for a face -**************************************************************************** */ +/**************************************************************************** * + * Cycle colors for a face + **************************************************************************** */ void bmo_rotatecolors_exec(BMesh *bm, BMOperator *op) { @@ -1171,9 +1171,9 @@ void bmo_rotatecolors_exec(BMesh *bm, BMOperator *op) } } -/****************************************************************************** -** Reverse colors for a face -**************************************************************************** */ +/*************************************************************************** * + * Reverse colors for a face + *************************************************************************** */ void bmo_face_reversecolors_exec(BMesh *bm, BMOperator *op) { @@ -1213,9 +1213,9 @@ void bmo_face_reversecolors_exec(BMesh *bm, BMOperator *op) } -/****************************************************************************** -** shortest vertex path select -**************************************************************************** */ +/*************************************************************************** * + * shortest vertex path select + *************************************************************************** */ typedef struct ElemNode { BMVert *v; /* vertex */ @@ -1262,8 +1262,8 @@ void bmo_vertexshortestpath_exec(BMesh *bm, BMOperator *op) bm->elem_index_dirty &= ~BM_VERT; /* - ** we now have everything we need, start Dijkstra path finding algorithm - */ + * we now have everything we need, start Dijkstra path finding algorithm + */ /* set the distance/weight of the start vertex to 0 */ vert_list[BM_elem_index_get(sv)].weight = 0.0f; -- cgit v1.2.3