Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-05-13 00:39:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-13 00:39:39 +0400
commit9892736206676c5b7fabc8d1184f9655511ff2dd (patch)
tree83562ac50c93fe3004959d35c1af4a5b380fdd97 /source/blender/blenkernel
parentcffaa42d3a34c6b310c3c87c98e1f8313881e473 (diff)
code cleanup: header cleanup and remove some duplicate defines.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_DerivedMesh.h164
-rw-r--r--source/blender/blenkernel/BKE_action.h34
-rw-r--r--source/blender/blenkernel/BKE_armature.h36
-rw-r--r--source/blender/blenkernel/BKE_blender.h22
-rw-r--r--source/blender/blenkernel/BKE_bmesh.h40
-rw-r--r--source/blender/blenkernel/BKE_bmfont.h10
-rw-r--r--source/blender/blenkernel/BKE_booleanops_mesh.h47
-rw-r--r--source/blender/blenkernel/BKE_brush.h18
-rw-r--r--source/blender/blenkernel/BKE_bullet.h2
-rw-r--r--source/blender/blenkernel/BKE_bvhutils.h23
-rw-r--r--source/blender/blenkernel/BKE_camera.h7
-rw-r--r--source/blender/blenkernel/BKE_ccg.h10
-rw-r--r--source/blender/blenkernel/BKE_cdderivedmesh.h8
-rw-r--r--source/blender/blenkernel/BKE_collision.h19
-rw-r--r--source/blender/blenkernel/BKE_colortools.h56
-rw-r--r--source/blender/blenkernel/BKE_constraint.h38
-rw-r--r--source/blender/blenkernel/BKE_context.h4
-rw-r--r--source/blender/blenkernel/BKE_curve.h12
-rw-r--r--source/blender/blenkernel/BKE_customdata.h52
-rw-r--r--source/blender/blenkernel/BKE_customdata_file.h6
-rw-r--r--source/blender/blenkernel/BKE_deform.h18
-rw-r--r--source/blender/blenkernel/BKE_depsgraph.h114
-rw-r--r--source/blender/blenkernel/BKE_displist.h12
-rw-r--r--source/blender/blenkernel/BKE_dynamicpaint.h4
-rw-r--r--source/blender/blenkernel/BKE_effect.h22
-rw-r--r--source/blender/blenkernel/BKE_fcurve.h60
-rw-r--r--source/blender/blenkernel/BKE_fluidsim.h6
-rw-r--r--source/blender/blenkernel/BKE_global.h70
-rw-r--r--source/blender/blenkernel/BKE_group.h18
-rw-r--r--source/blender/blenkernel/BKE_icons.h19
-rw-r--r--source/blender/blenkernel/BKE_idprop.h14
-rw-r--r--source/blender/blenkernel/BKE_image.h86
-rw-r--r--source/blender/blenkernel/BKE_key.h2
-rw-r--r--source/blender/blenkernel/BKE_lattice.h2
-rw-r--r--source/blender/blenkernel/BKE_library.h4
-rw-r--r--source/blender/blenkernel/BKE_main.h4
-rw-r--r--source/blender/blenkernel/BKE_material.h3
-rw-r--r--source/blender/blenkernel/BKE_mesh.h20
-rw-r--r--source/blender/blenkernel/BKE_modifier.h101
-rw-r--r--source/blender/blenkernel/BKE_movieclip.h12
-rw-r--r--source/blender/blenkernel/BKE_navmesh_conversion.h48
-rw-r--r--source/blender/blenkernel/BKE_nla.h10
-rw-r--r--source/blender/blenkernel/BKE_object.h26
-rw-r--r--source/blender/blenkernel/BKE_ocean.h18
-rw-r--r--source/blender/blenkernel/BKE_packedFile.h4
-rw-r--r--source/blender/blenkernel/BKE_particle.h61
-rw-r--r--source/blender/blenkernel/BKE_plugin_types.h10
-rw-r--r--source/blender/blenkernel/BKE_pointcache.h84
-rw-r--r--source/blender/blenkernel/BKE_report.h4
-rw-r--r--source/blender/blenkernel/BKE_scene.h12
-rw-r--r--source/blender/blenkernel/BKE_screen.h108
-rw-r--r--source/blender/blenkernel/BKE_script.h2
-rw-r--r--source/blender/blenkernel/BKE_sequencer.h94
-rw-r--r--source/blender/blenkernel/BKE_shrinkwrap.h32
-rw-r--r--source/blender/blenkernel/BKE_sketch.h62
-rw-r--r--source/blender/blenkernel/BKE_smoke.h4
-rw-r--r--source/blender/blenkernel/BKE_softbody.h12
-rw-r--r--source/blender/blenkernel/BKE_subsurf.h10
-rw-r--r--source/blender/blenkernel/BKE_texture.h4
-rw-r--r--source/blender/blenkernel/BKE_unit.h34
-rw-r--r--source/blender/blenkernel/BKE_utildefines.h42
-rw-r--r--source/blender/blenkernel/BKE_writeffmpeg.h32
-rw-r--r--source/blender/blenkernel/depsgraph_private.h58
-rw-r--r--source/blender/blenkernel/nla_private.h22
64 files changed, 970 insertions, 1022 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h
index 595a1e884d7..c7ddab47952 100644
--- a/source/blender/blenkernel/BKE_DerivedMesh.h
+++ b/source/blender/blenkernel/BKE_DerivedMesh.h
@@ -191,11 +191,11 @@ struct DerivedMesh {
* and freed on the next ->release(). consider using getVert/Edge/Face if
* you are only interested in a few verts/edges/faces.
*/
- struct MVert *(*getVertArray)(DerivedMesh *dm);
- struct MEdge *(*getEdgeArray)(DerivedMesh *dm);
- struct MFace *(*getTessFaceArray)(DerivedMesh *dm);
- struct MLoop *(*getLoopArray)(DerivedMesh *dm);
- struct MPoly *(*getPolyArray)(DerivedMesh *dm);
+ struct MVert *(*getVertArray)(DerivedMesh * dm);
+ struct MEdge *(*getEdgeArray)(DerivedMesh * dm);
+ struct MFace *(*getTessFaceArray)(DerivedMesh * dm);
+ struct MLoop *(*getLoopArray)(DerivedMesh * dm);
+ struct MPoly *(*getPolyArray)(DerivedMesh * dm);
/* copy all verts/edges/faces from the derived mesh into
* *{vert/edge/face}_r (must point to a buffer large enough)
@@ -209,35 +209,35 @@ struct DerivedMesh {
/* return a copy of all verts/edges/faces from the derived mesh
* it is the caller's responsibility to free the returned pointer
*/
- struct MVert *(*dupVertArray)(DerivedMesh *dm);
- struct MEdge *(*dupEdgeArray)(DerivedMesh *dm);
- struct MFace *(*dupTessFaceArray)(DerivedMesh *dm);
- struct MLoop *(*dupLoopArray)(DerivedMesh *dm);
- struct MPoly *(*dupPolyArray)(DerivedMesh *dm);
+ struct MVert *(*dupVertArray)(DerivedMesh * dm);
+ struct MEdge *(*dupEdgeArray)(DerivedMesh * dm);
+ struct MFace *(*dupTessFaceArray)(DerivedMesh * dm);
+ struct MLoop *(*dupLoopArray)(DerivedMesh * dm);
+ struct MPoly *(*dupPolyArray)(DerivedMesh * dm);
/* return a pointer to a single element of vert/edge/face custom data
* from the derived mesh (this gives a pointer to the actual data, not
* a copy)
*/
- void *(*getVertData)(DerivedMesh *dm, int index, int type);
- void *(*getEdgeData)(DerivedMesh *dm, int index, int type);
- void *(*getTessFaceData)(DerivedMesh *dm, int index, int type);
+ void *(*getVertData)(DerivedMesh * dm, int index, int type);
+ void *(*getEdgeData)(DerivedMesh * dm, int index, int type);
+ void *(*getTessFaceData)(DerivedMesh * dm, int index, int type);
/* return a pointer to the entire array of vert/edge/face custom data
* from the derived mesh (this gives a pointer to the actual data, not
* a copy)
*/
- void *(*getVertDataArray)(DerivedMesh *dm, int type);
- void *(*getEdgeDataArray)(DerivedMesh *dm, int type);
- void *(*getTessFaceDataArray)(DerivedMesh *dm, int type);
+ void *(*getVertDataArray)(DerivedMesh * dm, int type);
+ void *(*getEdgeDataArray)(DerivedMesh * dm, int type);
+ void *(*getTessFaceDataArray)(DerivedMesh * dm, int type);
/* retrieves the base CustomData structures for
* verts/edges/tessfaces/loops/facdes*/
- CustomData *(*getVertDataLayout)(DerivedMesh *dm);
- CustomData *(*getEdgeDataLayout)(DerivedMesh *dm);
- CustomData *(*getTessFaceDataLayout)(DerivedMesh *dm);
- CustomData *(*getLoopDataLayout)(DerivedMesh *dm);
- CustomData *(*getPolyDataLayout)(DerivedMesh *dm);
+ CustomData *(*getVertDataLayout)(DerivedMesh * dm);
+ CustomData *(*getEdgeDataLayout)(DerivedMesh * dm);
+ CustomData *(*getTessFaceDataLayout)(DerivedMesh * dm);
+ CustomData *(*getLoopDataLayout)(DerivedMesh * dm);
+ CustomData *(*getPolyDataLayout)(DerivedMesh * dm);
/*copies all customdata for an element source into dst at index dest*/
void (*copyFromVertCData)(DerivedMesh *dm, int source, CustomData *dst, int dest);
@@ -247,12 +247,12 @@ struct DerivedMesh {
/* optional grid access for subsurf */
int (*getNumGrids)(DerivedMesh *dm);
int (*getGridSize)(DerivedMesh *dm);
- struct CCGElem **(*getGridData)(DerivedMesh *dm);
- DMGridAdjacency *(*getGridAdjacency)(DerivedMesh *dm);
- int *(*getGridOffset)(DerivedMesh *dm);
+ struct CCGElem **(*getGridData)(DerivedMesh * dm);
+ DMGridAdjacency *(*getGridAdjacency)(DerivedMesh * dm);
+ int *(*getGridOffset)(DerivedMesh * dm);
void (*getGridKey)(DerivedMesh *dm, struct CCGKey *key);
- DMFlagMat *(*getGridFlagMats)(DerivedMesh *dm);
- unsigned int **(*getGridHidden)(DerivedMesh *dm);
+ DMFlagMat *(*getGridFlagMats)(DerivedMesh * dm);
+ unsigned int **(*getGridHidden)(DerivedMesh * dm);
/* Iterate over each mapped vertex in the derived mesh, calling the
@@ -335,15 +335,15 @@ struct DerivedMesh {
* Also called for *final* editmode DerivedMeshes
*/
void (*drawFacesSolid)(DerivedMesh *dm, float (*partial_redraw_planes)[4],
- int fast, DMSetMaterial setMaterial);
+ int fast, DMSetMaterial setMaterial);
/* Draw all faces using MTFace
* o Drawing options too complicated to enumerate, look at code.
*/
void (*drawFacesTex)(DerivedMesh *dm,
DMSetDrawOptionsTex setDrawOptions,
- DMCompareDrawOptions compareDrawOptions,
- void *userData);
+ DMCompareDrawOptions compareDrawOptions,
+ void *userData);
/* Draw all faces with GLSL materials
* o setMaterial is called for every different material nr
@@ -365,19 +365,19 @@ struct DerivedMesh {
* smooth shaded.
*/
void (*drawMappedFaces)(DerivedMesh *dm,
- DMSetDrawOptions setDrawOptions,
- DMSetMaterial setMaterial,
- DMCompareDrawOptions compareDrawOptions,
- void *userData,
- DMDrawFlag flag);
+ DMSetDrawOptions setDrawOptions,
+ DMSetMaterial setMaterial,
+ DMCompareDrawOptions compareDrawOptions,
+ void *userData,
+ DMDrawFlag flag);
/* Draw mapped faces using MTFace
* o Drawing options too complicated to enumerate, look at code.
*/
void (*drawMappedFacesTex)(DerivedMesh *dm,
- DMSetDrawOptions setDrawOptions,
- DMCompareDrawOptions compareDrawOptions,
- void *userData);
+ DMSetDrawOptions setDrawOptions,
+ DMCompareDrawOptions compareDrawOptions,
+ void *userData);
/* Draw mapped faces with GLSL materials
* o setMaterial is called for every different material nr
@@ -385,17 +385,17 @@ struct DerivedMesh {
* o Only if setMaterial and setDrawOptions return true
*/
void (*drawMappedFacesGLSL)(DerivedMesh *dm,
- DMSetMaterial setMaterial,
- DMSetDrawOptions setDrawOptions,
- void *userData);
+ DMSetMaterial setMaterial,
+ DMSetDrawOptions setDrawOptions,
+ void *userData);
/* Draw mapped edges as lines
* o Only if !setDrawOptions or setDrawOptions(userData, mapped-edge)
* returns true
*/
void (*drawMappedEdges)(DerivedMesh *dm,
- DMSetDrawOptions setDrawOptions,
- void *userData);
+ DMSetDrawOptions setDrawOptions,
+ void *userData);
/* Draw mapped edges as lines with interpolation values
* o Only if !setDrawOptions or
@@ -405,17 +405,17 @@ struct DerivedMesh {
* NOTE: This routine is optional!
*/
void (*drawMappedEdgesInterp)(DerivedMesh *dm,
- DMSetDrawOptions setDrawOptions,
- DMSetDrawInterpOptions setDrawInterpOptions,
- void *userData);
+ DMSetDrawOptions setDrawOptions,
+ DMSetDrawInterpOptions setDrawInterpOptions,
+ void *userData);
/* Draw all faces with materials
* o setMaterial is called for every different material nr
* o setFace is called to verify if a face must be hidden
*/
void (*drawMappedFacesMat)(DerivedMesh *dm,
- void (*setMaterial)(void *userData, int, void *attribs),
- int (*setFace)(void *userData, int index), void *userData);
+ void (*setMaterial)(void *userData, int, void *attribs),
+ int (*setFace)(void *userData, int index), void *userData);
/* Release reference to the DerivedMesh. This function decides internally
* if the DerivedMesh will be freed, or cached for later use. */
@@ -438,9 +438,9 @@ void DM_init(DerivedMesh *dm, DerivedMeshType type, int numVerts, int numEdges,
* of vertices, edges and faces, with a layer setup copied from source
*/
void DM_from_template(DerivedMesh *dm, DerivedMesh *source,
- DerivedMeshType type,
- int numVerts, int numEdges, int numFaces,
- int numLoops, int numPolys);
+ DerivedMeshType type,
+ int numVerts, int numEdges, int numFaces,
+ int numLoops, int numPolys);
/* utility function to release a DerivedMesh's layers
* returns 1 if DerivedMesh has to be released by the backend, 0 otherwise
@@ -518,15 +518,15 @@ void DM_set_tessface_data(struct DerivedMesh *dm, int index, int type, void *dat
* these copy all layers for which the CD_FLAG_NOCOPY flag is not set
*/
void DM_copy_vert_data(struct DerivedMesh *source, struct DerivedMesh *dest,
- int source_index, int dest_index, int count);
+ int source_index, int dest_index, int count);
void DM_copy_edge_data(struct DerivedMesh *source, struct DerivedMesh *dest,
- int source_index, int dest_index, int count);
-void DM_copy_tessface_data(struct DerivedMesh *source, struct DerivedMesh *dest,
int source_index, int dest_index, int count);
+void DM_copy_tessface_data(struct DerivedMesh *source, struct DerivedMesh *dest,
+ int source_index, int dest_index, int count);
void DM_copy_loop_data(struct DerivedMesh *source, struct DerivedMesh *dest,
int source_index, int dest_index, int count);
void DM_copy_poly_data(struct DerivedMesh *source, struct DerivedMesh *dest,
- int source_index, int dest_index, int count);
+ int source_index, int dest_index, int count);
/* custom data free functions
* free count elements, starting at index
@@ -550,8 +550,8 @@ void DM_update_tessface_data(DerivedMesh *dm);
* indexed by dest_index in the dest mesh
*/
void DM_interp_vert_data(struct DerivedMesh *source, struct DerivedMesh *dest,
- int *src_indices, float *weights,
- int count, int dest_index);
+ int *src_indices, float *weights,
+ int count, int dest_index);
/* interpolates edge data from the edges indexed by src_indices in the
* source mesh using the given weights and stores the result in the edge indexed
@@ -562,9 +562,9 @@ void DM_interp_vert_data(struct DerivedMesh *source, struct DerivedMesh *dest,
*/
typedef float EdgeVertWeight[SUB_ELEMS_EDGE][SUB_ELEMS_EDGE];
void DM_interp_edge_data(struct DerivedMesh *source, struct DerivedMesh *dest,
- int *src_indices,
- float *weights, EdgeVertWeight *vert_weights,
- int count, int dest_index);
+ int *src_indices,
+ float *weights, EdgeVertWeight *vert_weights,
+ int count, int dest_index);
/* interpolates face data from the faces indexed by src_indices in the
* source mesh using the given weights and stores the result in the face indexed
@@ -575,9 +575,9 @@ void DM_interp_edge_data(struct DerivedMesh *source, struct DerivedMesh *dest,
*/
typedef float FaceVertWeight[SUB_ELEMS_FACE][SUB_ELEMS_FACE];
void DM_interp_tessface_data(struct DerivedMesh *source, struct DerivedMesh *dest,
- int *src_indices,
- float *weights, FaceVertWeight *vert_weights,
- int count, int dest_index);
+ int *src_indices,
+ float *weights, FaceVertWeight *vert_weights,
+ int count, int dest_index);
void DM_swap_tessface_data(struct DerivedMesh *dm, int index, const int *corner_indices);
@@ -597,54 +597,54 @@ void vDM_ColorBand_store(struct ColorBand *coba);
* In use now by vertex/weight paint and particles */
float *mesh_get_mapped_verts_nors(struct Scene *scene, struct Object *ob);
- /* */
+/* */
DerivedMesh *mesh_get_derived_final(struct Scene *scene, struct Object *ob,
- CustomDataMask dataMask);
+ CustomDataMask dataMask);
DerivedMesh *mesh_get_derived_deform(struct Scene *scene, struct Object *ob,
- CustomDataMask dataMask);
+ CustomDataMask dataMask);
DerivedMesh *mesh_create_derived_for_modifier(struct Scene *scene, struct Object *ob,
- struct ModifierData *md, int build_shapekey_layers);
+ struct ModifierData *md, int build_shapekey_layers);
DerivedMesh *mesh_create_derived_render(struct Scene *scene, struct Object *ob,
- CustomDataMask dataMask);
+ CustomDataMask dataMask);
DerivedMesh *getEditDerivedBMesh(struct BMEditMesh *em, struct Object *ob,
- float (*vertexCos)[3]);
+ float (*vertexCos)[3]);
DerivedMesh *mesh_create_derived_index_render(struct Scene *scene, struct Object *ob, CustomDataMask dataMask, int index);
- /* same as above but wont use render settings */
+/* same as above but wont use render settings */
DerivedMesh *mesh_create_derived(struct Mesh *me, struct Object *ob, float (*vertCos)[3]);
DerivedMesh *mesh_create_derived_view(struct Scene *scene, struct Object *ob,
- CustomDataMask dataMask);
+ CustomDataMask dataMask);
DerivedMesh *mesh_create_derived_no_deform(struct Scene *scene, struct Object *ob,
- float (*vertCos)[3],
- CustomDataMask dataMask);
+ float (*vertCos)[3],
+ CustomDataMask dataMask);
DerivedMesh *mesh_create_derived_no_deform_render(struct Scene *scene, struct Object *ob,
- float (*vertCos)[3],
- CustomDataMask dataMask);
+ float (*vertCos)[3],
+ CustomDataMask dataMask);
/* for gameengine */
DerivedMesh *mesh_create_derived_no_virtual(struct Scene *scene, struct Object *ob, float (*vertCos)[3],
- CustomDataMask dataMask);
+ CustomDataMask dataMask);
DerivedMesh *mesh_create_derived_physics(struct Scene *scene, struct Object *ob, float (*vertCos)[3],
- CustomDataMask dataMask);
+ CustomDataMask dataMask);
DerivedMesh *editbmesh_get_derived_base(struct Object *, struct BMEditMesh *em);
DerivedMesh *editbmesh_get_derived_cage(struct Scene *scene, struct Object *,
- struct BMEditMesh *em, CustomDataMask dataMask);
+ struct BMEditMesh *em, CustomDataMask dataMask);
DerivedMesh *editbmesh_get_derived_cage_and_final(struct Scene *scene, struct Object *,
- struct BMEditMesh *em, DerivedMesh **final_r,
- CustomDataMask dataMask);
+ struct BMEditMesh *em, DerivedMesh **final_r,
+ CustomDataMask dataMask);
float (*editbmesh_get_vertex_cos(struct BMEditMesh *em, int *numVerts_r))[3];
int editbmesh_modifier_is_enabled(struct Scene *scene, struct ModifierData *md, DerivedMesh *dm);
void makeDerivedMesh(struct Scene *scene, struct Object *ob, struct BMEditMesh *em,
- CustomDataMask dataMask, int build_shapekey_layers);
+ CustomDataMask dataMask, int build_shapekey_layers);
/* returns an array of deform matrices for crazyspace correction, and the
* number of modifiers left */
int editbmesh_get_first_deform_matrices(struct Scene *, struct Object *, struct BMEditMesh *em,
- float (**deformmats)[3][3], float (**deformcos)[3]);
+ float (**deformmats)[3][3], float (**deformcos)[3]);
void weight_to_rgb(float r_rgb[3], const float weight);
/* Update the weight MCOL preview layer.
@@ -684,7 +684,7 @@ typedef struct DMVertexAttribs {
} DMVertexAttribs;
void DM_vertex_attributes_from_gpu(DerivedMesh *dm,
- struct GPUVertexAttribs *gattribs, DMVertexAttribs *attribs);
+ struct GPUVertexAttribs *gattribs, DMVertexAttribs *attribs);
void DM_add_tangent_layer(DerivedMesh *dm);
void DM_calc_auto_bump_scale(DerivedMesh *dm);
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h
index a326b514f9a..c1361788379 100644
--- a/source/blender/blenkernel/BKE_action.h
+++ b/source/blender/blenkernel/BKE_action.h
@@ -71,24 +71,24 @@ void BKE_action_make_local(struct bAction *act);
/* Action API ----------------- */
/* types of transforms applied to the given item
- * - these are the return falgs for action_get_item_transforms()
+ * - these are the return falgs for action_get_item_transforms()
*/
typedef enum eAction_TransformFlags {
- /* location */
- ACT_TRANS_LOC = (1<<0),
- /* rotation */
- ACT_TRANS_ROT = (1<<1),
- /* scaling */
- ACT_TRANS_SCALE = (1<<2),
-
- /* strictly not a transform, but custom properties are also
- * quite often used in modern rigs
- */
- ACT_TRANS_PROP = (1<<3),
-
- /* all flags */
- ACT_TRANS_ONLY = (ACT_TRANS_LOC|ACT_TRANS_ROT|ACT_TRANS_SCALE),
- ACT_TRANS_ALL = (ACT_TRANS_ONLY|ACT_TRANS_PROP)
+ /* location */
+ ACT_TRANS_LOC = (1 << 0),
+ /* rotation */
+ ACT_TRANS_ROT = (1 << 1),
+ /* scaling */
+ ACT_TRANS_SCALE = (1 << 2),
+
+ /* strictly not a transform, but custom properties are also
+ * quite often used in modern rigs
+ */
+ ACT_TRANS_PROP = (1 << 3),
+
+ /* all flags */
+ ACT_TRANS_ONLY = (ACT_TRANS_LOC | ACT_TRANS_ROT | ACT_TRANS_SCALE),
+ ACT_TRANS_ALL = (ACT_TRANS_ONLY | ACT_TRANS_PROP)
} eAction_TransformFlags;
/* Return flags indicating which transforms the given object/posechannel has
@@ -182,7 +182,7 @@ struct bPoseChannel *BKE_pose_channel_active(struct Object *ob);
* already exists in this pose - if not a new one is
* allocated and initialized.
*/
-struct bPoseChannel *BKE_pose_channel_verify(struct bPose* pose, const char* name);
+struct bPoseChannel *BKE_pose_channel_verify(struct bPose *pose, const char *name);
/* Copy the data from the action-pose (src) into the pose */
void extract_pose_from_pose(struct bPose *pose, const struct bPose *src);
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index b8c2c42f8d5..44e47e779e7 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -46,28 +46,26 @@ struct Mesh;
struct PoseTree;
struct ListBase;
-typedef struct PoseTarget
-{
+typedef struct PoseTarget {
struct PoseTarget *next, *prev;
- struct bConstraint *con; /* the constrait of this target */
- int tip; /* index of tip pchan in PoseTree */
+ struct bConstraint *con; /* the constrait of this target */
+ int tip; /* index of tip pchan in PoseTree */
} PoseTarget;
-typedef struct PoseTree
-{
+typedef struct PoseTree {
struct PoseTree *next, *prev;
- int type; /* type of IK that this serves (CONSTRAINT_TYPE_KINEMATIC or ..._SPLINEIK) */
- int totchannel; /* number of pose channels */
+ int type; /* type of IK that this serves (CONSTRAINT_TYPE_KINEMATIC or ..._SPLINEIK) */
+ int totchannel; /* number of pose channels */
- struct ListBase targets; /* list of targets of the tree */
- struct bPoseChannel **pchan; /* array of pose channels */
- int *parent; /* and their parents */
-
- float (*basis_change)[3][3]; /* basis change result from solver */
- int iterations; /* iterations from the constraint */
- int stretch; /* disable stretching */
+ struct ListBase targets; /* list of targets of the tree */
+ struct bPoseChannel **pchan; /* array of pose channels */
+ int *parent; /* and their parents */
+
+ float (*basis_change)[3][3]; /* basis change result from solver */
+ int iterations; /* iterations from the constraint */
+ int stretch; /* disable stretching */
} PoseTree;
/* Core armature functionality */
@@ -77,7 +75,7 @@ extern "C" {
struct bArmature *BKE_armature_add(const char *name);
struct bArmature *BKE_armature_from_object(struct Object *ob);
-void BKE_armature_bonelist_free (struct ListBase *lb);
+void BKE_armature_bonelist_free(struct ListBase *lb);
void BKE_armature_free(struct bArmature *arm);
void BKE_armature_make_local(struct bArmature *arm);
struct bArmature *BKE_armature_copy(struct bArmature *arm);
@@ -85,9 +83,9 @@ struct bArmature *BKE_armature_copy(struct bArmature *arm);
/* Bounding box. */
struct BoundBox *BKE_armature_boundbox_get(struct Object *ob);
-int bone_autoside_name (char name[64], int strip_number, short axis, float head, float tail);
+int bone_autoside_name(char name[64], int strip_number, short axis, float head, float tail);
-struct Bone *BKE_armature_find_bone_name (struct bArmature *arm, const char *name);
+struct Bone *BKE_armature_find_bone_name(struct bArmature *arm, const char *name);
float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3], float r1, float r2, float rdist);
@@ -99,7 +97,7 @@ void BKE_pose_where_is_bone(struct Scene *scene, struct Object *ob, struct bPose
void BKE_pose_where_is_bone_tail(struct bPoseChannel *pchan);
/* get_objectspace_bone_matrix has to be removed still */
-void get_objectspace_bone_matrix (struct Bone* bone, float M_accumulatedMatrix[][4], int root, int posed);
+void get_objectspace_bone_matrix(struct Bone *bone, float M_accumulatedMatrix[][4], int root, int posed);
void vec_roll_to_mat3(const float vec[3], const float roll, float mat[][3]);
void mat3_to_vec_roll(float mat[][3], float *vec, float *roll);
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 29e02562be3..7cc5d16dcc1 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -41,17 +41,17 @@ extern "C" {
/* these lines are grep'd, watch out for our not-so-awesome regex
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
-#define BLENDER_VERSION 263
-#define BLENDER_SUBVERSION 5
+#define BLENDER_VERSION 263
+#define BLENDER_SUBVERSION 5
-#define BLENDER_MINVERSION 250
-#define BLENDER_MINSUBVERSION 0
+#define BLENDER_MINVERSION 250
+#define BLENDER_MINSUBVERSION 0
/* used by packaging tools */
- /* can be left blank, otherwise a,b,c... etc with no quotes */
+/* can be left blank, otherwise a,b,c... etc with no quotes */
#define BLENDER_VERSION_CHAR
- /* alpha/beta/rc/release, docs use this */
-#define BLENDER_VERSION_CYCLE alpha
+/* alpha/beta/rc/release, docs use this */
+#define BLENDER_VERSION_CYCLE alpha
extern char versionstr[]; /* from blender.c */
@@ -64,11 +64,11 @@ struct Main;
int BKE_read_file(struct bContext *C, const char *filepath, struct ReportList *reports);
-#define BKE_READ_FILE_FAIL 0 /* no load */
-#define BKE_READ_FILE_OK 1 /* OK */
-#define BKE_READ_FILE_OK_USERPREFS 2 /* OK, and with new user settings */
+#define BKE_READ_FILE_FAIL 0 /* no load */
+#define BKE_READ_FILE_OK 1 /* OK */
+#define BKE_READ_FILE_OK_USERPREFS 2 /* OK, and with new user settings */
-int BKE_read_file_from_memory(struct bContext *C, char* filebuf, int filelength, struct ReportList *reports);
+int BKE_read_file_from_memory(struct bContext *C, char *filebuf, int filelength, struct ReportList *reports);
int BKE_read_file_from_memfile(struct bContext *C, struct MemFile *memfile, struct ReportList *reports);
void free_blender(void);
diff --git a/source/blender/blenkernel/BKE_bmesh.h b/source/blender/blenkernel/BKE_bmesh.h
index bcb50a9c903..67b21eb764c 100644
--- a/source/blender/blenkernel/BKE_bmesh.h
+++ b/source/blender/blenkernel/BKE_bmesh.h
@@ -42,28 +42,28 @@
/* bevel tool defines */
/* element flags */
-#define BME_BEVEL_ORIG 1
-#define BME_BEVEL_BEVEL (1<<1)
-#define BME_BEVEL_NONMAN (1<<2)
-#define BME_BEVEL_WIRE (1<<3)
+#define BME_BEVEL_ORIG 1
+#define BME_BEVEL_BEVEL (1 << 1)
+#define BME_BEVEL_NONMAN (1 << 2)
+#define BME_BEVEL_WIRE (1 << 3)
/* tool options */
-#define BME_BEVEL_SELECT 1
-#define BME_BEVEL_VERT (1<<1)
-#define BME_BEVEL_RADIUS (1<<2)
-#define BME_BEVEL_ANGLE (1<<3)
-#define BME_BEVEL_WEIGHT (1<<4)
+#define BME_BEVEL_SELECT 1
+#define BME_BEVEL_VERT (1 << 1)
+#define BME_BEVEL_RADIUS (1 << 2)
+#define BME_BEVEL_ANGLE (1 << 3)
+#define BME_BEVEL_WEIGHT (1 << 4)
//~ #define BME_BEVEL_EWEIGHT (1<<4)
//~ #define BME_BEVEL_VWEIGHT (1<<5)
-#define BME_BEVEL_PERCENT (1<<6)
-#define BME_BEVEL_EMIN (1<<7)
-#define BME_BEVEL_EMAX (1<<8)
-#define BME_BEVEL_RUNNING (1<<9)
-#define BME_BEVEL_RES (1<<10)
+#define BME_BEVEL_PERCENT (1 << 6)
+#define BME_BEVEL_EMIN (1 << 7)
+#define BME_BEVEL_EMAX (1 << 8)
+#define BME_BEVEL_RUNNING (1 << 9)
+#define BME_BEVEL_RES (1 << 10)
-#define BME_BEVEL_EVEN (1<<11) /* this is a new setting not related to old (trunk bmesh bevel code) but adding
- * here because they are mixed - campbell */
-#define BME_BEVEL_DIST (1<<12) /* same as above */
+#define BME_BEVEL_EVEN (1 << 11) /* this is a new setting not related to old (trunk bmesh bevel code) but adding
+ * here because they are mixed - campbell */
+#define BME_BEVEL_DIST (1 << 12) /* same as above */
typedef struct BME_TransData {
struct BMesh *bm; /* the bmesh the vert belongs to */
@@ -74,11 +74,11 @@ typedef struct BME_TransData {
void *loc; /* a pointer to the data to transform (likely the vert's cos) */
float factor; /* primary scaling factor; also accumulates number of weighted edges for beveling tool */
float weight; /* another scaling factor; used primarily for propogating vertex weights to transforms; */
- /* weight is also used across recursive bevels to help with the math */
+ /* weight is also used across recursive bevels to help with the math */
float maxfactor; /* the unscaled, original factor (used only by "edge verts" in recursive beveling) */
float *max; /* the maximum distance this vert can be transformed; negative is infinite
- * it points to the "parent" maxfactor (where maxfactor makes little sense)
- * where the max limit is stored (limits are stored per-corner) */
+ * it points to the "parent" maxfactor (where maxfactor makes little sense)
+ * where the max limit is stored (limits are stored per-corner) */
} BME_TransData;
typedef struct BME_TransData_Head {
diff --git a/source/blender/blenkernel/BKE_bmfont.h b/source/blender/blenkernel/BKE_bmfont.h
index 6c0cbe3a51b..64daa311b9a 100644
--- a/source/blender/blenkernel/BKE_bmfont.h
+++ b/source/blender/blenkernel/BKE_bmfont.h
@@ -41,14 +41,14 @@ struct bmGlyph;
struct ImBuf;
struct bmFont;
-void printfGlyph(struct bmGlyph * glyph);
-void calcAlpha(struct ImBuf * ibuf);
-void readBitmapFontVersion0(struct ImBuf * ibuf,
- unsigned char * rect,
+void printfGlyph(struct bmGlyph *glyph);
+void calcAlpha(struct ImBuf *ibuf);
+void readBitmapFontVersion0(struct ImBuf *ibuf,
+ unsigned char *rect,
int step);
void detectBitmapFont(struct ImBuf *ibuf);
int locateGlyph(struct bmFont *bmfont, unsigned short unicode);
-void matrixGlyph(struct ImBuf * ibuf, unsigned short unicode,
+void matrixGlyph(struct ImBuf *ibuf, unsigned short unicode,
float *centerx, float *centery,
float *sizex, float *sizey,
float *transx, float *transy,
diff --git a/source/blender/blenkernel/BKE_booleanops_mesh.h b/source/blender/blenkernel/BKE_booleanops_mesh.h
index 2e48b664449..e8ffefe74ce 100644
--- a/source/blender/blenkernel/BKE_booleanops_mesh.h
+++ b/source/blender/blenkernel/BKE_booleanops_mesh.h
@@ -53,12 +53,9 @@ typedef struct CSG_MeshDescriptor {
} CSG_MeshDescriptor;
-extern
- int
-CSG_LoadBlenderMesh(
- struct Object * obj,
- CSG_MeshDescriptor *output
-);
+extern int
+CSG_LoadBlenderMesh(struct Object *obj,
+ CSG_MeshDescriptor *output);
/**
* Destroy the contents of a mesh descriptor.
@@ -67,11 +64,8 @@ CSG_LoadBlenderMesh(
* internal memory in the desriptor.
*/
-extern
- void
-CSG_DestroyMeshDescriptor(
- CSG_MeshDescriptor *mesh
-);
+extern void
+CSG_DestroyMeshDescriptor(CSG_MeshDescriptor *mesh);
/**
* Perform a boolean operation between 2 meshes and return the
@@ -82,14 +76,11 @@ CSG_DestroyMeshDescriptor(
* 3 = difference.
*/
-extern
- int
-CSG_PerformOp(
- CSG_MeshDescriptor *mesh1,
- CSG_MeshDescriptor *mesh2,
- int op_type,
- CSG_MeshDescriptor *output
-);
+extern int
+CSG_PerformOp(CSG_MeshDescriptor *mesh1,
+ CSG_MeshDescriptor *mesh2,
+ int op_type,
+ CSG_MeshDescriptor *output);
@@ -97,23 +88,17 @@ CSG_PerformOp(
* Add a mesh to blender as a new object.
*/
-extern
- int
-CSG_AddMeshToBlender(
- CSG_MeshDescriptor *mesh
-);
+extern int
+CSG_AddMeshToBlender(CSG_MeshDescriptor *mesh);
/**
* Test functionality.
*/
-extern
- int
-NewBooleanMeshTest(
- struct Base * base,
- struct Base * base_select,
- int op_type
-);
+extern int
+NewBooleanMeshTest(struct Base *base,
+ struct Base *base_select,
+ int op_type);
#endif
diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h
index b5edc8f3e50..cbffb6c0cea 100644
--- a/source/blender/blenkernel/BKE_brush.h
+++ b/source/blender/blenkernel/BKE_brush.h
@@ -59,17 +59,17 @@ int BKE_brush_clone_image_delete(struct Brush *brush);
/* jitter */
void BKE_brush_jitter_pos(const struct Scene *scene, struct Brush *brush,
- const float pos[2], float jitterpos[2]);
+ const float pos[2], float jitterpos[2]);
/* brush curve */
-void BKE_brush_curve_preset(struct Brush *b, /*enum CurveMappingPreset*/int preset);
+void BKE_brush_curve_preset(struct Brush *b, /*enum CurveMappingPreset*/ int preset);
float BKE_brush_curve_strength_clamp(struct Brush *br, float p, const float len);
float BKE_brush_curve_strength(struct Brush *br, float p, const float len); /* used for sculpt */
/* sampling */
void BKE_brush_sample_tex(const struct Scene *scene, struct Brush *brush, const float xy[2], float rgba[4], const int thread);
void BKE_brush_imbuf_new(const struct Scene *scene, struct Brush *brush, short flt, short texfalloff, int size,
- struct ImBuf **imbuf, int use_color_correction);
+ struct ImBuf **imbuf, int use_color_correction);
/* painting */
struct BrushPainter;
@@ -78,9 +78,9 @@ typedef int (*BrushFunc)(void *user, struct ImBuf *ibuf, const float lastpos[2],
BrushPainter *BKE_brush_painter_new(struct Scene *scene, struct Brush *brush);
void BKE_brush_painter_require_imbuf(BrushPainter *painter, short flt,
- short texonly, int size);
+ short texonly, int size);
int BKE_brush_painter_paint(BrushPainter *painter, BrushFunc func, const float pos[2],
- double time, float pressure, void *user, int use_color_correction);
+ double time, float pressure, void *user, int use_color_correction);
void BKE_brush_painter_break_stroke(BrushPainter *painter);
void BKE_brush_painter_free(BrushPainter *painter);
@@ -108,13 +108,13 @@ int BKE_brush_use_size_pressure(const struct Scene *scene, struct Brush *brush)
/* scale unprojected radius to reflect a change in the brush's 2D size */
void BKE_brush_scale_unprojected_radius(float *unprojected_radius,
- int new_brush_size,
- int old_brush_size);
+ int new_brush_size,
+ int old_brush_size);
/* scale brush size to reflect a change in the brush's unprojected radius */
void BKE_brush_scale_size(int *BKE_brush_size_get,
- float new_unprojected_radius,
- float old_unprojected_radius);
+ float new_unprojected_radius,
+ float old_unprojected_radius);
/* debugging only */
void BKE_brush_debug_print_state(struct Brush *br);
diff --git a/source/blender/blenkernel/BKE_bullet.h b/source/blender/blenkernel/BKE_bullet.h
index 2103eea1041..dc522d1b22c 100644
--- a/source/blender/blenkernel/BKE_bullet.h
+++ b/source/blender/blenkernel/BKE_bullet.h
@@ -38,7 +38,7 @@ struct BulletSoftBody;
extern struct BulletSoftBody *bsbNew(void);
/* frees internal data and softbody itself */
-extern void bsbFree(struct BulletSoftBody *sb);
+extern void bsbFree(struct BulletSoftBody *sb);
#endif
diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h
index ab3d751cc8e..eff5019a49c 100644
--- a/source/blender/blenkernel/BKE_bvhutils.h
+++ b/source/blender/blenkernel/BKE_bvhutils.h
@@ -44,20 +44,19 @@ struct MFace;
/*
* struct that kepts basic information about a BVHTree build from a mesh
*/
-typedef struct BVHTreeFromMesh
-{
+typedef struct BVHTreeFromMesh {
struct BVHTree *tree;
/* default callbacks to bvh nearest and raycast */
BVHTree_NearestPointCallback nearest_callback;
- BVHTree_RayCastCallback raycast_callback;
+ BVHTree_RayCastCallback raycast_callback;
/* Mesh represented on this BVHTree */
struct DerivedMesh *mesh;
/* Vertex array, so that callbacks have instante access to data */
struct MVert *vert;
- struct MEdge *edge; /* only used for BVHTreeFromMeshEdges */
+ struct MEdge *edge; /* only used for BVHTreeFromMeshEdges */
struct MFace *face;
/* radius for raycast */
@@ -65,7 +64,7 @@ typedef struct BVHTreeFromMesh
/* Private data */
int cached;
- void *em_evil; /* var only for snapping */
+ void *em_evil; /* var only for snapping */
} BVHTreeFromMesh;
@@ -80,7 +79,7 @@ typedef struct BVHTreeFromMesh
*
* free_bvhtree_from_mesh should be called when the tree is no longer needed.
*/
-BVHTree* bvhtree_from_mesh_verts(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
+BVHTree *bvhtree_from_mesh_verts(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
/*
* Builds a bvh tree where nodes are the faces of the given mesh.
@@ -96,9 +95,9 @@ BVHTree* bvhtree_from_mesh_verts(struct BVHTreeFromMesh *data, struct DerivedMes
*
* free_bvhtree_from_mesh should be called when the tree is no longer needed.
*/
-BVHTree* bvhtree_from_mesh_faces(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
+BVHTree *bvhtree_from_mesh_faces(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
-BVHTree* bvhtree_from_mesh_edges(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
+BVHTree *bvhtree_from_mesh_edges(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
/*
* Frees data allocated by a call to bvhtree_from_mesh_*.
@@ -116,11 +115,11 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
*/
//Using local coordinates
-#define BVHTREE_FROM_FACES 0
-#define BVHTREE_FROM_VERTICES 1
-#define BVHTREE_FROM_EDGES 2
+#define BVHTREE_FROM_FACES 0
+#define BVHTREE_FROM_VERTICES 1
+#define BVHTREE_FROM_EDGES 2
-typedef struct LinkNode* BVHCache;
+typedef struct LinkNode *BVHCache;
/*
diff --git a/source/blender/blenkernel/BKE_camera.h b/source/blender/blenkernel/BKE_camera.h
index 8f68d7abcac..2a27934c038 100644
--- a/source/blender/blenkernel/BKE_camera.h
+++ b/source/blender/blenkernel/BKE_camera.h
@@ -112,13 +112,12 @@ void BKE_camera_params_compute_matrix(CameraParams *params);
/* Camera View Frame */
void BKE_camera_view_frame_ex(struct Scene *scene, struct Camera *camera, float drawsize, const short do_clip, const float scale[3],
- float r_asp[2], float r_shift[2], float *r_drawsize, float r_vec[4][3]);
+ float r_asp[2], float r_shift[2], float *r_drawsize, float r_vec[4][3]);
void BKE_camera_view_frame(struct Scene *scene, struct Camera *camera, float r_vec[4][3]);
-int BKE_camera_view_frame_fit_to_scene(
- struct Scene *scene, struct View3D *v3d, struct Object *camera_ob,
- float r_co[3]);
+int BKE_camera_view_frame_fit_to_scene(struct Scene *scene, struct View3D *v3d, struct Object *camera_ob,
+ float r_co[3]);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_ccg.h b/source/blender/blenkernel/BKE_ccg.h
index 079994450d5..597d6498d99 100644
--- a/source/blender/blenkernel/BKE_ccg.h
+++ b/source/blender/blenkernel/BKE_ccg.h
@@ -43,7 +43,7 @@ struct CCGSubSurf;
this reason, CCGElem is presented as an opaque pointer, and
elements should always be accompanied by a CCGKey, which provides
the necessary offsets to access components of a CCGElem.
-*/
+ */
typedef struct CCGElem CCGElem;
typedef struct CCGKey {
@@ -104,24 +104,24 @@ BLI_INLINE CCGElem *CCG_elem_next(const CCGKey *key, CCGElem *elem);
BLI_INLINE float *CCG_elem_co(const CCGKey *UNUSED(key), CCGElem *elem)
{
- return (float*)elem;
+ return (float *)elem;
}
BLI_INLINE float *CCG_elem_no(const CCGKey *key, CCGElem *elem)
{
BLI_assert(key->has_normals);
- return (float*)((char*)elem + key->normal_offset);
+ return (float *)((char *)elem + key->normal_offset);
}
BLI_INLINE float *CCG_elem_mask(const CCGKey *key, CCGElem *elem)
{
BLI_assert(key->has_mask);
- return (float*)((char*)elem + (key->mask_offset));
+ return (float *)((char *)elem + (key->mask_offset));
}
BLI_INLINE CCGElem *CCG_elem_offset(const CCGKey *key, CCGElem *elem, int offset)
{
- return (CCGElem*)(((char*)elem) + key->elem_size * offset);
+ return (CCGElem *)(((char *)elem) + key->elem_size * offset);
}
BLI_INLINE CCGElem *CCG_grid_elem(const CCGKey *key, CCGElem *elem, int x, int y)
diff --git a/source/blender/blenkernel/BKE_cdderivedmesh.h b/source/blender/blenkernel/BKE_cdderivedmesh.h
index bdfe7366f9e..37763003099 100644
--- a/source/blender/blenkernel/BKE_cdderivedmesh.h
+++ b/source/blender/blenkernel/BKE_cdderivedmesh.h
@@ -79,11 +79,11 @@ struct DerivedMesh *CDDM_copy_from_tessface(struct DerivedMesh *dm);
* elements are initialized to all zeros
*/
struct DerivedMesh *CDDM_from_template(struct DerivedMesh *source,
- int numVerts, int numEdges, int numFaces,
- int numLoops, int numPolys);
+ int numVerts, int numEdges, int numFaces,
+ int numLoops, int numPolys);
-/*converts mfaces to mpolys. note things may break if there are not valid
- *medges surrounding each mface.
+/* converts mfaces to mpolys. note things may break if there are not valid
+ * medges surrounding each mface.
*/
void CDDM_tessfaces_to_faces(struct DerivedMesh *dm);
diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h
index 24bce63ea3b..191056571c0 100644
--- a/source/blender/blenkernel/BKE_collision.h
+++ b/source/blender/blenkernel/BKE_collision.h
@@ -61,10 +61,10 @@ struct LinkNode;
/* COLLISION FLAGS */
typedef enum
{
- COLLISION_IN_FUTURE = (1 << 1),
+ COLLISION_IN_FUTURE = (1 << 1),
#ifdef WITH_ELTOPO
- COLLISION_USE_COLLFACE = (1 << 2),
- COLLISION_IS_EDGES = (1 << 3),
+ COLLISION_USE_COLLFACE = (1 << 2),
+ COLLISION_IS_EDGES = (1 << 3),
#endif
} COLLISION_FLAGS;
@@ -73,8 +73,7 @@ typedef enum
// used for collisions in collision.c
////////////////////////////////////////
/* used for collisions in collision.c */
-typedef struct CollPair
-{
+typedef struct CollPair {
unsigned int face1; // cloth face
unsigned int face2; // object face
double distance; // magnitude of vector
@@ -95,8 +94,7 @@ typedef struct CollPair
CollPair;
/* used for collisions in collision.c */
-typedef struct EdgeCollPair
-{
+typedef struct EdgeCollPair {
unsigned int p11, p12, p21, p22;
float normal[3];
float vector[3];
@@ -107,8 +105,7 @@ typedef struct EdgeCollPair
EdgeCollPair;
/* used for collisions in collision.c */
-typedef struct FaceCollPair
-{
+typedef struct FaceCollPair {
unsigned int p11, p12, p13, p21;
float normal[3];
float vector[3];
@@ -130,8 +127,8 @@ FaceCollPair;
// used in modifier.c from collision.c
/////////////////////////////////////////////////
-BVHTree *bvhtree_build_from_mvert(struct MFace *mfaces, unsigned int numfaces, struct MVert *x, unsigned int numverts, float epsilon );
-void bvhtree_update_from_mvert(BVHTree * bvhtree, struct MFace *faces, int numfaces, struct MVert *x, struct MVert *xnew, int numverts, int moving );
+BVHTree *bvhtree_build_from_mvert(struct MFace *mfaces, unsigned int numfaces, struct MVert *x, unsigned int numverts, float epsilon);
+void bvhtree_update_from_mvert(BVHTree *bvhtree, struct MFace *faces, int numfaces, struct MVert *x, struct MVert *xnew, int numverts, int moving);
/////////////////////////////////////////////////
diff --git a/source/blender/blenkernel/BKE_colortools.h b/source/blender/blenkernel/BKE_colortools.h
index 1da0caf97c2..b85f0efe7e3 100644
--- a/source/blender/blenkernel/BKE_colortools.h
+++ b/source/blender/blenkernel/BKE_colortools.h
@@ -39,42 +39,42 @@ struct rctf;
#if defined _WIN32
# define DO_INLINE __inline
-#elif defined (__sun) || defined (__sun__)
+#elif defined(__sun) || defined(__sun__)
# define DO_INLINE
#else
# define DO_INLINE static inline
#endif
-struct CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, float maxy);
-void curvemapping_free(struct CurveMapping *cumap);
-struct CurveMapping *curvemapping_copy(struct CurveMapping *cumap);
-void curvemapping_set_black_white(struct CurveMapping *cumap, const float black[3], const float white[3]);
+struct CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, float maxy);
+void curvemapping_free(struct CurveMapping *cumap);
+struct CurveMapping *curvemapping_copy(struct CurveMapping *cumap);
+void curvemapping_set_black_white(struct CurveMapping *cumap, const float black[3], const float white[3]);
-#define CURVEMAP_SLOPE_NEGATIVE 0
-#define CURVEMAP_SLOPE_POSITIVE 1
-void curvemap_reset(struct CurveMap *cuma, struct rctf *clipr, int preset, int slope);
-void curvemap_remove(struct CurveMap *cuma, int flag);
-void curvemap_insert(struct CurveMap *cuma, float x, float y);
-void curvemap_sethandle(struct CurveMap *cuma, int type);
+#define CURVEMAP_SLOPE_NEGATIVE 0
+#define CURVEMAP_SLOPE_POSITIVE 1
+void curvemap_reset(struct CurveMap *cuma, struct rctf *clipr, int preset, int slope);
+void curvemap_remove(struct CurveMap *cuma, int flag);
+void curvemap_insert(struct CurveMap *cuma, float x, float y);
+void curvemap_sethandle(struct CurveMap *cuma, int type);
-void curvemapping_changed(struct CurveMapping *cumap, int rem_doubles);
-
- /* single curve, no table check */
-float curvemap_evaluateF(struct CurveMap *cuma, float value);
- /* single curve, with table check */
-float curvemapping_evaluateF(struct CurveMapping *cumap, int cur, float value);
-void curvemapping_evaluate3F(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
-void curvemapping_evaluateRGBF(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
-void curvemapping_evaluate_premulRGBF(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
-void curvemapping_do_ibuf(struct CurveMapping *cumap, struct ImBuf *ibuf);
-void curvemapping_premultiply(struct CurveMapping *cumap, int restore);
-int curvemapping_RGBA_does_something(struct CurveMapping *cumap);
-void curvemapping_initialize(struct CurveMapping *cumap);
-void curvemapping_table_RGBA(struct CurveMapping *cumap, float **array, int *size);
+void curvemapping_changed(struct CurveMapping *cumap, int rem_doubles);
-void scopes_update(struct Scopes *scopes, struct ImBuf *ibuf, int use_color_management);
-void scopes_free(struct Scopes *scopes);
-void scopes_new(struct Scopes *scopes);
+/* single curve, no table check */
+float curvemap_evaluateF(struct CurveMap *cuma, float value);
+/* single curve, with table check */
+float curvemapping_evaluateF(struct CurveMapping *cumap, int cur, float value);
+void curvemapping_evaluate3F(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
+void curvemapping_evaluateRGBF(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
+void curvemapping_evaluate_premulRGBF(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
+void curvemapping_do_ibuf(struct CurveMapping *cumap, struct ImBuf *ibuf);
+void curvemapping_premultiply(struct CurveMapping *cumap, int restore);
+int curvemapping_RGBA_does_something(struct CurveMapping *cumap);
+void curvemapping_initialize(struct CurveMapping *cumap);
+void curvemapping_table_RGBA(struct CurveMapping *cumap, float **array, int *size);
+
+void scopes_update(struct Scopes *scopes, struct ImBuf *ibuf, int use_color_management);
+void scopes_free(struct Scopes *scopes);
+void scopes_new(struct Scopes *scopes);
#endif
diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h
index 35d07e7a7a7..686a60ab2c9 100644
--- a/source/blender/blenkernel/BKE_constraint.h
+++ b/source/blender/blenkernel/BKE_constraint.h
@@ -48,15 +48,15 @@ extern "C" {
/* special struct for use in constraint evaluation */
typedef struct bConstraintOb {
- struct Scene *scene; /* for system time, part of deglobalization, code nicer later with local time (ton) */
- struct Object *ob; /* if pchan, then armature that it comes from, otherwise constraint owner */
- struct bPoseChannel *pchan; /* pose channel that owns the constraints being evaluated */
+ struct Scene *scene; /* for system time, part of deglobalization, code nicer later with local time (ton) */
+ struct Object *ob; /* if pchan, then armature that it comes from, otherwise constraint owner */
+ struct bPoseChannel *pchan; /* pose channel that owns the constraints being evaluated */
- float matrix[4][4]; /* matrix where constraints are accumulated + solved */
- float startmat[4][4]; /* original matrix (before constraint solving) */
+ float matrix[4][4]; /* matrix where constraints are accumulated + solved */
+ float startmat[4][4]; /* original matrix (before constraint solving) */
- short type; /* type of owner */
- short rotOrder; /* rotation order for constraint owner (as defined in eEulerRotationOrders in BLI_math.h) */
+ short type; /* type of owner */
+ short rotOrder; /* rotation order for constraint owner (as defined in eEulerRotationOrders in BLI_math.h) */
} bConstraintOb;
/* ---------------------------------------------------------------------------- */
@@ -79,31 +79,31 @@ typedef void (*ConstraintIDFunc)(struct bConstraint *con, struct ID **idpoin, sh
*/
typedef struct bConstraintTypeInfo {
/* admin/ident */
- short type; /* CONSTRAINT_TYPE_### */
- short size; /* size in bytes of the struct */
- char name[32]; /* name of constraint in interface */
- char structName[32]; /* name of struct for SDNA */
+ short type; /* CONSTRAINT_TYPE_### */
+ short size; /* size in bytes of the struct */
+ char name[32]; /* name of constraint in interface */
+ char structName[32]; /* name of struct for SDNA */
/* data management function pointers - special handling */
- /* free any data that is allocated separately (optional) */
+ /* free any data that is allocated separately (optional) */
void (*free_data)(struct bConstraint *con);
- /* run the provided callback function on all the ID-blocks linked to the constraint */
+ /* run the provided callback function on all the ID-blocks linked to the constraint */
void (*id_looper)(struct bConstraint *con, ConstraintIDFunc func, void *userdata);
- /* copy any special data that is allocated separately (optional) */
+ /* copy any special data that is allocated separately (optional) */
void (*copy_data)(struct bConstraint *con, struct bConstraint *src);
- /* set settings for data that will be used for bConstraint.data (memory already allocated using MEM_callocN) */
+ /* set settings for data that will be used for bConstraint.data (memory already allocated using MEM_callocN) */
void (*new_data)(void *cdata);
/* target handling function pointers */
- /* for multi-target constraints: return that list; otherwise make a temporary list (returns number of targets) */
+ /* for multi-target constraints: return that list; otherwise make a temporary list (returns number of targets) */
int (*get_constraint_targets)(struct bConstraint *con, struct ListBase *list);
- /* for single-target constraints only: flush data back to source data, and the free memory used */
+ /* for single-target constraints only: flush data back to source data, and the free memory used */
void (*flush_constraint_targets)(struct bConstraint *con, struct ListBase *list, short nocopy);
/* evaluation */
- /* set the ct->matrix for the given constraint target (at the given ctime) */
+ /* set the ct->matrix for the given constraint target (at the given ctime) */
void (*get_target_matrix)(struct bConstraint *con, struct bConstraintOb *cob, struct bConstraintTarget *ct, float ctime);
- /* evaluate the constraint for the given time */
+ /* evaluate the constraint for the given time */
void (*evaluate_constraint)(struct bConstraint *con, struct bConstraintOb *cob, struct ListBase *targets);
} bConstraintTypeInfo;
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h
index b2bd840a09a..23df246b430 100644
--- a/source/blender/blenkernel/BKE_context.h
+++ b/source/blender/blenkernel/BKE_context.h
@@ -72,7 +72,7 @@ struct bContextDataResult;
typedef struct bContextDataResult bContextDataResult;
typedef int (*bContextDataCallback)(const bContext *C,
- const char *member, bContextDataResult *result);
+ const char *member, bContextDataResult *result);
typedef struct bContextStoreEntry {
struct bContextStoreEntry *next, *prev;
@@ -223,7 +223,7 @@ void CTX_data_list_add(bContextDataResult *result, void *data);
BLI_freelistN(&ctx_data_list); \
}
-int ctx_data_list_count(const bContext *C, int (*func)(const bContext*, ListBase*));
+int ctx_data_list_count(const bContext *C, int (*func)(const bContext *, ListBase *));
#define CTX_DATA_COUNT(C, member) \
ctx_data_list_count(C, CTX_data_##member)
diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h
index 6267104022c..a845ac10c9d 100644
--- a/source/blender/blenkernel/BKE_curve.h
+++ b/source/blender/blenkernel/BKE_curve.h
@@ -43,15 +43,15 @@ struct Nurb;
struct Object;
struct Scene;
-#define KNOTSU(nu) ( (nu)->orderu+ (nu)->pntsu+ (((nu)->flagu & CU_NURB_CYCLIC) ? ((nu)->orderu-1) : 0) )
-#define KNOTSV(nu) ( (nu)->orderv+ (nu)->pntsv+ (((nu)->flagv & CU_NURB_CYCLIC) ? ((nu)->orderv-1) : 0) )
+#define KNOTSU(nu) ( (nu)->orderu + (nu)->pntsu + (((nu)->flagu & CU_NURB_CYCLIC) ? ((nu)->orderu - 1) : 0) )
+#define KNOTSV(nu) ( (nu)->orderv + (nu)->pntsv + (((nu)->flagv & CU_NURB_CYCLIC) ? ((nu)->orderv - 1) : 0) )
/* Non cyclic nurbs have 1 less segment */
-#define SEGMENTSU(nu) ( ((nu)->flagu & CU_NURB_CYCLIC) ? (nu)->pntsu : (nu)->pntsu-1 )
-#define SEGMENTSV(nu) ( ((nu)->flagv & CU_NURB_CYCLIC) ? (nu)->pntsv : (nu)->pntsv-1 )
+#define SEGMENTSU(nu) ( ((nu)->flagu & CU_NURB_CYCLIC) ? (nu)->pntsu : (nu)->pntsu - 1)
+#define SEGMENTSV(nu) ( ((nu)->flagv & CU_NURB_CYCLIC) ? (nu)->pntsv : (nu)->pntsv - 1)
-#define CU_DO_TILT(cu, nu) (((nu->flag & CU_2D) && (cu->flag & CU_3D)==0) ? 0 : 1)
-#define CU_DO_RADIUS(cu, nu) ((CU_DO_TILT(cu, nu) || ((cu)->flag & CU_PATH_RADIUS) || (cu)->bevobj || (cu)->ext1!=0.0f || (cu)->ext2!=0.0f) ? 1:0)
+#define CU_DO_TILT(cu, nu) (((nu->flag & CU_2D) && (cu->flag & CU_3D) == 0) ? 0 : 1)
+#define CU_DO_RADIUS(cu, nu) ((CU_DO_TILT(cu, nu) || ((cu)->flag & CU_PATH_RADIUS) || (cu)->bevobj || (cu)->ext1 != 0.0f || (cu)->ext2 != 0.0f) ? 1 : 0)
/* ** Curve ** */
void BKE_curve_unlink(struct Curve *cu);
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h
index 4b52189d8b7..b39ea7cca02 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -47,7 +47,7 @@ struct CustomDataLayer;
typedef uint64_t CustomDataMask;
/*a data type large enough to hold 1 element from any customdata layer type*/
-typedef struct {unsigned char data[64];} CDBlockBytes;
+typedef struct {unsigned char data[64]; } CDBlockBytes;
extern const CustomDataMask CD_MASK_BAREMESH;
extern const CustomDataMask CD_MASK_MESH;
@@ -97,7 +97,7 @@ void CustomData_data_add(int type, void *data1, void *data2);
* mask is a bitfield where (mask & (1 << (layer type))) indicates
* if a layer should be copied or not. alloctype must be one of the above. */
void CustomData_copy(const struct CustomData *source, struct CustomData *dest,
- CustomDataMask mask, int alloctype, int totelem);
+ CustomDataMask mask, int alloctype, int totelem);
/* BMESH_TODO, not really a public function but readfile.c needs it */
void CustomData_update_typemap(struct CustomData *data);
@@ -105,7 +105,7 @@ void CustomData_update_typemap(struct CustomData *data);
/* same as the above, except that this will preserve existing layers, and only
* add the layers that were not there yet */
void CustomData_merge(const struct CustomData *source, struct CustomData *dest,
- CustomDataMask mask, int alloctype, int totelem);
+ 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
@@ -128,10 +128,10 @@ void CustomData_free_temporary(struct CustomData *data, int totelem);
* in editmode, use EDBM_data_layer_add instead of this function
*/
void *CustomData_add_layer(struct CustomData *data, int type, int alloctype,
- void *layer, int totelem);
+ void *layer, int totelem);
/*same as above but accepts a name */
void *CustomData_add_layer_named(struct CustomData *data, int type, int alloctype,
- void *layer, int totelem, const char *name);
+ void *layer, int totelem, const char *name);
/* frees the active or first data layer with the give type.
* returns 1 on succes, 0 if no layer with the given type is found
@@ -160,7 +160,7 @@ int CustomData_number_of_layers(const struct CustomData *data, int type);
* returns the layer data */
void *CustomData_duplicate_referenced_layer(struct CustomData *data, const int type, const int totelem);
void *CustomData_duplicate_referenced_layer_named(struct CustomData *data,
- const int type, const char *name, const int totelem);
+ const int type, const char *name, const int totelem);
int CustomData_is_referenced_layer(struct CustomData *data, int type);
/* set the CD_FLAG_NOCOPY flag in custom data layers where the mask is
@@ -168,7 +168,7 @@ int CustomData_is_referenced_layer(struct CustomData *data, int type);
* will be copied
*/
void CustomData_set_only_copy(const struct CustomData *data,
- CustomDataMask mask);
+ CustomDataMask mask);
/* copies data from one CustomData object to another
* objects need not be compatible, each source layer is copied to the
@@ -176,8 +176,8 @@ void CustomData_set_only_copy(const struct CustomData *data,
* return 1 on success, 0 on failure
*/
void CustomData_copy_data(const struct CustomData *source,
- struct CustomData *dest, int source_index,
- int dest_index, int count);
+ struct CustomData *dest, int source_index,
+ int dest_index, int count);
void CustomData_copy_elements(int type, void *source, void *dest, int count);
void CustomData_bmesh_copy_data(const struct CustomData *source,
struct CustomData *dest, void *src_block,
@@ -203,11 +203,11 @@ void CustomData_free_elem(struct CustomData *data, int index, int count);
* returns 1 on success, 0 on failure
*/
void CustomData_interp(const struct CustomData *source, struct CustomData *dest,
- int *src_indices, float *weights, float *sub_weights,
- int count, int dest_index);
+ int *src_indices, float *weights, float *sub_weights,
+ int count, int dest_index);
void CustomData_bmesh_interp(struct CustomData *data, void **src_blocks,
- float *weights, float *sub_weights, int count,
- void *dest_block);
+ float *weights, float *sub_weights, int count,
+ void *dest_block);
/* swaps the data in the element corners, to new corners with indices as
@@ -235,7 +235,7 @@ int CustomData_set_layer_name(const struct CustomData *data, int type, int n, co
void *CustomData_get_layer(const struct CustomData *data, int type);
void *CustomData_get_layer_n(const struct CustomData *data, int type, int n);
void *CustomData_get_layer_named(const struct CustomData *data, int type,
- const char *name);
+ const char *name);
int CustomData_get_layer_index(const struct CustomData *data, int type);
int CustomData_get_layer_index_n(const struct CustomData *data, int type, int n);
@@ -254,18 +254,18 @@ int CustomData_get_stencil_layer(const struct CustomData *data, int type);
* no effect if there is no layer of type
*/
void CustomData_set(const struct CustomData *data, int index, int type,
- void *source);
+ void *source);
void CustomData_bmesh_set(const struct CustomData *data, void *block, int type,
- void *source);
+ void *source);
void CustomData_bmesh_set_n(struct CustomData *data, void *block, int type, int n,
- void *source);
+ void *source);
/*sets the data of the block at physical layer n. no real type checking
- *is performed.
+ *is performed.
*/
void CustomData_bmesh_set_layer_n(struct CustomData *data, void *block, int n,
- void *source);
+ void *source);
/* set the pointer of to the first layer of type. the old data is not freed.
* returns the value of ptr if the layer is found, NULL otherwise
@@ -294,9 +294,9 @@ void CustomData_bmesh_free_block(struct CustomData *data, void **block);
/* copy custom data to/from layers as in mesh/derivedmesh, to editmesh
* blocks of data. the CustomData's must not be compatible */
void CustomData_to_bmesh_block(const struct CustomData *source,
- struct CustomData *dest, int src_index, void **dest_block);
+ struct CustomData *dest, int src_index, void **dest_block);
void CustomData_from_bmesh_block(const struct CustomData *source,
- struct CustomData *dest, void *src_block, int dest_index);
+ struct CustomData *dest, void *src_block, int dest_index);
/* query info over types */
@@ -326,17 +326,17 @@ void CustomData_bmesh_init_pool(struct CustomData *data, int totelem, const char
/* External file storage */
void CustomData_external_add(struct CustomData *data,
- struct ID *id, int type, int totelem, const char *filename);
+ struct ID *id, int type, int totelem, const char *filename);
void CustomData_external_remove(struct CustomData *data,
- struct ID *id, int type, int totelem);
+ struct ID *id, int type, int totelem);
int CustomData_external_test(struct CustomData *data, int type);
void CustomData_external_write(struct CustomData *data,
- struct ID *id, CustomDataMask mask, int totelem, int free);
+ struct ID *id, CustomDataMask mask, int totelem, int free);
void CustomData_external_read(struct CustomData *data,
- struct ID *id, CustomDataMask mask, int totelem);
+ struct ID *id, CustomDataMask mask, int totelem);
void CustomData_external_reload(struct CustomData *data,
- struct ID *id, CustomDataMask mask, int totelem);
+ struct ID *id, CustomDataMask mask, int totelem);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_customdata_file.h b/source/blender/blenkernel/BKE_customdata_file.h
index c4c41c20d80..978db8a6c1a 100644
--- a/source/blender/blenkernel/BKE_customdata_file.h
+++ b/source/blender/blenkernel/BKE_customdata_file.h
@@ -25,10 +25,10 @@
* \ingroup bke
*/
-#define CDF_TYPE_IMAGE 0
-#define CDF_TYPE_MESH 1
+#define CDF_TYPE_IMAGE 0
+#define CDF_TYPE_MESH 1
-#define CDF_LAYER_NAME_MAX 64
+#define CDF_LAYER_NAME_MAX 64
typedef struct CDataFile CDataFile;
typedef struct CDataFileLayer CDataFileLayer;
diff --git a/source/blender/blenkernel/BKE_deform.h b/source/blender/blenkernel/BKE_deform.h
index 559dd4571f5..25677165fc2 100644
--- a/source/blender/blenkernel/BKE_deform.h
+++ b/source/blender/blenkernel/BKE_deform.h
@@ -40,17 +40,17 @@ struct ListBase;
struct bDeformGroup;
struct MDeformVert;
-void defgroup_copy_list(struct ListBase *lb1, struct ListBase *lb2);
+void defgroup_copy_list(struct ListBase *lb1, struct ListBase *lb2);
struct bDeformGroup *defgroup_duplicate(struct bDeformGroup *ingroup);
struct bDeformGroup *defgroup_find_name(struct Object *ob, const char *name);
-int *defgroup_flip_map(struct Object *ob, int *flip_map_len, int use_default);
-int *defgroup_flip_map_single(struct Object *ob, int *flip_map_len, int use_default, int defgroup);
-int defgroup_flip_index(struct Object *ob, int index, int use_default);
-int defgroup_name_index(struct Object *ob, const char *name);
-void defgroup_unique_name(struct bDeformGroup *dg, struct Object *ob);
+int *defgroup_flip_map(struct Object *ob, int *flip_map_len, int use_default);
+int *defgroup_flip_map_single(struct Object *ob, int *flip_map_len, int use_default, int defgroup);
+int defgroup_flip_index(struct Object *ob, int index, int use_default);
+int defgroup_name_index(struct Object *ob, const char *name);
+void defgroup_unique_name(struct bDeformGroup *dg, struct Object *ob);
-struct MDeformWeight *defvert_find_index(const struct MDeformVert *dv, const int defgroup);
-struct MDeformWeight *defvert_verify_index(struct MDeformVert *dv, const int defgroup);
+struct MDeformWeight *defvert_find_index(const struct MDeformVert *dv, const int defgroup);
+struct MDeformWeight *defvert_verify_index(struct MDeformVert *dv, const int defgroup);
void defvert_add_index_notest(struct MDeformVert *dv, int defgroup, const float weight);
void defvert_remove_group(struct MDeformVert *dvert, struct MDeformWeight *dw);
void defvert_clear(struct MDeformVert *dvert);
@@ -63,7 +63,7 @@ void defvert_copy_index(struct MDeformVert *dvert_dst, const struct MDeformVert
void defvert_sync(struct MDeformVert *dvert_dst, const struct MDeformVert *dvert_src, int use_verify);
void defvert_sync_mapped(struct MDeformVert *dvert_dst, const struct MDeformVert *dvert_src,
const int *flip_map, const int flip_map_len, const int use_verify);
-void defvert_remap (struct MDeformVert *dvert, int *map, const int map_len);
+void defvert_remap(struct MDeformVert *dvert, int *map, const int map_len);
void defvert_flip(struct MDeformVert *dvert, const int *flip_map, const int flip_map_len);
void defvert_flip_merged(struct MDeformVert *dvert, const int *flip_map, const int flip_map_len);
void defvert_normalize(struct MDeformVert *dvert);
diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h
index b7edf04724d..cf7e4b24288 100644
--- a/source/blender/blenkernel/BKE_depsgraph.h
+++ b/source/blender/blenkernel/BKE_depsgraph.h
@@ -46,37 +46,37 @@ struct GHash;
/* **** DAG relation types *** */
- /* scene link to object */
-#define DAG_RL_SCENE (1<<0)
- /* object link to data */
-#define DAG_RL_DATA (1<<1)
+/* scene link to object */
+#define DAG_RL_SCENE (1 << 0)
+/* object link to data */
+#define DAG_RL_DATA (1 << 1)
- /* object changes object (parent, track, constraints) */
-#define DAG_RL_OB_OB (1<<2)
- /* object changes obdata (hooks, constraints) */
-#define DAG_RL_OB_DATA (1<<3)
- /* data changes object (vertex parent) */
-#define DAG_RL_DATA_OB (1<<4)
- /* data changes data (deformers) */
-#define DAG_RL_DATA_DATA (1<<5)
+/* object changes object (parent, track, constraints) */
+#define DAG_RL_OB_OB (1 << 2)
+/* object changes obdata (hooks, constraints) */
+#define DAG_RL_OB_DATA (1 << 3)
+/* data changes object (vertex parent) */
+#define DAG_RL_DATA_OB (1 << 4)
+/* data changes data (deformers) */
+#define DAG_RL_DATA_DATA (1 << 5)
-#define DAG_NO_RELATION (1<<6)
+#define DAG_NO_RELATION (1 << 6)
-#define DAG_RL_ALL_BUT_DATA (DAG_RL_SCENE|DAG_RL_OB_OB|DAG_RL_OB_DATA|DAG_RL_DATA_OB|DAG_RL_DATA_DATA)
-#define DAG_RL_ALL (DAG_RL_ALL_BUT_DATA|DAG_RL_DATA)
+#define DAG_RL_ALL_BUT_DATA (DAG_RL_SCENE | DAG_RL_OB_OB | DAG_RL_OB_DATA | DAG_RL_DATA_OB | DAG_RL_DATA_DATA)
+#define DAG_RL_ALL (DAG_RL_ALL_BUT_DATA | DAG_RL_DATA)
-typedef void (*graph_action_func)(void * ob, void **data);
+typedef void (*graph_action_func)(void *ob, void **data);
// queues are returned by all BFS & DFS queries
// opaque type
-void *pop_ob_queue(struct DagNodeQueue *queue);
-int queue_count(struct DagNodeQueue *queue);
-void queue_delete(struct DagNodeQueue *queue);
+void *pop_ob_queue(struct DagNodeQueue *queue);
+int queue_count(struct DagNodeQueue *queue);
+void queue_delete(struct DagNodeQueue *queue);
// queries
-struct DagForest *build_dag(struct Main *bmain, struct Scene *sce, short mask);
-void free_forest(struct DagForest *Dag);
+struct DagForest *build_dag(struct Main *bmain, struct Scene *sce, short mask);
+void free_forest(struct DagForest *Dag);
// note :
// the meanings of the 2 returning values is a bit different :
@@ -88,49 +88,49 @@ int pre_and_post_DFS(struct DagForest *dag, short mask, graph_action_func pre_fu
int pre_and_post_source_BFS(struct DagForest *dag, short mask, struct DagNode *source, graph_action_func pre_func, graph_action_func post_func, void **data);
int pre_and_post_source_DFS(struct DagForest *dag, short mask, struct DagNode *source, graph_action_func pre_func, graph_action_func post_func, void **data);
-struct DagNodeQueue *get_obparents(struct DagForest *dag, void *ob);
-struct DagNodeQueue *get_first_ancestors(struct DagForest *dag, void *ob);
-struct DagNodeQueue *get_all_childs(struct DagForest *dag, void *ob); //
-short are_obs_related(struct DagForest *dag, void *ob1, void *ob2);
-int is_acyclic(struct DagForest *dag); //
+struct DagNodeQueue *get_obparents(struct DagForest *dag, void *ob);
+struct DagNodeQueue *get_first_ancestors(struct DagForest *dag, void *ob);
+struct DagNodeQueue *get_all_childs(struct DagForest *dag, void *ob);
+short are_obs_related(struct DagForest *dag, void *ob1, void *ob2);
+int is_acyclic(struct DagForest *dag);
//int get_cycles(struct DagForest *dag, struct DagNodeQueue **queues, int *count); //
/* ********** API *************** */
/* Note that the DAG never executes changes in Objects, only sets flags in Objects */
- /* (re)-create dependency graph for scene */
-void DAG_scene_sort(struct Main *bmain, struct Scene *sce);
-
- /* flag all objects that need recalc because they're animated */
-void DAG_scene_update_flags(struct Main *bmain, struct Scene *sce, unsigned int lay, const short do_time);
- /* flushes all recalc flags in objects down the dependency tree */
-void DAG_scene_flush_update(struct Main *bmain, struct Scene *sce, unsigned int lay, const short do_time);
- /* tag objects for update on file load */
-void DAG_on_visible_update(struct Main *bmain, const short do_time);
-
- /* when setting manual RECALC flags, call this afterwards */
-void DAG_ids_flush_update(struct Main *bmain, int time);
-
- /* tag datablock to get updated for the next redraw */
-void DAG_id_tag_update(struct ID *id, short flag);
- /* flush all tagged updates */
-void DAG_ids_flush_tagged(struct Main *bmain);
- /* check and clear ID recalc flags */
-void DAG_ids_check_recalc(struct Main *bmain, struct Scene *scene, int time);
-void DAG_ids_clear_recalc(struct Main *bmain);
- /* test if any of this id type is tagged for update */
-void DAG_id_type_tag(struct Main *bmain, short idtype);
-int DAG_id_type_tagged(struct Main *bmain, short idtype);
-
- /* (re)-create dependency graph for armature pose */
-void DAG_pose_sort(struct Object *ob);
-
- /* callback for editors module to do updates */
-void DAG_editors_update_cb(void (*id_func)(struct Main *bmain, struct ID *id),
+/* (re)-create dependency graph for scene */
+void DAG_scene_sort(struct Main *bmain, struct Scene *sce);
+
+/* flag all objects that need recalc because they're animated */
+void DAG_scene_update_flags(struct Main *bmain, struct Scene *sce, unsigned int lay, const short do_time);
+/* flushes all recalc flags in objects down the dependency tree */
+void DAG_scene_flush_update(struct Main *bmain, struct Scene *sce, unsigned int lay, const short do_time);
+/* tag objects for update on file load */
+void DAG_on_visible_update(struct Main *bmain, const short do_time);
+
+/* when setting manual RECALC flags, call this afterwards */
+void DAG_ids_flush_update(struct Main *bmain, int time);
+
+/* tag datablock to get updated for the next redraw */
+void DAG_id_tag_update(struct ID *id, short flag);
+/* flush all tagged updates */
+void DAG_ids_flush_tagged(struct Main *bmain);
+/* check and clear ID recalc flags */
+void DAG_ids_check_recalc(struct Main *bmain, struct Scene *scene, int time);
+void DAG_ids_clear_recalc(struct Main *bmain);
+/* test if any of this id type is tagged for update */
+void DAG_id_type_tag(struct Main *bmain, short idtype);
+int DAG_id_type_tagged(struct Main *bmain, short idtype);
+
+/* (re)-create dependency graph for armature pose */
+void DAG_pose_sort(struct Object *ob);
+
+/* callback for editors module to do updates */
+void DAG_editors_update_cb(void (*id_func)(struct Main *bmain, struct ID *id),
void (*scene_func)(struct Main *bmain, struct Scene *scene, int updated));
- /* debugging */
-void DAG_print_dependencies(struct Main *bmain, struct Scene *scene, struct Object *ob);
+/* debugging */
+void DAG_print_dependencies(struct Main *bmain, struct Scene *scene, struct Object *ob);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h
index cb8ddbf0b00..758a2a8a2e8 100644
--- a/source/blender/blenkernel/BKE_displist.h
+++ b/source/blender/blenkernel/BKE_displist.h
@@ -42,13 +42,13 @@
#define DL_INDEX3 4
#define DL_INDEX4 5
#define DL_VERTCOL 6
-#define DL_VERTS 7
+#define DL_VERTS 7
/* dl->flag */
-#define DL_CYCL_U 1
-#define DL_CYCL_V 2
-#define DL_FRONT_CURVE 4
-#define DL_BACK_CURVE 8
+#define DL_CYCL_U 1
+#define DL_CYCL_V 2
+#define DL_FRONT_CURVE 4
+#define DL_BACK_CURVE 8
/* prototypes */
@@ -73,7 +73,7 @@ typedef struct DispList {
int *index;
unsigned int *col1, *col2;
int charidx;
- int totindex; /* indexed array drawing surfaces */
+ int totindex; /* indexed array drawing surfaces */
unsigned int *bevelSplitFlag;
} DispList;
diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h
index 59f8864bb21..ffce16f39ff 100644
--- a/source/blender/blenkernel/BKE_dynamicpaint.h
+++ b/source/blender/blenkernel/BKE_dynamicpaint.h
@@ -64,7 +64,7 @@ typedef struct PaintWavePoint {
} PaintWavePoint;
struct DerivedMesh *dynamicPaint_Modifier_do(struct DynamicPaintModifierData *pmd, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm);
-void dynamicPaint_Modifier_free (struct DynamicPaintModifierData *pmd);
+void dynamicPaint_Modifier_free(struct DynamicPaintModifierData *pmd);
void dynamicPaint_Modifier_copy(struct DynamicPaintModifierData *pmd, struct DynamicPaintModifierData *tsmd);
int dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, struct Scene *scene);
@@ -87,7 +87,7 @@ struct DynamicPaintSurface *get_activeSurface(struct DynamicPaintCanvasSettings
/* image sequence baking */
int dynamicPaint_createUVSurface(struct DynamicPaintSurface *surface);
int dynamicPaint_calculateFrame(struct DynamicPaintSurface *surface, struct Scene *scene, struct Object *cObject, int frame);
-void dynamicPaint_outputSurfaceImage(struct DynamicPaintSurface *surface, char* filename, short output_layer);
+void dynamicPaint_outputSurfaceImage(struct DynamicPaintSurface *surface, char *filename, short output_layer);
/* PaintPoint state */
#define DPAINT_PAINT_NONE -1
diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h
index bb17c891020..e9d37fb4407 100644
--- a/source/blender/blenkernel/BKE_effect.h
+++ b/source/blender/blenkernel/BKE_effect.h
@@ -52,7 +52,7 @@ struct PartDeflect *object_add_collision_fields(int type);
typedef struct EffectedPoint {
float *loc;
float *vel;
- float *ave; /* angular velocity for particles with dynamic rotation */
+ float *ave; /* angular velocity for particles with dynamic rotation */
float *rot; /* rotation quaternion for particles with dynamic rotation */
float vel_to_frame;
float vel_to_sec;
@@ -63,7 +63,7 @@ typedef struct EffectedPoint {
unsigned int flag;
int index;
- struct ParticleSystem *psys; /* particle system the point belongs to */
+ struct ParticleSystem *psys; /* particle system the point belongs to */
} EffectedPoint;
typedef struct GuideEffectorData {
@@ -86,7 +86,7 @@ typedef struct EffectorData {
/* only for vortex effector with surface falloff */
float nor2[3], vec_to_point2[3];
- int *index; /* point index */
+ int *index; /* point index */
} EffectorData;
/* used for calculating the effector force */
@@ -109,10 +109,10 @@ typedef struct EffectorCache {
int flag;
} EffectorCache;
-void free_partdeflect(struct PartDeflect *pd);
+void free_partdeflect(struct PartDeflect *pd);
struct ListBase *pdInitEffectors(struct Scene *scene, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights);
-void pdEndEffectors(struct ListBase **effectors);
-void pdDoEffectors(struct ListBase *effectors, struct ListBase *colliders, struct EffectorWeights *weights, struct EffectedPoint *point, float *force, float *impulse);
+void pdEndEffectors(struct ListBase **effectors);
+void pdDoEffectors(struct ListBase *effectors, struct ListBase *colliders, struct EffectorWeights *weights, struct EffectedPoint *point, float *force, float *impulse);
void pd_point_from_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleKey *state, struct EffectedPoint *point);
void pd_point_from_loc(struct Scene *scene, float *loc, float *vel, int index, struct EffectedPoint *point);
@@ -120,7 +120,7 @@ void pd_point_from_soft(struct Scene *scene, float *loc, float *vel, int index,
/* needed for boids */
float effector_falloff(struct EffectorCache *eff, struct EffectorData *efd, struct EffectedPoint *point, struct EffectorWeights *weights);
-int closest_point_on_surface(SurfaceModifierData *surmd, const float co[3], float surface_co[3], float surface_nor[3], float surface_vel[3]);
+int closest_point_on_surface(SurfaceModifierData * surmd, const float co[3], float surface_co[3], float surface_nor[3], float surface_vel[3]);
int get_effector_data(struct EffectorCache *eff, struct EffectorData *efd, struct EffectedPoint *point, int real_velocity);
/* required for particle_system.c */
@@ -128,12 +128,12 @@ int get_effector_data(struct EffectorCache *eff, struct EffectorData *efd, struc
//float effector_falloff(struct EffectorData *eff, struct EffectorPoint *point, struct EffectorWeights *weights);
/* EffectedPoint->flag */
-#define PE_WIND_AS_SPEED 1
-#define PE_DYNAMIC_ROTATION 2
-#define PE_USE_NORMAL_DATA 4
+#define PE_WIND_AS_SPEED 1
+#define PE_DYNAMIC_ROTATION 2
+#define PE_USE_NORMAL_DATA 4
/* EffectorData->flag */
-#define PE_VELOCITY_TO_IMPULSE 1
+#define PE_VELOCITY_TO_IMPULSE 1
#endif
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h
index b615ac60c3e..9dae38d0a65 100644
--- a/source/blender/blenkernel/BKE_fcurve.h
+++ b/source/blender/blenkernel/BKE_fcurve.h
@@ -70,15 +70,15 @@ void bezt_add_to_cfra_elem(ListBase *lb, struct BezTriple *bezt);
/* convenience looper over ALL driver targets for a given variable (even the unused ones) */
#define DRIVER_TARGETS_LOOPER(dvar) \
{ \
- DriverTarget *dtar= &dvar->targets[0]; \
- int tarIndex= 0; \
+ DriverTarget *dtar = &dvar->targets[0]; \
+ int tarIndex = 0; \
for (; tarIndex < MAX_DRIVER_TARGETS; tarIndex++, dtar++)
/* convenience looper over USED driver targets only */
#define DRIVER_TARGETS_USED_LOOPER(dvar) \
{ \
- DriverTarget *dtar= &dvar->targets[0]; \
- int tarIndex= 0; \
+ DriverTarget *dtar = &dvar->targets[0]; \
+ int tarIndex = 0; \
for (; tarIndex < dvar->num_targets; tarIndex++, dtar++)
/* tidy up for driver targets loopers */
@@ -94,7 +94,7 @@ void driver_free_variable(struct ChannelDriver *driver, struct DriverVar *dvar);
void driver_change_variable_type(struct DriverVar *dvar, int type);
struct DriverVar *driver_add_new_variable(struct ChannelDriver *driver);
-float driver_get_variable_value (struct ChannelDriver *driver, struct DriverVar *dvar);
+float driver_get_variable_value(struct ChannelDriver *driver, struct DriverVar *dvar);
/* ************** F-Curve Modifiers *************** */
@@ -111,52 +111,52 @@ float driver_get_variable_value (struct ChannelDriver *driver, struct DriverVar
*/
typedef struct FModifierTypeInfo {
/* admin/ident */
- short type; /* FMODIFIER_TYPE_### */
- short size; /* size in bytes of the struct */
- short acttype; /* eFMI_Action_Types */
- short requires; /* eFMI_Requirement_Flags */
- char name[64]; /* name of modifier in interface */
- char structName[64]; /* name of struct for SDNA */
+ short type; /* FMODIFIER_TYPE_### */
+ short size; /* size in bytes of the struct */
+ short acttype; /* eFMI_Action_Types */
+ short requires; /* eFMI_Requirement_Flags */
+ char name[64]; /* name of modifier in interface */
+ char structName[64]; /* name of struct for SDNA */
/* data management function pointers - special handling */
- /* free any data that is allocated separately (optional) */
+ /* free any data that is allocated separately (optional) */
void (*free_data)(struct FModifier *fcm);
- /* copy any special data that is allocated separately (optional) */
+ /* copy any special data that is allocated separately (optional) */
void (*copy_data)(struct FModifier *fcm, struct FModifier *src);
- /* set settings for data that will be used for FCuModifier.data (memory already allocated using MEM_callocN) */
+ /* set settings for data that will be used for FCuModifier.data (memory already allocated using MEM_callocN) */
void (*new_data)(void *mdata);
- /* verifies that the modifier settings are valid */
+ /* verifies that the modifier settings are valid */
void (*verify_data)(struct FModifier *fcm);
/* evaluation */
- /* evaluate time that the modifier requires the F-Curve to be evaluated at */
+ /* evaluate time that the modifier requires the F-Curve to be evaluated at */
float (*evaluate_modifier_time)(struct FCurve *fcu, struct FModifier *fcm, float cvalue, float evaltime);
- /* evaluate the modifier for the given time and 'accumulated' value */
+ /* evaluate the modifier for the given time and 'accumulated' value */
void (*evaluate_modifier)(struct FCurve *fcu, struct FModifier *fcm, float *cvalue, float evaltime);
} FModifierTypeInfo;
/* Values which describe the behavior of a FModifier Type */
typedef enum eFMI_Action_Types {
- /* modifier only modifies values outside of data range */
+ /* modifier only modifies values outside of data range */
FMI_TYPE_EXTRAPOLATION = 0,
- /* modifier leaves data-points alone, but adjusts the interpolation between and around them */
+ /* modifier leaves data-points alone, but adjusts the interpolation between and around them */
FMI_TYPE_INTERPOLATION,
- /* modifier only modifies the values of points (but times stay the same) */
+ /* modifier only modifies the values of points (but times stay the same) */
FMI_TYPE_REPLACE_VALUES,
- /* modifier generates a curve regardless of what came before */
+ /* modifier generates a curve regardless of what came before */
FMI_TYPE_GENERATE_CURVE
} eFMI_Action_Types;
/* Flags for the requirements of a FModifier Type */
typedef enum eFMI_Requirement_Flags {
- /* modifier requires original data-points (kindof beats the purpose of a modifier stack?) */
- FMI_REQUIRES_ORIGINAL_DATA = (1<<0),
- /* modifier doesn't require on any preceding data (i.e. it will generate a curve).
- * Use in conjunction with FMI_TYPE_GENRATE_CURVE
- */
- FMI_REQUIRES_NOTHING = (1<<1),
- /* refer to modifier instance */
- FMI_REQUIRES_RUNTIME_CHECK = (1<<2)
+ /* modifier requires original data-points (kindof beats the purpose of a modifier stack?) */
+ FMI_REQUIRES_ORIGINAL_DATA = (1 << 0),
+ /* modifier doesn't require on any preceding data (i.e. it will generate a curve).
+ * Use in conjunction with FMI_TYPE_GENRATE_CURVE
+ */
+ FMI_REQUIRES_NOTHING = (1 << 1),
+ /* refer to modifier instance */
+ FMI_REQUIRES_RUNTIME_CHECK = (1 << 2)
} eFMI_Requirement_Flags;
/* Function Prototypes for FModifierTypeInfo's */
@@ -194,7 +194,7 @@ void copy_fcurves(ListBase *dst, ListBase *src);
/* find matching F-Curve in the given list of F-Curves */
struct FCurve *list_find_fcurve(ListBase *list, const char rna_path[], const int array_index);
-struct FCurve *iter_step_fcurve (struct FCurve *fcu_iter, const char rna_path[]);
+struct FCurve *iter_step_fcurve(struct FCurve *fcu_iter, const char rna_path[]);
/* high level function to get an fcurve from C without having the rna */
struct FCurve *id_data_find_fcurve(ID *id, void *data, struct StructRNA *type, const char *prop_name, int index, char *driven);
diff --git a/source/blender/blenkernel/BKE_fluidsim.h b/source/blender/blenkernel/BKE_fluidsim.h
index c2b1b1d6cad..c3fa6621c98 100644
--- a/source/blender/blenkernel/BKE_fluidsim.h
+++ b/source/blender/blenkernel/BKE_fluidsim.h
@@ -42,9 +42,9 @@ struct MVert;
/* old interface */
void initElbeemMesh(struct Scene *scene, struct Object *ob,
- int *numVertices, float **vertices,
- int *numTriangles, int **triangles,
- int useGlobalCoords, int modifierIndex);
+ int *numVertices, float **vertices,
+ int *numTriangles, int **triangles,
+ int useGlobalCoords, int modifierIndex);
/* bounding box & memory estimate */
void fluid_get_bb(struct MVert *mvert, int totvert, float obmat[][4],
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index 950c3c20b9b..593b4afb85c 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -64,8 +64,8 @@ typedef struct Global {
short afbreek, moving, file_loaded;
char background;
char factory_startup;
- short winpos, displaymode; /* used to be in Render */
- short rendering; /* to indicate render is busy, prevent renderwindow events etc */
+ short winpos, displaymode; /* used to be in Render */
+ short rendering; /* to indicate render is busy, prevent renderwindow events etc */
short rt;
int f;
@@ -75,7 +75,7 @@ typedef struct Global {
struct BME_Glob *editBMesh;
/* Frank's variables */
- int save_over;
+ int save_over;
/* Rob's variables (keep here for WM recode) */
int have_quicktime;
@@ -96,12 +96,12 @@ typedef struct Global {
/* **************** GLOBAL ********************* */
/* G.f */
-#define G_RENDER_OGL (1 << 0)
-#define G_SWAP_EXCHANGE (1 << 1)
+#define G_RENDER_OGL (1 << 0)
+#define G_SWAP_EXCHANGE (1 << 1)
/* also uses G_FILE_AUTOPLAY */
/* #define G_RENDER_SHADOW (1 << 3) */ /* temp flag, removed */
-#define G_BACKBUFSEL (1 << 4)
-#define G_PICKSEL (1 << 5)
+#define G_BACKBUFSEL (1 << 4)
+#define G_PICKSEL (1 << 5)
/* #define G_FACESELECT (1 << 8) use (mesh->editflag & ME_EDIT_PAINT_MASK) */
@@ -109,7 +109,7 @@ typedef struct Global {
#define G_SCRIPT_OVERRIDE_PREF (1 << 14) /* when this flag is set ignore the userprefs */
/* #define G_NOFROZEN (1 << 17) also removed */
-/* #define G_GREASEPENCIL (1 << 17) also removed */
+/* #define G_GREASEPENCIL (1 << 17) also removed */
/* #define G_AUTOMATKEYS (1 << 30) also removed */
@@ -130,39 +130,39 @@ enum {
#define G_AUTOPACK (1 << 0)
#define G_FILE_COMPRESS (1 << 1)
#define G_FILE_AUTOPLAY (1 << 2)
-#define G_FILE_ENABLE_ALL_FRAMES (1 << 3) /* deprecated */
-#define G_FILE_SHOW_DEBUG_PROPS (1 << 4) /* deprecated */
-#define G_FILE_SHOW_FRAMERATE (1 << 5) /* deprecated */
+#define G_FILE_ENABLE_ALL_FRAMES (1 << 3) /* deprecated */
+#define G_FILE_SHOW_DEBUG_PROPS (1 << 4) /* deprecated */
+#define G_FILE_SHOW_FRAMERATE (1 << 5) /* deprecated */
/* #define G_FILE_SHOW_PROFILE (1 << 6) */ /* deprecated */
#define G_FILE_LOCK (1 << 7)
#define G_FILE_SIGN (1 << 8)
/* #define G_FILE_PUBLISH (1 << 9) */ /* deprecated */
-#define G_FILE_NO_UI (1 << 10)
+#define G_FILE_NO_UI (1 << 10)
/* #define G_FILE_GAME_TO_IPO (1 << 11) */ /* deprecated */
-#define G_FILE_GAME_MAT (1 << 12) /* deprecated */
+#define G_FILE_GAME_MAT (1 << 12) /* deprecated */
/* #define G_FILE_DISPLAY_LISTS (1 << 13) */ /* deprecated */
-#define G_FILE_SHOW_PHYSICS (1 << 14) /* deprecated */
-#define G_FILE_GAME_MAT_GLSL (1 << 15) /* deprecated */
+#define G_FILE_SHOW_PHYSICS (1 << 14) /* deprecated */
+#define G_FILE_GAME_MAT_GLSL (1 << 15) /* deprecated */
/* #define G_FILE_GLSL_NO_LIGHTS (1 << 16) */ /* deprecated */
-#define G_FILE_GLSL_NO_SHADERS (1 << 17) /* deprecated */
-#define G_FILE_GLSL_NO_SHADOWS (1 << 18) /* deprecated */
-#define G_FILE_GLSL_NO_RAMPS (1 << 19) /* deprecated */
-#define G_FILE_GLSL_NO_NODES (1 << 20) /* deprecated */
-#define G_FILE_GLSL_NO_EXTRA_TEX (1 << 21) /* deprecated */
-#define G_FILE_IGNORE_DEPRECATION_WARNINGS (1 << 22) /* deprecated */
-#define G_FILE_RECOVER (1 << 23)
-#define G_FILE_RELATIVE_REMAP (1 << 24)
-#define G_FILE_HISTORY (1 << 25)
-#define G_FILE_MESH_COMPAT (1 << 26) /* BMesh option to save as older mesh format */
+#define G_FILE_GLSL_NO_SHADERS (1 << 17) /* deprecated */
+#define G_FILE_GLSL_NO_SHADOWS (1 << 18) /* deprecated */
+#define G_FILE_GLSL_NO_RAMPS (1 << 19) /* deprecated */
+#define G_FILE_GLSL_NO_NODES (1 << 20) /* deprecated */
+#define G_FILE_GLSL_NO_EXTRA_TEX (1 << 21) /* deprecated */
+#define G_FILE_IGNORE_DEPRECATION_WARNINGS (1 << 22) /* deprecated */
+#define G_FILE_RECOVER (1 << 23)
+#define G_FILE_RELATIVE_REMAP (1 << 24)
+#define G_FILE_HISTORY (1 << 25)
+#define G_FILE_MESH_COMPAT (1 << 26) /* BMesh option to save as older mesh format */
/* G.windowstate */
-#define G_WINDOWSTATE_USERDEF 0
-#define G_WINDOWSTATE_BORDER 1
-#define G_WINDOWSTATE_FULLSCREEN 2
+#define G_WINDOWSTATE_USERDEF 0
+#define G_WINDOWSTATE_BORDER 1
+#define G_WINDOWSTATE_FULLSCREEN 2
/* ENDIAN_ORDER: indicates what endianness the platform where the file was
* written had. */
-#if !defined( __BIG_ENDIAN__ ) && !defined( __LITTLE_ENDIAN__ )
+#if !defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
# error Either __BIG_ENDIAN__ or __LITTLE_ENDIAN__ must be defined.
#endif
@@ -171,8 +171,8 @@ enum {
# error "Mingw requires GCC 4.6 minimum"
#endif
-#define L_ENDIAN 1
-#define B_ENDIAN 0
+#define L_ENDIAN 1
+#define B_ENDIAN 0
#ifdef __BIG_ENDIAN__
# define ENDIAN_ORDER B_ENDIAN
@@ -181,10 +181,10 @@ enum {
#endif
/* G.moving, signals drawing in (3d) window to denote transform */
-#define G_TRANSFORM_OBJ 1
-#define G_TRANSFORM_EDIT 2
-#define G_TRANSFORM_MANIP 4
-#define G_TRANSFORM_PARTICLE 8
+#define G_TRANSFORM_OBJ 1
+#define G_TRANSFORM_EDIT 2
+#define G_TRANSFORM_MANIP 4
+#define G_TRANSFORM_PARTICLE 8
/* G.special1 */
diff --git a/source/blender/blenkernel/BKE_group.h b/source/blender/blenkernel/BKE_group.h
index ccf9e0cef5b..67cdee9fa07 100644
--- a/source/blender/blenkernel/BKE_group.h
+++ b/source/blender/blenkernel/BKE_group.h
@@ -40,21 +40,21 @@ struct Object;
struct bAction;
struct Scene;
-void BKE_group_free(struct Group *group);
-void BKE_group_unlink(struct Group *group);
+void BKE_group_free(struct Group *group);
+void BKE_group_unlink(struct Group *group);
struct Group *add_group(const char *name);
struct Group *BKE_group_copy(struct Group *group);
-int add_to_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
-int rem_from_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
+int add_to_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
+int rem_from_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
struct Group *find_group(struct Object *ob, struct Group *group);
-int object_in_group(struct Object *ob, struct Group *group);
-int group_is_animated(struct Object *parent, struct Group *group);
+int object_in_group(struct Object *ob, struct Group *group);
+int group_is_animated(struct Object *parent, struct Group *group);
-void group_tag_recalc(struct Group *group);
-void group_handle_recalc_and_update(struct Scene *scene, struct Object *parent, struct Group *group);
+void group_tag_recalc(struct Group *group);
+void group_handle_recalc_and_update(struct Scene *scene, struct Object *parent, struct Group *group);
#if 0 /* UNUSED */
struct Object *group_get_member_with_action(struct Group *group, struct bAction *act);
-void group_relink_nla_objects(struct Object *ob);
+void group_relink_nla_objects(struct Object *ob);
#endif
#endif
diff --git a/source/blender/blenkernel/BKE_icons.h b/source/blender/blenkernel/BKE_icons.h
index e1f8df941cb..ebfbe94802a 100644
--- a/source/blender/blenkernel/BKE_icons.h
+++ b/source/blender/blenkernel/BKE_icons.h
@@ -36,10 +36,9 @@
* Resizable Icons for Blender
*/
-typedef void (*DrawInfoFreeFP) (void *drawinfo);
+typedef void (*DrawInfoFreeFP)(void *drawinfo);
-struct Icon
-{
+struct Icon {
void *drawinfo;
void *obj;
short type;
@@ -54,17 +53,17 @@ struct ID;
void BKE_icons_init(int first_dyn_id);
/* return icon id for library object or create new icon if not found */
-int BKE_icon_getid(struct ID* id);
+int BKE_icon_getid(struct ID *id);
/* retrieve icon for id */
-struct Icon* BKE_icon_get(int icon_id);
+struct Icon *BKE_icon_get(int icon_id);
/* set icon for id if not already defined */
/* used for inserting the internal icons */
-void BKE_icon_set(int icon_id, struct Icon* icon);
+void BKE_icon_set(int icon_id, struct Icon *icon);
/* remove icon and free date if library object becomes invalid */
-void BKE_icon_delete(struct ID* id);
+void BKE_icon_delete(struct ID *id);
/* report changes - icon needs to be recalculated */
void BKE_icon_changed(int icon_id);
@@ -82,12 +81,12 @@ void BKE_previewimg_free(struct PreviewImage **prv);
void BKE_previewimg_free_id(struct ID *id);
/* create a new preview image */
-struct PreviewImage* BKE_previewimg_create(void);
+struct PreviewImage *BKE_previewimg_create(void);
/* create a copy of the preview image */
-struct PreviewImage* BKE_previewimg_copy(struct PreviewImage *prv);
+struct PreviewImage *BKE_previewimg_copy(struct PreviewImage *prv);
/* retrieve existing or create new preview image */
-struct PreviewImage* BKE_previewimg_get(struct ID *id);
+struct PreviewImage *BKE_previewimg_get(struct ID *id);
#endif /* __BKE_ICONS_H__ */
diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h
index 173adcc295b..2436ada9eaf 100644
--- a/source/blender/blenkernel/BKE_idprop.h
+++ b/source/blender/blenkernel/BKE_idprop.h
@@ -77,8 +77,8 @@ void IDP_ResizeArray(struct IDProperty *prop, int newlen);
void IDP_FreeArray(struct IDProperty *prop);
/* ---------- String Type ------------ */
-IDProperty *IDP_NewString(const char *st, const char *name, int maxlen);/* maxlen excludes '\0' */
-void IDP_AssignString(struct IDProperty *prop, const char *st, int maxlen); /* maxlen excludes '\0' */
+IDProperty *IDP_NewString(const char *st, const char *name, int maxlen); /* maxlen excludes '\0' */
+void IDP_AssignString(struct IDProperty *prop, const char *st, int maxlen); /* maxlen excludes '\0' */
void IDP_ConcatStringC(struct IDProperty *prop, const char *st);
void IDP_ConcatString(struct IDProperty *str1, struct IDProperty *append);
void IDP_FreeString(struct IDProperty *prop);
@@ -122,7 +122,7 @@ 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. */
int IDP_InsertToGroup(struct IDProperty *group, struct IDProperty *previous,
- struct IDProperty *pnew);
+ struct IDProperty *pnew);
/** \note this does not free the property!!
*
@@ -201,10 +201,10 @@ void IDP_FreeProperty(struct IDProperty *prop);
void IDP_UnlinkProperty(struct IDProperty *prop);
#define IDP_Int(prop) ((prop)->data.val)
-#define IDP_Float(prop) (*(float*)&(prop)->data.val)
-#define IDP_String(prop) ((char*)(prop)->data.pointer)
+#define IDP_Float(prop) (*(float *)&(prop)->data.val)
+#define IDP_String(prop) ((char *)(prop)->data.pointer)
#define IDP_Array(prop) ((prop)->data.pointer)
-#define IDP_IDPArray(prop) ((IDProperty*)(prop)->data.pointer)
-#define IDP_Double(prop) (*(double*)&(prop)->data.val)
+#define IDP_IDPArray(prop) ((IDProperty *)(prop)->data.pointer)
+#define IDP_Double(prop) (*(double *)&(prop)->data.val)
#endif /* __BKE_IDPROP_H__ */
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index 563f066bda6..97b724c09e4 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -46,25 +46,25 @@ struct Object;
struct ImageFormatData;
/* call from library */
-void BKE_image_free(struct Image *me);
+void BKE_image_free(struct Image *me);
-void BKE_imbuf_stamp_info(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf);
-void BKE_stamp_buf(struct Scene *scene, struct Object *camera, unsigned char *rect, float *rectf, int width, int height, int channels);
-int BKE_imbuf_alpha_test(struct ImBuf *ibuf);
-int BKE_imbuf_write_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
-int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
+void BKE_imbuf_stamp_info(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf);
+void BKE_stamp_buf(struct Scene *scene, struct Object *camera, unsigned char *rect, float *rectf, int width, int height, int channels);
+int BKE_imbuf_alpha_test(struct ImBuf *ibuf);
+int BKE_imbuf_write_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
+int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
int BKE_imbuf_write_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const short is_copy);
-void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames);
-int BKE_add_image_extension(char *string, const char imtype);
-char BKE_ftype_to_imtype(const int ftype);
-int BKE_imtype_to_ftype(const char imtype);
-
-int BKE_imtype_is_movie(const char imtype);
-int BKE_imtype_supports_zbuf(const char imtype);
-int BKE_imtype_supports_compress(const char imtype);
-int BKE_imtype_supports_quality(const char imtype);
+void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames);
+int BKE_add_image_extension(char *string, const char imtype);
+char BKE_ftype_to_imtype(const int ftype);
+int BKE_imtype_to_ftype(const char imtype);
+
+int BKE_imtype_is_movie(const char imtype);
+int BKE_imtype_supports_zbuf(const char imtype);
+int BKE_imtype_supports_compress(const char imtype);
+int BKE_imtype_supports_quality(const char imtype);
char BKE_imtype_valid_channels(const char imtype);
-char BKE_imtype_valid_depths(const char imtype);
+char BKE_imtype_valid_depths(const char imtype);
char BKE_imtype_from_arg(const char *arg);
@@ -72,12 +72,12 @@ void BKE_imformat_defaults(struct ImageFormatData *im_format);
struct anim *openanim(const char *name, int flags, int streamindex);
-void BKE_image_de_interlace(struct Image *ima, int odd);
+void BKE_image_de_interlace(struct Image *ima, int odd);
-void BKE_image_make_local(struct Image *ima);
+void BKE_image_make_local(struct Image *ima);
-void BKE_image_tag_time(struct Image *ima);
-void free_old_images(void);
+void BKE_image_tag_time(struct Image *ima);
+void free_old_images(void);
/* ********************************** NEW IMAGE API *********************** */
@@ -88,34 +88,34 @@ struct RenderPass;
struct RenderResult;
/* ima->source; where image comes from */
-#define IMA_SRC_CHECK 0
-#define IMA_SRC_FILE 1
-#define IMA_SRC_SEQUENCE 2
-#define IMA_SRC_MOVIE 3
-#define IMA_SRC_GENERATED 4
-#define IMA_SRC_VIEWER 5
+#define IMA_SRC_CHECK 0
+#define IMA_SRC_FILE 1
+#define IMA_SRC_SEQUENCE 2
+#define IMA_SRC_MOVIE 3
+#define IMA_SRC_GENERATED 4
+#define IMA_SRC_VIEWER 5
/* ima->type, how to handle/generate it */
-#define IMA_TYPE_IMAGE 0
-#define IMA_TYPE_MULTILAYER 1
- /* generated */
-#define IMA_TYPE_UV_TEST 2
- /* viewers */
+#define IMA_TYPE_IMAGE 0
+#define IMA_TYPE_MULTILAYER 1
+/* generated */
+#define IMA_TYPE_UV_TEST 2
+/* viewers */
#define IMA_TYPE_R_RESULT 4
-#define IMA_TYPE_COMPOSITE 5
+#define IMA_TYPE_COMPOSITE 5
/* ima->ok */
-#define IMA_OK 1
-#define IMA_OK_LOADED 2
+#define IMA_OK 1
+#define IMA_OK_LOADED 2
/* signals */
- /* reload only frees, doesn't read until image_get_ibuf() called */
-#define IMA_SIGNAL_RELOAD 0
-#define IMA_SIGNAL_FREE 1
- /* source changes, from image to sequence or movie, etc */
-#define IMA_SIGNAL_SRC_CHANGE 5
- /* image-user gets a new image, check settings */
-#define IMA_SIGNAL_USER_NEW_IMAGE 6
+/* reload only frees, doesn't read until image_get_ibuf() called */
+#define IMA_SIGNAL_RELOAD 0
+#define IMA_SIGNAL_FREE 1
+/* source changes, from image to sequence or movie, etc */
+#define IMA_SIGNAL_SRC_CHANGE 5
+/* image-user gets a new image, check settings */
+#define IMA_SIGNAL_USER_NEW_IMAGE 6
#define IMA_CHAN_FLAG_BW 1
#define IMA_CHAN_FLAG_RGB 2
@@ -164,10 +164,10 @@ void BKE_image_release_renderresult(struct Scene *scene, struct Image *ima);
void BKE_image_backup_render(struct Scene *scene, struct Image *ima);
/* goes over all textures that use images */
-void BKE_image_free_all_textures(void);
+void BKE_image_free_all_textures(void);
/* does one image! */
-void BKE_image_free_anim_ibufs(struct Image *ima, int except_frame);
+void BKE_image_free_anim_ibufs(struct Image *ima, int except_frame);
/* does all images with type MOVIE or SEQUENCE */
void BKE_image_all_free_anim_ibufs(int except_frame);
diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h
index 757952515e5..4240ef16100 100644
--- a/source/blender/blenkernel/BKE_key.h
+++ b/source/blender/blenkernel/BKE_key.h
@@ -63,7 +63,7 @@ float *do_ob_key(struct Scene *scene, struct Object *ob);
struct Key *ob_get_key(struct Object *ob);
struct KeyBlock *add_keyblock(struct Key *key, const char *name);
-struct KeyBlock *add_keyblock_ctime(struct Key *key, const char * name, const short do_force);
+struct KeyBlock *add_keyblock_ctime(struct Key *key, const char *name, const short do_force);
struct KeyBlock *ob_get_keyblock(struct Object *ob);
struct KeyBlock *ob_get_reference_keyblock(struct Object *ob);
struct KeyBlock *key_get_keyblock(struct Key *key, int index);
diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h
index 9a952fc6b1e..31626ef4a58 100644
--- a/source/blender/blenkernel/BKE_lattice.h
+++ b/source/blender/blenkernel/BKE_lattice.h
@@ -73,7 +73,7 @@ float (*BKE_lattice_vertexcos_get(struct Object *ob, int *numVerts_r))[3];
void BKE_lattice_vertexcos_apply(struct Object *ob, float (*vertexCos)[3]);
void BKE_lattice_modifiers_calc(struct Scene *scene, struct Object *ob);
-struct MDeformVert* BKE_lattice_deform_verts_get(struct Object *lattice);
+struct MDeformVert *BKE_lattice_deform_verts_get(struct Object *lattice);
#endif
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index 2804eb407db..3a19d6c9007 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -66,7 +66,7 @@ void id_clear_lib_data(struct Main *bmain, struct ID *id);
struct ListBase *which_libbase(struct Main *mainlib, short type);
-#define MAX_LIBARRAY 40
+#define MAX_LIBARRAY 40
int set_listbasepointers(struct Main *main, struct ListBase **lb);
void BKE_libblock_free(struct ListBase *lb, void *idv);
@@ -86,7 +86,7 @@ struct ID *BKE_libblock_find_name(const short type, const char *name);
void clear_id_newpoins(void);
void IDnames_to_pupstring(const char **str, const char *title, const char *extraops,
- struct ListBase *lb, struct ID* link, short *nr);
+ struct ListBase *lb, struct ID *link, short *nr);
void IMAnames_to_pupstring(const char **str, const char *title, const char *extraops,
struct ListBase *lb, struct ID *link, short *nr);
diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h
index ffcbb6e40bc..09c91a59ac5 100644
--- a/source/blender/blenkernel/BKE_main.h
+++ b/source/blender/blenkernel/BKE_main.h
@@ -53,7 +53,7 @@ typedef struct Main {
char name[1024]; /* 1024 = FILE_MAX */
short versionfile, subversionfile;
short minversionfile, minsubversionfile;
- int revision; /* svn revision of binary that saved file */
+ int revision; /* svn revision of binary that saved file */
struct Library *curlib;
ListBase scene;
@@ -68,7 +68,7 @@ typedef struct Main {
ListBase latt;
ListBase lamp;
ListBase camera;
- ListBase ipo; // XXX depreceated
+ ListBase ipo; // XXX depreceated
ListBase key;
ListBase world;
ListBase screen;
diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h
index 801724d1d4f..8aa25a235a8 100644
--- a/source/blender/blenkernel/BKE_material.h
+++ b/source/blender/blenkernel/BKE_material.h
@@ -90,7 +90,7 @@ void end_render_materials(struct Main *);
int material_in_material(struct Material *parmat, struct Material *mat);
-void ramp_blend(int type, float r_col[3], const float fac, const float col[3]);
+void ramp_blend(int type, float r_col[3], const float fac, const float col[3]);
/* copy/paste */
void clear_matcopybuf(void);
@@ -106,4 +106,3 @@ int do_version_tface(struct Main *main, int fileload);
#endif
#endif
-
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index bdadce2c7c7..62ba85ae937 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -164,14 +164,14 @@ void BKE_mesh_strip_loose_faces(struct Mesh *me); /* Needed for compatibility (s
void BKE_mesh_strip_loose_polysloops(struct Mesh *me);
void BKE_mesh_strip_loose_edges(struct Mesh *me);
- /* Calculate vertex and face normals, face normals are returned in *faceNors_r if non-NULL
- * and vertex normals are stored in actual mverts.
- */
+/* Calculate vertex and face normals, face normals are returned in *faceNors_r if non-NULL
+ * and vertex normals are stored in actual mverts.
+ */
void BKE_mesh_calc_normals_mapping(
struct MVert *mverts, int numVerts,
struct MLoop *mloop, struct MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
struct MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3]);
- /* extended version of 'BKE_mesh_calc_normals' with option not to calc vertex normals */
+/* extended version of 'BKE_mesh_calc_normals' with option not to calc vertex normals */
void BKE_mesh_calc_normals_mapping_ex(
struct MVert *mverts, int numVerts,
struct MLoop *mloop, struct MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
@@ -183,15 +183,15 @@ void BKE_mesh_calc_normals(
struct MLoop *mloop, struct MPoly *mpolys,
int numLoops, int numPolys, float (*polyNors_r)[3]);
- /* Return a newly MEM_malloc'd array of all the mesh vertex locations
- * (_numVerts_r_ may be NULL) */
+/* Return a newly MEM_malloc'd array of all the mesh vertex locations
+ * (_numVerts_r_ may be NULL) */
float (*mesh_getVertexCos(struct Mesh *me, int *numVerts_r))[3];
/* map from uv vertex to face (for select linked, stitch, uv suburf) */
/* UvVertMap */
-#define STD_UV_CONNECT_LIMIT 0.0001f
+#define STD_UV_CONNECT_LIMIT 0.0001f
typedef struct UvVertMap {
struct UvMapVert **vert;
@@ -271,9 +271,9 @@ void create_vert_edge_map(struct ListBase **map, IndexNode **mem, const struct M
/* vertex level transformations & checks (no derived mesh) */
-int BKE_mesh_minmax(struct Mesh *me, float r_min[3], float r_max[3]);
-int BKE_mesh_center_median(struct Mesh *me, float cent[3]);
-int BKE_mesh_center_bounds(struct Mesh *me, float cent[3]);
+int BKE_mesh_minmax(struct Mesh *me, float r_min[3], float r_max[3]);
+int BKE_mesh_center_median(struct Mesh *me, float cent[3]);
+int BKE_mesh_center_bounds(struct Mesh *me, float cent[3]);
void BKE_mesh_translate(struct Mesh *me, float offset[3], int do_keys);
/* mesh_validate.c */
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index db57d411f31..551a31509a3 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -31,7 +31,7 @@
* \ingroup bke
*/
-#include "DNA_modifier_types.h" /* needed for all enum typdefs */
+#include "DNA_modifier_types.h" /* needed for all enum typdefs */
#include "BKE_customdata.h"
struct ID;
@@ -73,10 +73,10 @@ typedef enum {
} ModifierTypeType;
typedef enum {
- eModifierTypeFlag_AcceptsMesh = (1<<0),
- eModifierTypeFlag_AcceptsCVs = (1<<1),
- eModifierTypeFlag_SupportsMapping = (1<<2),
- eModifierTypeFlag_SupportsEditmode = (1<<3),
+ eModifierTypeFlag_AcceptsMesh = (1 << 0),
+ eModifierTypeFlag_AcceptsCVs = (1 << 1),
+ eModifierTypeFlag_SupportsMapping = (1 << 2),
+ eModifierTypeFlag_SupportsEditmode = (1 << 3),
/* For modifiers that support editmode this determines if the
* modifier should be enabled by default in editmode. This should
@@ -84,25 +84,25 @@ typedef enum {
* also generally used in editmode, otherwise let the user enable
* it by hand.
*/
- eModifierTypeFlag_EnableInEditmode = (1<<4),
+ eModifierTypeFlag_EnableInEditmode = (1 << 4),
/* For modifiers that require original data and so cannot
* be placed after any non-deformative modifier.
*/
- eModifierTypeFlag_RequiresOriginalData = (1<<5),
+ 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),
+ eModifierTypeFlag_UsesPointCache = (1 << 6),
/* For physics modifiers, max one per type */
- eModifierTypeFlag_Single = (1<<7),
+ eModifierTypeFlag_Single = (1 << 7),
/* Some modifier can't be added manually by user */
- eModifierTypeFlag_NoUserAdd = (1<<8),
+ eModifierTypeFlag_NoUserAdd = (1 << 8),
/* For modifiers that use CD_PREVIEW_MCOL for preview. */
- eModifierTypeFlag_UsesPreview = (1<<9)
+ eModifierTypeFlag_UsesPreview = (1 << 9)
} ModifierTypeFlag;
typedef void (*ObjectWalkFunc)(void *userData, struct Object *ob, struct Object **obpoin);
@@ -146,28 +146,25 @@ typedef struct ModifierTypeInfo {
* and otherwise the ob argument.
*/
void (*deformVerts)(struct ModifierData *md, struct Object *ob,
- struct DerivedMesh *derivedData,
- float (*vertexCos)[3], int numVerts,
- ModifierApplyFlag flag);
+ struct DerivedMesh *derivedData,
+ float (*vertexCos)[3], int numVerts,
+ ModifierApplyFlag flag);
/* Like deformMatricesEM but called from object mode (for supporting modifiers in sculpt mode) */
- void (*deformMatrices)(
- struct ModifierData *md, struct Object *ob,
- struct DerivedMesh *derivedData,
- float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
+ void (*deformMatrices)(struct ModifierData *md, struct Object *ob,
+ struct DerivedMesh *derivedData,
+ float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
/* Like deformVerts but called during editmode (for supporting modifiers)
*/
- void (*deformVertsEM)(
- struct ModifierData *md, struct Object *ob,
- struct BMEditMesh *editData, struct DerivedMesh *derivedData,
- float (*vertexCos)[3], int numVerts);
+ void (*deformVertsEM)(struct ModifierData *md, struct Object *ob,
+ struct BMEditMesh *editData, struct DerivedMesh *derivedData,
+ float (*vertexCos)[3], int numVerts);
/* Set deform matrix per vertex for crazyspace correction */
- void (*deformMatricesEM)(
- struct ModifierData *md, struct Object *ob,
- struct BMEditMesh *editData, struct DerivedMesh *derivedData,
- float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
+ void (*deformMatricesEM)(struct ModifierData *md, struct Object *ob,
+ struct BMEditMesh *editData, struct DerivedMesh *derivedData,
+ float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
/********************* Non-deform modifier functions *********************/
@@ -190,10 +187,9 @@ typedef struct ModifierTypeInfo {
* The modifier may reuse the derivedData argument (i.e. return it in
* modified form), but must not release it.
*/
- struct DerivedMesh *(*applyModifier)(
- struct ModifierData *md, struct Object *ob,
- struct DerivedMesh *derivedData,
- ModifierApplyFlag flag);
+ struct DerivedMesh *(*applyModifier)(struct ModifierData *md, struct Object *ob,
+ struct DerivedMesh *derivedData,
+ ModifierApplyFlag flag);
/* Like applyModifier but called during editmode (for supporting
* modifiers).
@@ -202,10 +198,9 @@ typedef struct ModifierTypeInfo {
* are expected from editmode objects. The same qualifications regarding
* derivedData apply as for applyModifier.
*/
- struct DerivedMesh *(*applyModifierEM)(
- struct ModifierData *md, struct Object *ob,
- struct BMEditMesh *editData,
- struct DerivedMesh *derivedData);
+ struct DerivedMesh *(*applyModifierEM)(struct ModifierData *md, struct Object *ob,
+ struct BMEditMesh *editData,
+ struct DerivedMesh *derivedData);
/********************* Optional functions *********************/
@@ -258,7 +253,7 @@ typedef struct ModifierTypeInfo {
* This function is optional.
*/
void (*updateDepgraph)(struct ModifierData *md, struct DagForest *forest, struct Scene *scene,
- struct Object *ob, struct DagNode *obNode);
+ struct Object *ob, struct DagNode *obNode);
/* Should return true if the modifier needs to be recalculated on time
* changes.
@@ -285,7 +280,7 @@ typedef struct ModifierTypeInfo {
* This function is optional.
*/
void (*foreachObjectLink)(struct ModifierData *md, struct Object *ob,
- ObjectWalkFunc walk, void *userData);
+ ObjectWalkFunc walk, void *userData);
/* Should call the given walk function with a pointer to each ID
* pointer (i.e. each datablock pointer) that the modifier data
@@ -296,7 +291,7 @@ typedef struct ModifierTypeInfo {
* will be used.
*/
void (*foreachIDLink)(struct ModifierData *md, struct Object *ob,
- IDWalkFunc walk, void *userData);
+ IDWalkFunc walk, void *userData);
/* Should call the given walk function for each texture that the
* modifier data stores. This is used for finding all textures in
@@ -306,10 +301,10 @@ typedef struct ModifierTypeInfo {
* assumed the modifier has no textures.
*/
void (*foreachTexLink)(struct ModifierData *md, struct Object *ob,
- TexWalkFunc walk, void *userData);
+ TexWalkFunc walk, void *userData);
} ModifierTypeInfo;
-ModifierTypeInfo *modifierType_getInfo (ModifierType type);
+ModifierTypeInfo *modifierType_getInfo(ModifierType type);
/* Modifier utility calls, do call through type pointer and return
* default values if pointer is optional.
@@ -317,38 +312,38 @@ ModifierTypeInfo *modifierType_getInfo (ModifierType type);
struct ModifierData *modifier_new(int type);
void modifier_free(struct ModifierData *md);
-void modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md);
+void modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md);
void modifier_copyData(struct ModifierData *md, struct ModifierData *target);
int modifier_dependsOnTime(struct ModifierData *md);
int modifier_supportsMapping(struct ModifierData *md);
int modifier_couldBeCage(struct Scene *scene, struct ModifierData *md);
int modifier_isCorrectableDeformed(struct ModifierData *md);
-int modifier_sameTopology(ModifierData *md);
+int modifier_sameTopology(ModifierData *md);
int modifier_nonGeometrical(ModifierData *md);
int modifier_isEnabled(struct Scene *scene, struct ModifierData *md, int required_mode);
void modifier_setError(struct ModifierData *md, const char *format, ...)
#ifdef __GNUC__
-__attribute__ ((format (printf, 2, 3)))
+__attribute__ ((format(printf, 2, 3)))
#endif
;
int modifier_isPreview(struct ModifierData *md);
void modifiers_foreachObjectLink(struct Object *ob,
- ObjectWalkFunc walk,
- void *userData);
+ ObjectWalkFunc walk,
+ void *userData);
void modifiers_foreachIDLink(struct Object *ob,
- IDWalkFunc walk,
- void *userData);
+ IDWalkFunc walk,
+ void *userData);
void modifiers_foreachTexLink(struct Object *ob,
- TexWalkFunc walk,
- void *userData);
+ TexWalkFunc walk,
+ void *userData);
struct ModifierData *modifiers_findByType(struct Object *ob, ModifierType type);
struct ModifierData *modifiers_findByName(struct Object *ob, const char *name);
void modifiers_clearErrors(struct Object *ob);
int modifiers_getCageIndex(struct Scene *scene, struct Object *ob,
- int *lastPossibleCageIndex_r, int virtual_);
+ int *lastPossibleCageIndex_r, int virtual_);
int modifiers_isSoftbodyEnabled(struct Object *ob);
int modifiers_isClothEnabled(struct Object *ob);
@@ -374,10 +369,10 @@ typedef struct CDMaskLink {
* end of the stack.
*/
struct CDMaskLink *modifiers_calcDataMasks(struct Scene *scene,
- struct Object *ob,
- struct ModifierData *md,
- CustomDataMask dataMask,
- int required_mode);
+ struct Object *ob,
+ struct ModifierData *md,
+ CustomDataMask dataMask,
+ int required_mode);
struct ModifierData *modifiers_getLastPreview(struct Scene *scene,
struct ModifierData *md,
int required_mode);
diff --git a/source/blender/blenkernel/BKE_movieclip.h b/source/blender/blenkernel/BKE_movieclip.h
index 29924542494..15b3cb91b90 100644
--- a/source/blender/blenkernel/BKE_movieclip.h
+++ b/source/blender/blenkernel/BKE_movieclip.h
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * The Original Code is Copyright (C) 2011 Blender Foundation.
+ * The Original Code is Copyright (C) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
@@ -64,12 +64,12 @@ void BKE_movieclip_build_proxy_frame(struct MovieClip *clip, int clip_flag, stru
int cfra, int *build_sizes, int build_count, int undistorted);
/* cacheing flags */
-#define MOVIECLIP_CACHE_SKIP (1<<0)
+#define MOVIECLIP_CACHE_SKIP (1 << 0)
/* postprocessing flags */
-#define MOVIECLIP_DISABLE_RED (1<<0)
-#define MOVIECLIP_DISABLE_GREEN (1<<1)
-#define MOVIECLIP_DISABLE_BLUE (1<<2)
-#define MOVIECLIP_PREVIEW_GRAYSCALE (1<<3)
+#define MOVIECLIP_DISABLE_RED (1 << 0)
+#define MOVIECLIP_DISABLE_GREEN (1 << 1)
+#define MOVIECLIP_DISABLE_BLUE (1 << 2)
+#define MOVIECLIP_PREVIEW_GRAYSCALE (1 << 3)
#endif
diff --git a/source/blender/blenkernel/BKE_navmesh_conversion.h b/source/blender/blenkernel/BKE_navmesh_conversion.h
index 8de53ed8b8e..aab359b307a 100644
--- a/source/blender/blenkernel/BKE_navmesh_conversion.h
+++ b/source/blender/blenkernel/BKE_navmesh_conversion.h
@@ -32,32 +32,32 @@ struct DerivedMesh;
/* navmesh_conversion.c */
int buildNavMeshDataByDerivedMesh(struct DerivedMesh *dm, int *vertsPerPoly,
- int *nverts, float **verts,
- int *ndtris, unsigned short **dtris,
- int *npolys, unsigned short **dmeshes,
- unsigned short **polys, int **dtrisToPolysMap,
- int **dtrisToTrisMap, int **trisToFacesMap);
-
-int buildRawVertIndicesData(struct DerivedMesh* dm, int *nverts, float **verts,
- int *ntris, unsigned short **tris, int **trisToFacesMap,
- int **recastData);
-
-int buildNavMeshData(const int nverts, const float* verts,
- const int ntris, const unsigned short *tris,
- const int* recastData, const int* trisToFacesMap,
- int *ndtris, unsigned short **dtris,
- int *npolys, unsigned short **dmeshes, unsigned short **polys,
- int *vertsPerPoly, int **dtrisToPolysMap, int **dtrisToTrisMap);
+ int *nverts, float **verts,
+ int *ndtris, unsigned short **dtris,
+ int *npolys, unsigned short **dmeshes,
+ unsigned short **polys, int **dtrisToPolysMap,
+ int **dtrisToTrisMap, int **trisToFacesMap);
+
+int buildRawVertIndicesData(struct DerivedMesh *dm, int *nverts, float **verts,
+ int *ntris, unsigned short **tris, int **trisToFacesMap,
+ int **recastData);
+
+int buildNavMeshData(const int nverts, const float *verts,
+ const int ntris, const unsigned short *tris,
+ const int *recastData, const int *trisToFacesMap,
+ int *ndtris, unsigned short **dtris,
+ int *npolys, unsigned short **dmeshes, unsigned short **polys,
+ int *vertsPerPoly, int **dtrisToPolysMap, int **dtrisToTrisMap);
int buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys,
- unsigned short* polys, const unsigned short* dmeshes,
- const float* verts, const unsigned short* dtris,
- const int* dtrisToPolysMap);
-
-int polyNumVerts(const unsigned short* p, const int vertsPerPoly);
-int polyIsConvex(const unsigned short* p, const int vertsPerPoly, const float* verts);
-int polyFindVertex(const unsigned short* p, const int vertsPerPoly, unsigned short vertexIdx);
-float distPointToSegmentSq(const float* point, const float* a, const float* b);
+ unsigned short *polys, const unsigned short *dmeshes,
+ const float *verts, const unsigned short *dtris,
+ const int *dtrisToPolysMap);
+
+int polyNumVerts(const unsigned short *p, const int vertsPerPoly);
+int polyIsConvex(const unsigned short *p, const int vertsPerPoly, const float *verts);
+int polyFindVertex(const unsigned short *p, const int vertsPerPoly, unsigned short vertexIdx);
+float distPointToSegmentSq(const float *point, const float *a, const float *b);
#endif //NAVMESH_CONVERSION_H
diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h
index 921972c9fa8..9e08f3a8c83 100644
--- a/source/blender/blenkernel/BKE_nla.h
+++ b/source/blender/blenkernel/BKE_nla.h
@@ -115,13 +115,13 @@ void BKE_nla_tweakmode_exit(struct AnimData *adt);
/* time mapping conversion modes */
enum {
- /* convert from global time to strip time - for evaluation */
+ /* convert from global time to strip time - for evaluation */
NLATIME_CONVERT_EVAL = 0,
- /* convert from global time to strip time - for editing corrections */
- // XXX old 0 invert
+ /* convert from global time to strip time - for editing corrections */
+ // XXX old 0 invert
NLATIME_CONVERT_UNMAP,
- /* convert from strip time to global time */
- // xxx old 1 invert
+ /* convert from strip time to global time */
+ // xxx old 1 invert
NLATIME_CONVERT_MAP,
} eNlaTime_ConvertModes;
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 92a447f9351..b0ee81f577a 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -101,25 +101,23 @@ void BKE_object_where_is_calc_mat4(struct Scene *scene, struct Object *ob, float
/* possibly belong in own moduke? */
struct BoundBox *BKE_boundbox_alloc_unit(void);
-void BKE_boundbox_init_from_minmax(struct BoundBox *bb, float min[3], float max[3]);
-int BKE_boundbox_ray_hit_check(struct BoundBox *bb, float ray_start[3], float ray_normal[3]);
+void BKE_boundbox_init_from_minmax(struct BoundBox *bb, float min[3], float max[3]);
+int BKE_boundbox_ray_hit_check(struct BoundBox *bb, float ray_start[3], float ray_normal[3]);
struct BoundBox *BKE_object_boundbox_get(struct Object *ob);
void BKE_object_dimensions_get(struct Object *ob, float vec[3]);
void BKE_object_dimensions_set(struct Object *ob, const float *value);
void BKE_object_boundbox_flag(struct Object *ob, int flag, int set);
void BKE_object_minmax(struct Object *ob, float r_min[3], float r_max[3]);
-int BKE_object_minmax_dupli(struct Scene *scene, struct Object *ob, float r_min[3], float r_max[3]);
+int BKE_object_minmax_dupli(struct Scene *scene, struct Object *ob, float r_min[3], float r_max[3]);
/* sometimes min-max isn't enough, we need to loop over each point */
-void BKE_object_foreach_display_point(
- struct Object *ob, float obmat[4][4],
- void (*func_cb)(const float[3], void *), void *user_data);
-void BKE_scene_foreach_display_point(
- struct Scene *scene,
- struct View3D *v3d,
- const short flag,
- void (*func_cb)(const float[3], void *), void *user_data);
+void BKE_object_foreach_display_point(struct Object *ob, float obmat[4][4],
+ void (*func_cb)(const float[3], void *), void *user_data);
+void BKE_scene_foreach_display_point(struct Scene *scene,
+ struct View3D *v3d,
+ const short flag,
+ void (*func_cb)(const float[3], void *), void *user_data);
int BKE_object_parent_loop_check(const struct Object *parent, const struct Object *ob);
@@ -136,11 +134,11 @@ typedef struct ObjectTfmProtectedChannels {
} ObjectTfmProtectedChannels;
void BKE_object_tfm_protected_backup(const struct Object *ob,
- ObjectTfmProtectedChannels *obtfm);
+ ObjectTfmProtectedChannels *obtfm);
void BKE_object_tfm_protected_restore(struct Object *ob,
- const ObjectTfmProtectedChannels *obtfm,
- const short protectflag);
+ const ObjectTfmProtectedChannels *obtfm,
+ const short protectflag);
void BKE_object_handle_update(struct Scene *scene, struct Object *ob);
void BKE_object_sculpt_modifiers_changed(struct Object *ob);
diff --git a/source/blender/blenkernel/BKE_ocean.h b/source/blender/blenkernel/BKE_ocean.h
index 1c659b61d7d..de12afb02bd 100644
--- a/source/blender/blenkernel/BKE_ocean.h
+++ b/source/blender/blenkernel/BKE_ocean.h
@@ -69,25 +69,25 @@ typedef struct OceanCache {
} OceanCache;
-#define OCEAN_NOT_CACHED 0
-#define OCEAN_CACHING 1
-#define OCEAN_CACHED 2
+#define OCEAN_NOT_CACHED 0
+#define OCEAN_CACHING 1
+#define OCEAN_CACHED 2
struct Ocean *BKE_add_ocean(void);
void BKE_free_ocean_data(struct Ocean *oc);
void BKE_free_ocean(struct Ocean *oc);
-void BKE_init_ocean(struct Ocean* o, int M, int N, float Lx, float Lz, float V, float l, float A, float w, float damp,
+void BKE_init_ocean(struct Ocean *o, int M, int N, float Lx, float Lz, float V, float l, float A, float w, float damp,
float alignment, float depth, float time, short do_height_field, short do_chop, short do_normals, short do_jacobian, int seed);
void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount);
/* sampling the ocean surface */
float BKE_ocean_jminus_to_foam(float jminus, float coverage);
-void BKE_ocean_eval_uv(struct Ocean * oc, struct OceanResult *ocr, float u, float v);
-void BKE_ocean_eval_uv_catrom(struct Ocean * oc, struct OceanResult *ocr, float u, float v);
-void BKE_ocean_eval_xz(struct Ocean * oc, struct OceanResult *ocr, float x, float z);
-void BKE_ocean_eval_xz_catrom(struct Ocean * oc, struct OceanResult *ocr, float x, float z);
-void BKE_ocean_eval_ij(struct Ocean * oc, struct OceanResult *ocr, int i, int j);
+void BKE_ocean_eval_uv(struct Ocean *oc, struct OceanResult *ocr, float u, float v);
+void BKE_ocean_eval_uv_catrom(struct Ocean *oc, struct OceanResult *ocr, float u, float v);
+void BKE_ocean_eval_xz(struct Ocean *oc, struct OceanResult *ocr, float x, float z);
+void BKE_ocean_eval_xz_catrom(struct Ocean *oc, struct OceanResult *ocr, float x, float z);
+void BKE_ocean_eval_ij(struct Ocean *oc, struct OceanResult *ocr, int i, int j);
/* ocean cache handling */
diff --git a/source/blender/blenkernel/BKE_packedFile.h b/source/blender/blenkernel/BKE_packedFile.h
index 1eff20cbd57..1891840f497 100644
--- a/source/blender/blenkernel/BKE_packedFile.h
+++ b/source/blender/blenkernel/BKE_packedFile.h
@@ -32,8 +32,8 @@
* \since March 2001
* \author nzc
*/
-#define RET_OK 0
-#define RET_ERROR 1
+#define RET_OK 0
+#define RET_ERROR 1
struct bSound;
struct Image;
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index f776295b912..b3e650b2aa5 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -59,18 +59,18 @@ struct SurfaceModifierData;
struct BVHTreeRay;
struct BVHTreeRayHit;
-#define PARTICLE_P ParticleData *pa; int p
-#define LOOP_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++)
-#define LOOP_EXISTING_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) if(!(pa->flag & PARS_UNEXIST))
-#define LOOP_SHOWN_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) if(!(pa->flag & (PARS_UNEXIST|PARS_NO_DISP)))
+#define PARTICLE_P ParticleData * pa; int p
+#define LOOP_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++)
+#define LOOP_EXISTING_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) if (!(pa->flag & PARS_UNEXIST))
+#define LOOP_SHOWN_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) if (!(pa->flag & (PARS_UNEXIST | PARS_NO_DISP)))
/* OpenMP: Can only advance one variable within loop definition. */
-#define LOOP_DYNAMIC_PARTICLES for(p=0; p<psys->totpart; p++ ) if((pa=psys->particles+p)->state.time > 0.0f)
+#define LOOP_DYNAMIC_PARTICLES for (p = 0; p < psys->totpart; p++) if ((pa = psys->particles + p)->state.time > 0.0f)
-#define PSYS_FRAND_COUNT 1024
-#define PSYS_FRAND(seed) psys->frand[(seed) % PSYS_FRAND_COUNT]
+#define PSYS_FRAND_COUNT 1024
+#define PSYS_FRAND(seed) psys->frand[(seed) % PSYS_FRAND_COUNT]
/* fast but sure way to get the modifier*/
-#define PARTICLE_PSMD ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys)
+#define PARTICLE_PSMD ParticleSystemModifierData * psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys)
/* common stuff that many particle functions need */
typedef struct ParticleSimulationData {
@@ -86,11 +86,11 @@ typedef struct ParticleSimulationData {
} ParticleSimulationData;
typedef struct ParticleTexture {
- float ivel; /* used in reset */
- float time, life, exist, size; /* used in init */
- float damp, gravity, field; /* used in physics */
- float length, clump, kink, effector;/* used in path caching */
- float rough1, rough2, roughe; /* used in path caching */
+ float ivel; /* used in reset */
+ float time, life, exist, size; /* used in init */
+ float damp, gravity, field; /* used in physics */
+ float length, clump, kink, effector; /* used in path caching */
+ float rough1, rough2, roughe; /* used in path caching */
} ParticleTexture;
typedef struct ParticleSeam {
@@ -145,8 +145,7 @@ typedef struct ParticleThread {
int num, tot;
} ParticleThread;
-typedef struct ParticleBillboardData
-{
+typedef struct ParticleBillboardData {
struct Object *ob;
float vec[3], vel[3];
float offset[2];
@@ -159,8 +158,7 @@ typedef struct ParticleBillboardData
short align, uv_split, anim, split_offset;
} ParticleBillboardData;
-typedef struct ParticleCollisionElement
-{
+typedef struct ParticleCollisionElement {
/* pointers to original data */
float *x[4], *v[4];
@@ -181,8 +179,7 @@ typedef struct ParticleCollisionElement
} ParticleCollisionElement;
/* container for moving data between deflet_particle and particle_intersect_face */
-typedef struct ParticleCollision
-{
+typedef struct ParticleCollision {
struct Object *current;
struct Object *hit;
struct Object *prev;
@@ -191,7 +188,7 @@ typedef struct ParticleCollision
struct CollisionModifierData *md; // collision modifier for current object;
- float f; // time factor of previous collision, needed for substracting face velocity
+ float f; // time factor of previous collision, needed for substracting face velocity
float fac1, fac2;
float cfra, old_cfra;
@@ -214,10 +211,10 @@ typedef struct ParticleCollision
} ParticleCollision;
typedef struct ParticleDrawData {
- float *vdata, *vd; /* vertice data */
- float *ndata, *nd; /* normal data */
- float *cdata, *cd; /* color data */
- float *vedata, *ved; /* velocity data */
+ float *vdata, *vd; /* vertice data */
+ float *ndata, *nd; /* normal data */
+ float *cdata, *cd; /* color data */
+ float *vedata, *ved; /* velocity data */
float *ma_col;
int tot_vec_size, flag;
int totpoint, totve;
@@ -248,7 +245,7 @@ int psys_uses_gravity(struct ParticleSimulationData *sim);
/* free */
void BKE_particlesettings_free(struct ParticleSettings *part);
void psys_free_path_cache(struct ParticleSystem *psys, struct PTCacheEdit *edit);
-void psys_free(struct Object * ob, struct ParticleSystem * psys);
+void psys_free(struct Object *ob, struct ParticleSystem *psys);
void psys_render_set(struct Object *ob, struct ParticleSystem *psys, float viewmat[][4], float winmat[][4], int winx, int winy, int timeoffset);
void psys_render_restore(struct Object *ob, struct ParticleSystem *psys);
@@ -291,7 +288,7 @@ void psys_get_dupli_path_transform(struct ParticleSimulationData *sim, struct Pa
ParticleThread *psys_threads_create(struct ParticleSimulationData *sim);
void psys_threads_free(ParticleThread *threads);
-void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3], float zvec[3], float center[3]);
+void psys_make_billboard(ParticleBillboardData * bb, float xvec[3], float yvec[3], float zvec[3], float center[3]);
void psys_apply_hair_lattice(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys);
/* particle_system.c */
@@ -346,13 +343,13 @@ int psys_particle_dm_face_lookup(struct Object *ob, struct DerivedMesh *dm, int
void reset_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, float dtime, float cfra);
/* psys_reset */
-#define PSYS_RESET_ALL 1
-#define PSYS_RESET_DEPSGRAPH 2
-/* #define PSYS_RESET_CHILDREN 3 */ /*UNUSED*/
-#define PSYS_RESET_CACHE_MISS 4
+#define PSYS_RESET_ALL 1
+#define PSYS_RESET_DEPSGRAPH 2
+/* #define PSYS_RESET_CHILDREN 3 */ /*UNUSED*/
+#define PSYS_RESET_CACHE_MISS 4
/* index_dmcache */
-#define DMCACHE_NOTFOUND -1
-#define DMCACHE_ISCHILD -2
+#define DMCACHE_NOTFOUND -1
+#define DMCACHE_ISCHILD -2
#endif
diff --git a/source/blender/blenkernel/BKE_plugin_types.h b/source/blender/blenkernel/BKE_plugin_types.h
index 8f9706f9833..f3c5db02427 100644
--- a/source/blender/blenkernel/BKE_plugin_types.h
+++ b/source/blender/blenkernel/BKE_plugin_types.h
@@ -34,11 +34,11 @@
struct ImBuf;
-typedef int (*TexDoitold)(int stype, void *cast, float *texvec, float *dxt, float *dyt);
-typedef int (*TexDoit)(int stype, void *cast, float *texvec, float *dxt, float *dyt, float *result );
-typedef void (*SeqDoit)(void*, float, float, int, int,
- struct ImBuf*, struct ImBuf*,
- struct ImBuf*, struct ImBuf*);
+typedef int (*TexDoitold)(int stype, void *cast, float *texvec, float *dxt, float *dyt);
+typedef int (*TexDoit)(int stype, void *cast, float *texvec, float *dxt, float *dyt, float *result);
+typedef void (*SeqDoit)(void *, float, float, int, int,
+ struct ImBuf *, struct ImBuf *,
+ struct ImBuf *, struct ImBuf *);
typedef struct VarStruct {
int type;
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index d7d7324dd56..d6ab9a35697 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -40,15 +40,15 @@
/* Point cache clearing option, for BKE_ptcache_id_clear, before
* and after are non inclusive (they wont remove the cfra) */
-#define PTCACHE_CLEAR_ALL 0
-#define PTCACHE_CLEAR_FRAME 1
-#define PTCACHE_CLEAR_BEFORE 2
-#define PTCACHE_CLEAR_AFTER 3
+#define PTCACHE_CLEAR_ALL 0
+#define PTCACHE_CLEAR_FRAME 1
+#define PTCACHE_CLEAR_BEFORE 2
+#define PTCACHE_CLEAR_AFTER 3
/* Point cache reset options */
-#define PTCACHE_RESET_DEPSGRAPH 0
-#define PTCACHE_RESET_BAKED 1
-#define PTCACHE_RESET_OUTDATED 2
+#define PTCACHE_RESET_DEPSGRAPH 0
+#define PTCACHE_RESET_BAKED 1
+#define PTCACHE_RESET_OUTDATED 2
/* #define PTCACHE_RESET_FREE 3 */ /*UNUSED*/
/* Add the blendfile name after blendcache_ */
@@ -56,29 +56,29 @@
#define PTCACHE_PATH "blendcache_"
/* File open options, for BKE_ptcache_file_open */
-#define PTCACHE_FILE_READ 0
-#define PTCACHE_FILE_WRITE 1
-#define PTCACHE_FILE_UPDATE 2
+#define PTCACHE_FILE_READ 0
+#define PTCACHE_FILE_WRITE 1
+#define PTCACHE_FILE_UPDATE 2
/* PTCacheID types */
-#define PTCACHE_TYPE_SOFTBODY 0
-#define PTCACHE_TYPE_PARTICLES 1
-#define PTCACHE_TYPE_CLOTH 2
-#define PTCACHE_TYPE_SMOKE_DOMAIN 3
-#define PTCACHE_TYPE_SMOKE_HIGHRES 4
-#define PTCACHE_TYPE_DYNAMICPAINT 5
+#define PTCACHE_TYPE_SOFTBODY 0
+#define PTCACHE_TYPE_PARTICLES 1
+#define PTCACHE_TYPE_CLOTH 2
+#define PTCACHE_TYPE_SMOKE_DOMAIN 3
+#define PTCACHE_TYPE_SMOKE_HIGHRES 4
+#define PTCACHE_TYPE_DYNAMICPAINT 5
/* high bits reserved for flags that need to be stored in file */
-#define PTCACHE_TYPEFLAG_COMPRESS (1<<16)
-#define PTCACHE_TYPEFLAG_EXTRADATA (1<<17)
+#define PTCACHE_TYPEFLAG_COMPRESS (1 << 16)
+#define PTCACHE_TYPEFLAG_EXTRADATA (1 << 17)
-#define PTCACHE_TYPEFLAG_TYPEMASK 0x0000FFFF
-#define PTCACHE_TYPEFLAG_FLAGMASK 0xFFFF0000
+#define PTCACHE_TYPEFLAG_TYPEMASK 0x0000FFFF
+#define PTCACHE_TYPEFLAG_FLAGMASK 0xFFFF0000
/* PTCache read return code */
-#define PTCACHE_READ_EXACT 1
-#define PTCACHE_READ_INTERPOLATED 2
-#define PTCACHE_READ_OLD 3
+#define PTCACHE_READ_EXACT 1
+#define PTCACHE_READ_INTERPOLATED 2
+#define PTCACHE_READ_OLD 3
/* Structs */
struct ClothModifierData;
@@ -115,7 +115,7 @@ typedef struct PTCacheFile {
void *cur[BPHYS_TOT_DATA];
} PTCacheFile;
-#define PTCACHE_VEL_PER_SEC 1
+#define PTCACHE_VEL_PER_SEC 1
typedef struct PTCacheID {
struct PTCacheID *next, *prev;
@@ -182,10 +182,10 @@ typedef struct PTCacheBaker {
} PTCacheBaker;
/* PTCacheEditKey->flag */
-#define PEK_SELECT 1
-#define PEK_TAG 2
-#define PEK_HIDE 4
-#define PEK_USE_WCO 8
+#define PEK_SELECT 1
+#define PEK_TAG 2
+#define PEK_HIDE 4
+#define PEK_USE_WCO 8
typedef struct PTCacheEditKey {
float *co;
@@ -200,10 +200,10 @@ typedef struct PTCacheEditKey {
} PTCacheEditKey;
/* PTCacheEditPoint->flag */
-#define PEP_TAG 1
-#define PEP_EDIT_RECALC 2
-#define PEP_TRANSFORM 4
-#define PEP_HIDE 8
+#define PEP_TAG 1
+#define PEP_EDIT_RECALC 2
+#define PEP_TRANSFORM 4
+#define PEP_HIDE 8
typedef struct PTCacheEditPoint {
struct PTCacheEditKey *keys;
@@ -242,7 +242,7 @@ typedef struct PTCacheEdit {
float *emitter_cosnos; /* localspace face centers and normals (average of its verts), from the derived mesh */
int *mirror_cache;
- struct ParticleCacheKey **pathcache; /* path cache (runtime) */
+ struct ParticleCacheKey **pathcache; /* path cache (runtime) */
ListBase pathcachebufs;
int totpoint, totframes, totcached, edited;
@@ -267,18 +267,18 @@ void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Object *ob, struct
void BKE_ptcache_remove(void);
/************ ID specific functions ************************/
-void BKE_ptcache_id_clear(PTCacheID *id, int mode, unsigned int cfra);
-int BKE_ptcache_id_exist(PTCacheID *id, int cfra);
-int BKE_ptcache_id_reset(struct Scene *scene, PTCacheID *id, int mode);
-void BKE_ptcache_id_time(PTCacheID *pid, struct Scene *scene, float cfra, int *startframe, int *endframe, float *timescale);
-int BKE_ptcache_object_reset(struct Scene *scene, struct Object *ob, int mode);
+void BKE_ptcache_id_clear(PTCacheID *id, int mode, unsigned int cfra);
+int BKE_ptcache_id_exist(PTCacheID *id, int cfra);
+int BKE_ptcache_id_reset(struct Scene *scene, PTCacheID *id, int mode);
+void BKE_ptcache_id_time(PTCacheID *pid, struct Scene *scene, float cfra, int *startframe, int *endframe, float *timescale);
+int BKE_ptcache_object_reset(struct Scene *scene, struct Object *ob, int mode);
void BKE_ptcache_update_info(PTCacheID *pid);
/*********** General cache reading/writing ******************/
/* Size of cache data type. */
-int BKE_ptcache_data_size(int data_type);
+int BKE_ptcache_data_size(int data_type);
/* Is point with indes in memory cache */
int BKE_ptcache_mem_index_find(struct PTCacheMem *pm, unsigned int index);
@@ -289,10 +289,10 @@ void BKE_ptcache_mem_pointers_incr(struct PTCacheMem *pm);
int BKE_ptcache_mem_pointers_seek(int point_index, struct PTCacheMem *pm);
/* Main cache reading call. */
-int BKE_ptcache_read(PTCacheID *pid, float cfra);
+int BKE_ptcache_read(PTCacheID *pid, float cfra);
/* Main cache writing call. */
-int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra);
+int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra);
/****************** Continue physics ***************/
void BKE_ptcache_set_continue_physics(struct Main *bmain, struct Scene *scene, int enable);
@@ -311,7 +311,7 @@ struct PointCache *BKE_ptcache_copy_list(struct ListBase *ptcaches_new, struct L
void BKE_ptcache_quick_cache_all(struct Main *bmain, struct Scene *scene);
/* Bake cache or simulate to current frame with settings defined in the baker. */
-void BKE_ptcache_bake(struct PTCacheBaker* baker);
+void BKE_ptcache_bake(struct PTCacheBaker *baker);
/* Convert disk cache to memory cache. */
void BKE_ptcache_disk_to_mem(struct PTCacheID *pid);
diff --git a/source/blender/blenkernel/BKE_report.h b/source/blender/blenkernel/BKE_report.h
index aa625fab3b2..4d69a013101 100644
--- a/source/blender/blenkernel/BKE_report.h
+++ b/source/blender/blenkernel/BKE_report.h
@@ -49,14 +49,14 @@ void BKE_reports_clear(ReportList *reports);
void BKE_report(ReportList *reports, ReportType type, const char *message);
void BKE_reportf(ReportList *reports, ReportType type, const char *format, ...)
#ifdef __GNUC__
-__attribute__ ((format (printf, 3, 4)))
+__attribute__ ((format(printf, 3, 4)))
#endif
;
void BKE_reports_prepend(ReportList *reports, const char *prepend);
void BKE_reports_prependf(ReportList *reports, const char *prepend, ...)
#ifdef __GNUC__
-__attribute__ ((format (printf, 2, 3)))
+__attribute__ ((format(printf, 2, 3)))
#endif
;
diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h
index 3a93562707d..bce4243190a 100644
--- a/source/blender/blenkernel/BKE_scene.h
+++ b/source/blender/blenkernel/BKE_scene.h
@@ -49,13 +49,13 @@ struct Scene;
struct Text;
struct Text;
-#define SCE_COPY_NEW 0
-#define SCE_COPY_EMPTY 1
-#define SCE_COPY_LINK_OB 2
-#define SCE_COPY_LINK_DATA 3
-#define SCE_COPY_FULL 4
+#define SCE_COPY_NEW 0
+#define SCE_COPY_EMPTY 1
+#define SCE_COPY_LINK_OB 2
+#define SCE_COPY_LINK_DATA 3
+#define SCE_COPY_FULL 4
-#define SETLOOPER(_sce_basis, _sce_iter, _base) _sce_iter= _sce_basis, _base= _setlooper_base_step(&_sce_iter, NULL); _base; _base= _setlooper_base_step(&_sce_iter, _base)
+#define SETLOOPER(_sce_basis, _sce_iter, _base) _sce_iter = _sce_basis, _base = _setlooper_base_step(&_sce_iter, NULL); _base; _base = _setlooper_base_step(&_sce_iter, _base)
struct Base *_setlooper_base_step(struct Scene **sce_iter, struct Base *base);
void free_avicodecdata(struct AviCodecData *acd);
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index af6e793cf2f..7223008afad 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -58,43 +58,43 @@ struct wmWindowManager;
* ED_spacetypes_init() in editors/area/spacetypes.c */
/* an editor in Blender is a combined ScrArea + SpaceType + SpaceData */
-#define BKE_ST_MAXNAME 64
+#define BKE_ST_MAXNAME 64
typedef struct SpaceType {
struct SpaceType *next, *prev;
- char name[BKE_ST_MAXNAME]; /* for menus */
- int spaceid; /* unique space identifier */
- int iconid; /* icon lookup for menus */
+ char name[BKE_ST_MAXNAME]; /* for menus */
+ int spaceid; /* unique space identifier */
+ int iconid; /* icon lookup for menus */
/* initial allocation, after this WM will call init() too */
- struct SpaceLink *(*new)(const struct bContext *C);
+ struct SpaceLink *(*new)(const struct bContext *C);
/* not free spacelink itself */
- void (*free)(struct SpaceLink *);
+ void (*free)(struct SpaceLink *);
/* init is to cope with file load, screen (size) changes, check handlers */
- void (*init)(struct wmWindowManager *, struct ScrArea *);
+ void (*init)(struct wmWindowManager *, struct ScrArea *);
/* Listeners can react to bContext changes */
- void (*listener)(struct ScrArea *, struct wmNotifier *);
+ void (*listener)(struct ScrArea *, struct wmNotifier *);
/* refresh context, called after filereads, ED_area_tag_refresh() */
- void (*refresh)(const struct bContext *, struct ScrArea *);
+ void (*refresh)(const struct bContext *, struct ScrArea *);
/* after a spacedata copy, an init should result in exact same situation */
- struct SpaceLink *(*duplicate)(struct SpaceLink *);
+ struct SpaceLink *(*duplicate)(struct SpaceLink *);
/* register operator types on startup */
- void (*operatortypes)(void);
+ void (*operatortypes)(void);
/* add default items to WM keymap */
- void (*keymap)(struct wmKeyConfig *);
+ void (*keymap)(struct wmKeyConfig *);
/* on startup, define dropboxes for spacetype+regions */
- void (*dropboxes)(void);
+ void (*dropboxes)(void);
/* return context data */
- int (*context)(const struct bContext *, const char*, struct bContextDataResult *);
+ int (*context)(const struct bContext *, const char *, struct bContextDataResult *);
/* region type definitions */
- ListBase regiontypes;
+ ListBase regiontypes;
/* tool shelf definitions */
ListBase toolshelf;
@@ -102,7 +102,7 @@ typedef struct SpaceType {
/* read and write... */
/* default keymaps to add */
- int keymapflag;
+ int keymapflag;
} SpaceType;
@@ -111,33 +111,33 @@ typedef struct SpaceType {
typedef struct ARegionType {
struct ARegionType *next, *prev;
- int regionid; /* unique identifier within this space, defines RGN_TYPE_xxxx */
+ int regionid; /* unique identifier within this space, defines RGN_TYPE_xxxx */
/* add handlers, stuff you only do once or on area/region type/size changes */
- void (*init)(struct wmWindowManager *, struct ARegion *);
+ void (*init)(struct wmWindowManager *, struct ARegion *);
/* draw entirely, view changes should be handled here */
- void (*draw)(const struct bContext *, struct ARegion *);
+ void (*draw)(const struct bContext *, struct ARegion *);
/* contextual changes should be handled here */
- void (*listener)(struct ARegion *, struct wmNotifier *);
+ void (*listener)(struct ARegion *, struct wmNotifier *);
- void (*free)(struct ARegion *);
+ void (*free)(struct ARegion *);
/* split region, copy data optionally */
- void *(*duplicate)(void *);
+ void *(*duplicate)(void *);
/* register operator types on startup */
- void (*operatortypes)(void);
+ void (*operatortypes)(void);
/* add own items to keymap */
- void (*keymap)(struct wmKeyConfig *);
+ void (*keymap)(struct wmKeyConfig *);
/* allows default cursor per region */
- void (*cursor)(struct wmWindow *, struct ScrArea *, struct ARegion *ar);
+ void (*cursor)(struct wmWindow *, struct ScrArea *, struct ARegion *ar);
/* return context data */
- int (*context)(const struct bContext *, const char *, struct bContextDataResult *);
+ int (*context)(const struct bContext *, const char *, struct bContextDataResult *);
/* custom drawing callbacks */
- ListBase drawcalls;
+ ListBase drawcalls;
/* panels type definitions */
ListBase paneltypes;
@@ -146,13 +146,13 @@ typedef struct ARegionType {
ListBase headertypes;
/* hardcoded constraints, smaller than these values region is not visible */
- int minsizex, minsizey;
+ int minsizex, minsizey;
/* when new region opens (region prefsizex/y are zero then */
- int prefsizex, prefsizey;
+ int prefsizex, prefsizey;
/* default keymaps to add */
- int keymapflag;
+ int keymapflag;
/* return without drawing. lock is set by region definition, and copied to do_lock by render. can become flag */
- short do_lock, lock;
+ short do_lock, lock;
} ARegionType;
/* panel types */
@@ -160,20 +160,20 @@ typedef struct ARegionType {
typedef struct PanelType {
struct PanelType *next, *prev;
- char idname[BKE_ST_MAXNAME]; /* unique name */
- char label[BKE_ST_MAXNAME]; /* for panel header */
- char context[BKE_ST_MAXNAME]; /* for buttons window */
- int space_type;
- int region_type;
+ char idname[BKE_ST_MAXNAME]; /* unique name */
+ char label[BKE_ST_MAXNAME]; /* for panel header */
+ char context[BKE_ST_MAXNAME]; /* for buttons window */
+ int space_type;
+ int region_type;
- int flag;
+ int flag;
/* verify if the panel should draw or not */
- int (*poll)(const struct bContext *, struct PanelType *);
+ int (*poll)(const struct bContext *, struct PanelType *);
/* draw header (optional) */
- void (*draw_header)(const struct bContext *, struct Panel *);
+ void (*draw_header)(const struct bContext *, struct Panel *);
/* draw entirely, view changes should be handled here */
- void (*draw)(const struct bContext *, struct Panel *);
+ void (*draw)(const struct bContext *, struct Panel *);
/* RNA integration */
ExtensionRNA ext;
@@ -184,19 +184,19 @@ typedef struct PanelType {
typedef struct HeaderType {
struct HeaderType *next, *prev;
- char idname[BKE_ST_MAXNAME]; /* unique name */
- int space_type;
+ char idname[BKE_ST_MAXNAME]; /* unique name */
+ int space_type;
/* draw entirely, view changes should be handled here */
- void (*draw)(const struct bContext *, struct Header *);
+ void (*draw)(const struct bContext *, struct Header *);
/* RNA integration */
ExtensionRNA ext;
} HeaderType;
typedef struct Header {
- struct HeaderType *type; /* runtime */
- struct uiLayout *layout; /* runtime for drawing */
+ struct HeaderType *type; /* runtime */
+ struct uiLayout *layout; /* runtime for drawing */
} Header;
@@ -205,22 +205,22 @@ typedef struct Header {
typedef struct MenuType {
struct MenuType *next, *prev;
- char idname[BKE_ST_MAXNAME]; /* unique name */
- char label[BKE_ST_MAXNAME]; /* for button text */
+ char idname[BKE_ST_MAXNAME]; /* unique name */
+ char label[BKE_ST_MAXNAME]; /* for button text */
char *description;
/* verify if the menu should draw or not */
- int (*poll)(const struct bContext *, struct MenuType *);
+ int (*poll)(const struct bContext *, struct MenuType *);
/* draw entirely, view changes should be handled here */
- void (*draw)(const struct bContext *, struct Menu *);
+ void (*draw)(const struct bContext *, struct Menu *);
/* RNA integration */
ExtensionRNA ext;
} MenuType;
typedef struct Menu {
- struct MenuType *type; /* runtime */
- struct uiLayout *layout; /* runtime for drawing */
+ struct MenuType *type; /* runtime */
+ struct uiLayout *layout; /* runtime for drawing */
} Menu;
/* spacetypes */
@@ -228,7 +228,7 @@ struct SpaceType *BKE_spacetype_from_id(int spaceid);
struct ARegionType *BKE_regiontype_from_id(struct SpaceType *st, int regionid);
const struct ListBase *BKE_spacetypes_list(void);
void BKE_spacetype_register(struct SpaceType *st);
-void BKE_spacetypes_free(void); /* only for quitting blender */
+void BKE_spacetypes_free(void); /* only for quitting blender */
/* spacedata */
void BKE_spacedata_freelist(ListBase *lb);
@@ -237,8 +237,8 @@ void BKE_spacedata_draw_locks(int set);
/* area/regions */
struct ARegion *BKE_area_region_copy(struct SpaceType *st, struct ARegion *ar);
-void BKE_area_region_free(struct SpaceType *st, struct ARegion *ar);
-void BKE_screen_area_free(struct ScrArea *sa);
+void BKE_area_region_free(struct SpaceType *st, struct ARegion *ar);
+void BKE_screen_area_free(struct ScrArea *sa);
struct ARegion *BKE_area_find_region_type(struct ScrArea *sa, int type);
struct ScrArea *BKE_screen_find_big_area(struct bScreen *sc, const int spacetype, const short min);
diff --git a/source/blender/blenkernel/BKE_script.h b/source/blender/blenkernel/BKE_script.h
index 7bd801a8177..9976009c4c2 100644
--- a/source/blender/blenkernel/BKE_script.h
+++ b/source/blender/blenkernel/BKE_script.h
@@ -40,7 +40,7 @@ extern "C" {
struct Script;
-void free_script (struct Script *script);
+void free_script(struct Script *script);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index decbf5d0d2a..4ddafbbaae9 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -46,10 +46,10 @@ struct SeqIndexBuildContext;
#define BUILD_SEQAR_COUNT_CURRENT 1
#define BUILD_SEQAR_COUNT_CHILDREN 2
-#define EARLY_NO_INPUT -1
-#define EARLY_DO_EFFECT 0
-#define EARLY_USE_INPUT_1 1
-#define EARLY_USE_INPUT_2 2
+#define EARLY_NO_INPUT -1
+#define EARLY_DO_EFFECT 0
+#define EARLY_USE_INPUT_1 1
+#define EARLY_USE_INPUT_2 2
/* sequence iterator */
@@ -67,8 +67,8 @@ void seq_end(SeqIterator *iter);
void seq_array(struct Editing *ed, struct Sequence ***seqarray, int *tot, int use_pointer);
#define SEQP_BEGIN(ed, _seq) \
-{ \
- SeqIterator iter; \
+ { \
+ SeqIterator iter; \
for (seq_begin(ed, &iter, 1); iter.valid; seq_next(&iter)) { \
_seq = iter.seq;
@@ -79,8 +79,8 @@ void seq_array(struct Editing *ed, struct Sequence ***seqarray, int *tot, int us
_seq = iter.seq;
#define SEQ_END \
- } \
- seq_end(&iter); \
+ } \
+ seq_end(&iter); \
}
typedef struct SeqRenderData {
@@ -94,11 +94,11 @@ typedef struct SeqRenderData {
} SeqRenderData;
SeqRenderData seq_new_render_data(
- struct Main * bmain, struct Scene * scene,
- int rectx, int recty, int preview_render_size);
+ struct Main *bmain, struct Scene *scene,
+ int rectx, int recty, int preview_render_size);
-int seq_cmp_render_data(const SeqRenderData * a, const SeqRenderData * b);
-unsigned int seq_hash_render_data(const SeqRenderData * a);
+int seq_cmp_render_data(const SeqRenderData *a, const SeqRenderData *b);
+unsigned int seq_hash_render_data(const SeqRenderData *a);
/* Wipe effect */
enum {
@@ -138,22 +138,21 @@ struct SeqEffectHandle {
int (*early_out)(struct Sequence *seq, float facf0, float facf1);
/* stores the y-range of the effect IPO */
- void (*store_icu_yrange)(struct Sequence * seq, short adrcode, float *ymin, float *ymax);
+ void (*store_icu_yrange)(struct Sequence *seq, short adrcode, float *ymin, float *ymax);
/* stores the default facf0 and facf1 if no IPO is present */
- void (*get_default_fac)(struct Sequence *seq, float cfra, float * facf0, float * facf1);
+ void (*get_default_fac)(struct Sequence *seq, float cfra, float *facf0, float *facf1);
/* execute the effect
* sequence effects are only required to either support
* float-rects or byte-rects
* (mixed cases are handled one layer up...) */
- struct ImBuf* (*execute)(
- SeqRenderData context,
- struct Sequence *seq, float cfra,
- float facf0, float facf1,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3);
+ struct ImBuf * (*execute)(SeqRenderData context,
+ struct Sequence *seq, float cfra,
+ float facf0, float facf1,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3);
};
/* ********************* prototypes *************** */
@@ -200,9 +199,9 @@ void seq_free_clipboard(void);
const char *give_seqname(struct Sequence *seq);
void calc_sequence(struct Scene *scene, struct Sequence *seq);
void calc_sequence_disp(struct Scene *scene, struct Sequence *seq);
-void reload_sequence_new_file(struct Scene *scene, struct Sequence * seq, int lock_range);
+void reload_sequence_new_file(struct Scene *scene, struct Sequence *seq, int lock_range);
void build_seqar_cb(struct ListBase *seqbase, struct Sequence ***seqar, int *totseq,
- int (*test_func)(struct Sequence * seq));
+ int (*test_func)(struct Sequence *seq));
int evaluate_seq_frame(struct Scene *scene, int cfra);
struct StripElem *give_stripelem(struct Sequence *seq, int cfra);
@@ -211,7 +210,7 @@ void printf_strip(struct Sequence *seq); // debugging function (unused)
void update_changed_seq_and_deps(struct Scene *scene, struct Sequence *changed_seq, int len_change, int ibuf_change);
int input_have_to_preprocess(
- SeqRenderData context, struct Sequence * seq, float cfra);
+ SeqRenderData context, struct Sequence *seq, float cfra);
struct SeqIndexBuildContext *seq_proxy_rebuild_context(struct Main *bmain, struct Scene *scene, struct Sequence *seq);
void seq_proxy_rebuild(struct SeqIndexBuildContext *context,
@@ -236,18 +235,16 @@ void seq_stripelem_cache_destruct(void);
void seq_stripelem_cache_cleanup(void);
/* returned ImBuf is properly refed and has to be freed */
-struct ImBuf * seq_stripelem_cache_get(
- SeqRenderData context, struct Sequence * seq,
- float cfra, seq_stripelem_ibuf_t type);
+struct ImBuf *seq_stripelem_cache_get(SeqRenderData context, struct Sequence *seq,
+ float cfra, seq_stripelem_ibuf_t type);
/* passed ImBuf is properly refed, so ownership is *not*
* transfered to the cache.
* you can pass the same ImBuf multiple times to the cache without problems.
*/
-void seq_stripelem_cache_put(
- SeqRenderData context, struct Sequence * seq,
- float cfra, seq_stripelem_ibuf_t type, struct ImBuf * nval);
+void seq_stripelem_cache_put(SeqRenderData context, struct Sequence *seq,
+ float cfra, seq_stripelem_ibuf_t type, struct ImBuf *nval);
/* **********************************************************************
* seqeffects.c
@@ -278,29 +275,28 @@ int seq_tx_get_final_right(struct Sequence *seq, int metaclip);
void seq_tx_set_final_left(struct Sequence *seq, int val);
void seq_tx_set_final_right(struct Sequence *seq, int val);
void seq_tx_handle_xlimits(struct Sequence *seq, int leftflag, int rightflag);
-int seq_tx_test(struct Sequence * seq);
+int seq_tx_test(struct Sequence *seq);
int seq_single_check(struct Sequence *seq);
void seq_single_fix(struct Sequence *seq);
-int seq_test_overlap(struct ListBase * seqbasep, struct Sequence *test);
+int seq_test_overlap(struct ListBase *seqbasep, struct Sequence *test);
void seq_translate(struct Scene *scene, struct Sequence *seq, int delta);
void seq_sound_init(struct Scene *scene, struct Sequence *seq);
struct Sequence *seq_foreground_frame_get(struct Scene *scene, int frame);
struct ListBase *seq_seqbase(struct ListBase *seqbase, struct Sequence *seq);
-struct Sequence *seq_metastrip(
- ListBase * seqbase /* = ed->seqbase */,
- struct Sequence * meta /* = NULL */, struct Sequence *seq);
+struct Sequence *seq_metastrip(ListBase *seqbase /* = ed->seqbase */,
+ struct Sequence *meta /* = NULL */, struct Sequence *seq);
void seq_offset_animdata(struct Scene *scene, struct Sequence *seq, int ofs);
void seq_dupe_animdata(struct Scene *scene, const char *name_src, const char *name_dst);
-int shuffle_seq(struct ListBase * seqbasep, struct Sequence *test, struct Scene *evil_scene);
-int shuffle_seq_time(ListBase * seqbasep, struct Scene *evil_scene);
+int shuffle_seq(struct ListBase *seqbasep, struct Sequence *test, struct Scene *evil_scene);
+int shuffle_seq_time(ListBase *seqbasep, struct Scene *evil_scene);
int seqbase_isolated_sel_check(struct ListBase *seqbase);
-void free_imbuf_seq(struct Scene *scene, struct ListBase * seqbasep, int check_mem_usage, int keep_file_handles);
-struct Sequence *seq_dupli_recursive(struct Scene *scene, struct Scene *scene_to, struct Sequence * seq, int dupe_flag);
+void free_imbuf_seq(struct Scene *scene, struct ListBase *seqbasep, int check_mem_usage, int keep_file_handles);
+struct Sequence *seq_dupli_recursive(struct Scene *scene, struct Scene *scene_to, struct Sequence *seq, int dupe_flag);
int seq_swap(struct Sequence *seq_a, struct Sequence *seq_b, const char **error_str);
void seq_update_sound_bounds_all(struct Scene *scene);
-void seq_update_sound_bounds(struct Scene* scene, struct Sequence *seq);
+void seq_update_sound_bounds(struct Scene *scene, struct Sequence *seq);
void seq_update_muting(struct Editing *ed);
void seq_update_sound(struct Scene *scene, struct bSound *sound);
void seqbase_unique_name_recursive(ListBase *seqbasep, struct Sequence *seq);
@@ -315,27 +311,27 @@ typedef struct SeqLoadInfo {
int start_frame;
int end_frame;
int channel;
- int flag; /* use sound, replace sel */
+ int flag; /* use sound, replace sel */
int type;
int tot_success;
int tot_error;
- int len; /* only for image strips */
+ int len; /* only for image strips */
char path[512];
char name[64];
} SeqLoadInfo;
/* SeqLoadInfo.flag */
-#define SEQ_LOAD_REPLACE_SEL (1<<0)
-#define SEQ_LOAD_FRAME_ADVANCE (1<<1)
-#define SEQ_LOAD_MOVIE_SOUND (1<<2)
-#define SEQ_LOAD_SOUND_CACHE (1<<3)
+#define SEQ_LOAD_REPLACE_SEL (1 << 0)
+#define SEQ_LOAD_FRAME_ADVANCE (1 << 1)
+#define SEQ_LOAD_MOVIE_SOUND (1 << 2)
+#define SEQ_LOAD_SOUND_CACHE (1 << 3)
/* seq_dupli' flags */
-#define SEQ_DUPE_UNIQUE_NAME (1<<0)
-#define SEQ_DUPE_CONTEXT (1<<1)
-#define SEQ_DUPE_ANIM (1<<2)
-#define SEQ_DUPE_ALL (1<<3) /* otherwise only selected are copied */
+#define SEQ_DUPE_UNIQUE_NAME (1 << 0)
+#define SEQ_DUPE_CONTEXT (1 << 1)
+#define SEQ_DUPE_ANIM (1 << 2)
+#define SEQ_DUPE_ALL (1 << 3) /* otherwise only selected are copied */
/* use as an api function */
typedef struct Sequence *(*SeqLoadFunc)(struct bContext *, ListBase *, struct SeqLoadInfo *);
diff --git a/source/blender/blenkernel/BKE_shrinkwrap.h b/source/blender/blenkernel/BKE_shrinkwrap.h
index 626dd64e21e..5b09f8fdf3d 100644
--- a/source/blender/blenkernel/BKE_shrinkwrap.h
+++ b/source/blender/blenkernel/BKE_shrinkwrap.h
@@ -65,8 +65,7 @@ struct DerivedMesh *object_get_derived_final(struct Object *ob);
*/
struct Object;
-typedef struct SpaceTransform
-{
+typedef struct SpaceTransform {
float local2target[4][4];
float target2local[4][4];
@@ -103,23 +102,22 @@ struct MDeformVert;
struct BVHTree;
-typedef struct ShrinkwrapCalcData
-{
- ShrinkwrapModifierData *smd; //shrinkwrap modifier data
+typedef struct ShrinkwrapCalcData {
+ ShrinkwrapModifierData *smd; //shrinkwrap modifier data
- struct Object *ob; //object we are applying shrinkwrap to
+ struct Object *ob; //object we are applying shrinkwrap to
- struct MVert *vert; //Array of verts being projected (to fetch normals or other data)
- float (*vertexCos)[3]; //vertexs being shrinkwraped
+ struct MVert *vert; //Array of verts being projected (to fetch normals or other data)
+ float (*vertexCos)[3]; //vertexs being shrinkwraped
int numVerts;
- struct MDeformVert* dvert; //Pointer to mdeform array
- int vgroup; //Vertex group num
+ struct MDeformVert *dvert; //Pointer to mdeform array
+ int vgroup; //Vertex group num
- struct DerivedMesh *target; //mesh we are shrinking to
- SpaceTransform local2target; //transform to move between local and target space
+ struct DerivedMesh *target; //mesh we are shrinking to
+ SpaceTransform local2target; //transform to move between local and target space
- float keepDist; //Distance to keep above target surface (units are in local space)
+ float keepDist; //Distance to keep above target surface (units are in local space)
} ShrinkwrapCalcData;
@@ -139,10 +137,10 @@ int normal_projection_project_vertex(char options, const float *vert, const floa
/*
* NULL initializers to local data
*/
-#define NULL_ShrinkwrapCalcData {NULL, }
-#define NULL_BVHTreeFromMesh {NULL, }
-#define NULL_BVHTreeRayHit {NULL, }
-#define NULL_BVHTreeNearest {0, }
+#define NULL_ShrinkwrapCalcData {NULL, }
+#define NULL_BVHTreeFromMesh {NULL, }
+#define NULL_BVHTreeRayHit {NULL, }
+#define NULL_BVHTreeNearest {0, }
#endif
diff --git a/source/blender/blenkernel/BKE_sketch.h b/source/blender/blenkernel/BKE_sketch.h
index 9cdf9a8fb62..50ee1184b3e 100644
--- a/source/blender/blenkernel/BKE_sketch.h
+++ b/source/blender/blenkernel/BKE_sketch.h
@@ -38,8 +38,7 @@ typedef enum SK_PMode
PT_PROJECT,
} SK_PMode;
-typedef struct SK_Point
-{
+typedef struct SK_Point {
float p[3];
short p2d[2];
float no[3];
@@ -48,8 +47,7 @@ typedef struct SK_Point
SK_PMode mode;
} SK_Point;
-typedef struct SK_Stroke
-{
+typedef struct SK_Stroke {
struct SK_Stroke *next, *prev;
SK_Point *points;
@@ -58,68 +56,64 @@ typedef struct SK_Stroke
int selected;
} SK_Stroke;
-#define SK_OVERDRAW_LIMIT 5
+#define SK_OVERDRAW_LIMIT 5
-typedef struct SK_Overdraw
-{
+typedef struct SK_Overdraw {
SK_Stroke *target;
- int start, end;
+ int start, end;
int count;
} SK_Overdraw;
#define SK_Stroke_BUFFER_INIT_SIZE 20
-typedef struct SK_DrawData
-{
+typedef struct SK_DrawData {
int mval[2];
int previous_mval[2];
SK_PType type;
} SK_DrawData;
-typedef struct SK_Intersection
-{
+typedef struct SK_Intersection {
struct SK_Intersection *next, *prev;
SK_Stroke *stroke;
- int before;
- int after;
- int gesture_index;
- float p[3];
- float lambda; /* used for sorting intersection points */
+ int before;
+ int after;
+ int gesture_index;
+ float p[3];
+ float lambda; /* used for sorting intersection points */
} SK_Intersection;
-typedef struct SK_Sketch
-{
- ListBase strokes;
- ListBase depth_peels;
- SK_Stroke *active_stroke;
- SK_Stroke *gesture;
- SK_Point next_point;
+typedef struct SK_Sketch {
+ ListBase strokes;
+ ListBase depth_peels;
+ SK_Stroke *active_stroke;
+ SK_Stroke *gesture;
+ SK_Point next_point;
SK_Overdraw over;
} SK_Sketch;
typedef struct SK_Gesture {
- SK_Stroke *stk;
- SK_Stroke *segments;
+ SK_Stroke *stk;
+ SK_Stroke *segments;
- ListBase intersections;
- ListBase self_intersections;
+ ListBase intersections;
+ ListBase self_intersections;
- int nb_self_intersections;
- int nb_intersections;
- int nb_segments;
+ int nb_self_intersections;
+ int nb_intersections;
+ int nb_segments;
} SK_Gesture;
/************************************************/
void freeSketch(SK_Sketch *sketch);
-SK_Sketch* createSketch(void);
+SK_Sketch *createSketch(void);
void sk_removeStroke(SK_Sketch *sketch, SK_Stroke *stk);
void sk_freeStroke(SK_Stroke *stk);
-SK_Stroke* sk_createStroke(void);
+SK_Stroke *sk_createStroke(void);
SK_Point *sk_lastStrokePoint(SK_Stroke *stk);
@@ -134,7 +128,7 @@ void sk_appendStrokePoint(SK_Stroke *stk, SK_Point *pt);
void sk_insertStrokePoints(SK_Stroke *stk, SK_Point *pts, int len, int start, int end);
void sk_trimStroke(SK_Stroke *stk, int start, int end);
-void sk_straightenStroke(SK_Stroke *stk, int start, int end, float p_start[3], float p_end[3]);
+void sk_straightenStroke(SK_Stroke * stk, int start, int end, float p_start[3], float p_end[3]);
void sk_polygonizeStroke(SK_Stroke *stk, int start, int end);
void sk_flattenStroke(SK_Stroke *stk, int start, int end);
void sk_reverseStroke(SK_Stroke *stk);
diff --git a/source/blender/blenkernel/BKE_smoke.h b/source/blender/blenkernel/BKE_smoke.h
index 1e97bc07f99..1f824ccbafc 100644
--- a/source/blender/blenkernel/BKE_smoke.h
+++ b/source/blender/blenkernel/BKE_smoke.h
@@ -33,11 +33,11 @@
* \author Daniel Genrich
*/
-typedef float (*bresenham_callback) (float *result, float *input, int res[3], int *pixel, float *tRay, float correct);
+typedef float (*bresenham_callback)(float *result, float *input, int res[3], int *pixel, float *tRay, float correct);
void smokeModifier_do(struct SmokeModifierData *smd, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm);
-void smokeModifier_free (struct SmokeModifierData *smd);
+void smokeModifier_free(struct SmokeModifierData *smd);
void smokeModifier_reset(struct SmokeModifierData *smd);
void smokeModifier_reset_turbulence(struct SmokeModifierData *smd);
void smokeModifier_createType(struct SmokeModifierData *smd);
diff --git a/source/blender/blenkernel/BKE_softbody.h b/source/blender/blenkernel/BKE_softbody.h
index 547fd9e4393..95581958328 100644
--- a/source/blender/blenkernel/BKE_softbody.h
+++ b/source/blender/blenkernel/BKE_softbody.h
@@ -50,25 +50,25 @@ typedef struct BodyPoint {
} BodyPoint;
/* allocates and initializes general main data */
-extern struct SoftBody *sbNew(struct Scene *scene);
+extern struct SoftBody *sbNew(struct Scene *scene);
/* frees internal data and softbody itself */
-extern void sbFree(struct SoftBody *sb);
+extern void sbFree(struct SoftBody *sb);
/* frees simulation data to reset simulation */
-extern void sbFreeSimulation(struct SoftBody *sb);
+extern void sbFreeSimulation(struct SoftBody *sb);
/* do one simul step, reading and writing vertex locs from given array */
-extern void sbObjectStep(struct Scene *scene, struct Object *ob, float framnr, float (*vertexCos)[3], int numVerts);
+extern void sbObjectStep(struct Scene *scene, struct Object *ob, float framnr, float (*vertexCos)[3], int numVerts);
/* makes totally fresh start situation, resets time */
-extern void sbObjectToSoftbody(struct Object *ob);
+extern void sbObjectToSoftbody(struct Object *ob);
/* links the softbody module to a 'test for Interrupt' function */
/* pass NULL to unlink again */
extern void sbSetInterruptCallBack(int (*f)(void));
-extern void SB_estimate_transform(Object *ob, float lloc[3], float lrot[3][3], float lscale[3][3]);
+extern void SB_estimate_transform(Object * ob, float lloc[3], float lrot[3][3], float lscale[3][3]);
#endif
diff --git a/source/blender/blenkernel/BKE_subsurf.h b/source/blender/blenkernel/BKE_subsurf.h
index ea824a9998d..3b8d0eafd4d 100644
--- a/source/blender/blenkernel/BKE_subsurf.h
+++ b/source/blender/blenkernel/BKE_subsurf.h
@@ -64,10 +64,10 @@ typedef enum {
} SubsurfFlags;
struct DerivedMesh *subsurf_make_derived_from_derived(
- struct DerivedMesh *dm,
- struct SubsurfModifierData *smd,
- float (*vertCos)[3],
- SubsurfFlags flags);
+ struct DerivedMesh *dm,
+ struct SubsurfModifierData *smd,
+ float (*vertCos)[3],
+ SubsurfFlags flags);
void subsurf_calculate_limit_positions(struct Mesh *me, float (*positions_r)[3]);
@@ -107,7 +107,7 @@ typedef struct CCGDerivedMesh {
struct {int startVert; struct CCGVert *vert; } *vertMap;
struct {int startVert; int startEdge; struct CCGEdge *edge; } *edgeMap;
struct {int startVert; int startEdge;
- int startFace; struct CCGFace *face; } *faceMap;
+ int startFace; struct CCGFace *face; } *faceMap;
short *edgeFlags;
struct DMFlagMat *faceFlags;
diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h
index ed58620b716..339b78ae2d1 100644
--- a/source/blender/blenkernel/BKE_texture.h
+++ b/source/blender/blenkernel/BKE_texture.h
@@ -93,8 +93,8 @@ struct Tex *give_current_particle_texture(struct ParticleSettings *part);
struct bNode *give_current_material_texture_node(struct Material *ma);
-int give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act);
-void set_active_mtex(struct ID *id, short act);
+int give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act);
+void set_active_mtex(struct ID *id, short act);
void set_current_brush_texture(struct Brush *br, struct Tex *tex);
void set_current_world_texture(struct World *wo, struct Tex *tex);
diff --git a/source/blender/blenkernel/BKE_unit.h b/source/blender/blenkernel/BKE_unit.h
index e3ad49e2225..86f46820c97 100644
--- a/source/blender/blenkernel/BKE_unit.h
+++ b/source/blender/blenkernel/BKE_unit.h
@@ -34,10 +34,10 @@ extern "C" {
/* in all cases the value is assumed to be scaled by the user preference */
/* humanly readable representation of a value in units (used for button drawing) */
-void bUnit_AsString(char *str, int len_max, double value, int prec, int system, int type, int split, int pad);
+void bUnit_AsString(char *str, int len_max, double value, int prec, int system, int type, int split, int pad);
/* replace units with values, used before python button evaluation */
-int bUnit_ReplaceString(char *str, int len_max, const char *str_prev, double scale_pref, int system, int type);
+int bUnit_ReplaceString(char *str, int len_max, const char *str_prev, double scale_pref, int system, int type);
/* make string keyboard-friendly: 10µm --> 10um */
void bUnit_ToUnitAltName(char *str, int len_max, const char *orig_str, int system, int type);
@@ -54,23 +54,23 @@ int bUnit_IsValid(int system, int type);
/* loop over scales, coudl add names later */
//double bUnit_Iter(void **unit, char **name, int system, int type);
-void bUnit_GetSystem(void **usys_pt, int *len, int system, int type);
-int bUnit_GetBaseUnit(void *usys_pt);
-const char* bUnit_GetName(void *usys_pt, int index);
-const char* bUnit_GetNameDisplay(void *usys_pt, int index);
-double bUnit_GetScaler(void *usys_pt, int index);
+void bUnit_GetSystem(void **usys_pt, int *len, int system, int type);
+int bUnit_GetBaseUnit(void *usys_pt);
+const char *bUnit_GetName(void *usys_pt, int index);
+const char *bUnit_GetNameDisplay(void *usys_pt, int index);
+double bUnit_GetScaler(void *usys_pt, int index);
/* aligned with PropertyUnit */
-#define B_UNIT_NONE 0
-#define B_UNIT_LENGTH 1
-#define B_UNIT_AREA 2
-#define B_UNIT_VOLUME 3
-#define B_UNIT_MASS 4
-#define B_UNIT_ROTATION 5
-#define B_UNIT_TIME 6
-#define B_UNIT_VELOCITY 7
-#define B_UNIT_ACCELERATION 8
-#define B_UNIT_TYPE_TOT 9
+#define B_UNIT_NONE 0
+#define B_UNIT_LENGTH 1
+#define B_UNIT_AREA 2
+#define B_UNIT_VOLUME 3
+#define B_UNIT_MASS 4
+#define B_UNIT_ROTATION 5
+#define B_UNIT_TIME 6
+#define B_UNIT_VELOCITY 7
+#define B_UNIT_ACCELERATION 8
+#define B_UNIT_TYPE_TOT 9
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h
index 591be9e81c4..0ed2db2aad2 100644
--- a/source/blender/blenkernel/BKE_utildefines.h
+++ b/source/blender/blenkernel/BKE_utildefines.h
@@ -42,9 +42,9 @@ extern "C" {
/* these values need to be hardcoded in structs, dna does not recognize defines */
/* also defined in DNA_space_types.h */
#ifndef FILE_MAXDIR
-#define FILE_MAXDIR 768
-#define FILE_MAXFILE 256
-#define FILE_MAX 1024
+#define FILE_MAXDIR 768
+#define FILE_MAXFILE 256
+#define FILE_MAX 1024
#endif
/* this weirdo pops up in two places ... */
@@ -56,33 +56,31 @@ extern "C" {
/* INTEGER CODES */
#ifdef __BIG_ENDIAN__
- /* Big Endian */
-# define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
+/* Big Endian */
+# define MAKE_ID(a, b, c, d) ( (int)(a) << 24 | (int)(b) << 16 | (c) << 8 | (d) )
#else
- /* Little Endian */
-# define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
+/* Little Endian */
+# define MAKE_ID(a, b, c, d) ( (int)(d) << 24 | (int)(c) << 16 | (b) << 8 | (a) )
#endif
-#define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
+#define DATA MAKE_ID('D', 'A', 'T', 'A')
+#define GLOB MAKE_ID('G', 'L', 'O', 'B')
-#define DATA MAKE_ID('D','A','T','A')
-#define GLOB MAKE_ID('G','L','O','B')
+#define DNA1 MAKE_ID('D', 'N', 'A', '1')
+#define TEST MAKE_ID('T', 'E', 'S', 'T') /* used as preview between 'REND' and 'GLOB' */
+#define REND MAKE_ID('R', 'E', 'N', 'D')
+#define USER MAKE_ID('U', 'S', 'E', 'R')
-#define DNA1 MAKE_ID('D','N','A','1')
-#define TEST MAKE_ID('T','E','S','T') /* used as preview between 'REND' and 'GLOB' */
-#define REND MAKE_ID('R','E','N','D')
-#define USER MAKE_ID('U','S','E','R')
-
-#define ENDB MAKE_ID('E','N','D','B')
+#define ENDB MAKE_ID('E', 'N', 'D', 'B')
/* Bit operations */
-#define BTST(a,b) ( ( (a) & 1<<(b) )!=0 )
-#define BNTST(a,b) ( ( (a) & 1<<(b) )==0 )
-#define BTST2(a,b,c) ( BTST( (a), (b) ) || BTST( (a), (c) ) )
-#define BSET(a,b) ( (a) | 1<<(b) )
-#define BCLR(a,b) ( (a) & ~(1<<(b)) )
+#define BTST(a, b) ( ( (a) & 1 << (b) ) != 0)
+#define BNTST(a, b) ( ( (a) & 1 << (b) ) == 0)
+#define BTST2(a, b, c) (BTST( (a), (b) ) || BTST( (a), (c) ) )
+#define BSET(a, b) ( (a) | 1 << (b) )
+#define BCLR(a, b) ( (a) & ~(1 << (b)) )
/* bit-row */
-#define BROW(min, max) (((max)>=31? 0xFFFFFFFF: (1<<(max+1))-1) - ((min)? ((1<<(min))-1):0) )
+#define BROW(min, max) (((max) >= 31 ? 0xFFFFFFFF : (1 << (max + 1)) - 1) - ((min) ? ((1 << (min)) - 1) : 0) )
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_writeffmpeg.h b/source/blender/blenkernel/BKE_writeffmpeg.h
index f8382f75c0a..8a11d48d063 100644
--- a/source/blender/blenkernel/BKE_writeffmpeg.h
+++ b/source/blender/blenkernel/BKE_writeffmpeg.h
@@ -38,12 +38,12 @@
extern "C" {
#endif
-#define FFMPEG_MPEG1 0
-#define FFMPEG_MPEG2 1
-#define FFMPEG_MPEG4 2
-#define FFMPEG_AVI 3
-#define FFMPEG_MOV 4
-#define FFMPEG_DV 5
+#define FFMPEG_MPEG1 0
+#define FFMPEG_MPEG2 1
+#define FFMPEG_MPEG4 2
+#define FFMPEG_AVI 3
+#define FFMPEG_MOV 4
+#define FFMPEG_DV 5
#define FFMPEG_H264 6
#define FFMPEG_XVID 7
#define FFMPEG_FLV 8
@@ -52,14 +52,14 @@ extern "C" {
#define FFMPEG_WAV 11
#define FFMPEG_MP3 12
-#define FFMPEG_PRESET_NONE 0
-#define FFMPEG_PRESET_DVD 1
-#define FFMPEG_PRESET_SVCD 2
-#define FFMPEG_PRESET_VCD 3
-#define FFMPEG_PRESET_DV 4
-#define FFMPEG_PRESET_H264 5
-#define FFMPEG_PRESET_THEORA 6
-#define FFMPEG_PRESET_XVID 7
+#define FFMPEG_PRESET_NONE 0
+#define FFMPEG_PRESET_DVD 1
+#define FFMPEG_PRESET_SVCD 2
+#define FFMPEG_PRESET_VCD 3
+#define FFMPEG_PRESET_DV 4
+#define FFMPEG_PRESET_H264 5
+#define FFMPEG_PRESET_THEORA 6
+#define FFMPEG_PRESET_XVID 7
struct IDProperty;
struct RenderData;
@@ -69,8 +69,8 @@ struct Scene;
int BKE_ffmpeg_start(struct Scene *scene, struct RenderData *rd, int rectx, int recty, struct ReportList *reports);
void BKE_ffmpeg_end(void);
int BKE_ffmpeg_append(struct RenderData *rd, int start_frame, int frame, int *pixels,
- int rectx, int recty, struct ReportList *reports);
-void BKE_ffmpeg_filepath_get(char* string, struct RenderData* rd);
+ int rectx, int recty, struct ReportList *reports);
+void BKE_ffmpeg_filepath_get(char *string, struct RenderData *rd);
void BKE_ffmpeg_preset_set(struct RenderData *rd, int preset);
void BKE_ffmpeg_image_type_verify(struct RenderData *rd, struct ImageFormatData *imf);
diff --git a/source/blender/blenkernel/depsgraph_private.h b/source/blender/blenkernel/depsgraph_private.h
index c5e2f0900f0..512b799aeed 100644
--- a/source/blender/blenkernel/depsgraph_private.h
+++ b/source/blender/blenkernel/depsgraph_private.h
@@ -35,8 +35,8 @@
#include "BKE_constraint.h"
-#define DEPSX 5.0f
-#define DEPSY 1.8f
+#define DEPSX 5.0f
+#define DEPSY 1.8f
#define DAGQUEUEALLOC 50
@@ -48,33 +48,31 @@ enum {
-typedef struct DagAdjList
-{
+typedef struct DagAdjList {
struct DagNode *node;
short type;
- int count; // number of identical arcs
+ int count; /* number of identical arcs */
unsigned int lay; // for flushing redraw/rebuild events
const char *name;
struct DagAdjList *next;
} DagAdjList;
-typedef struct DagNode
-{
+typedef struct DagNode {
int color;
short type;
float x, y, k;
- void * ob;
- void * first_ancestor;
+ void *ob;
+ void *first_ancestor;
int ancestor_count;
- unsigned int lay; // accumulated layers of its relations + itself
- unsigned int scelay; // layers due to being in scene
- uint64_t customdata_mask; // customdata mask
- int lasttime; // if lasttime != DagForest->time, this node was not evaluated yet for flushing
- int BFS_dist; // BFS distance
- int DFS_dist; // DFS distance
- int DFS_dvtm; // DFS discovery time
- int DFS_fntm; // DFS Finishing time
+ unsigned int lay; /* accumulated layers of its relations + itself */
+ unsigned int scelay; /* layers due to being in scene */
+ uint64_t customdata_mask; /* customdata mask */
+ int lasttime; /* if lasttime != DagForest->time, this node was not evaluated yet for flushing */
+ int BFS_dist; /* BFS distance */
+ int DFS_dist; /* DFS distance */
+ int DFS_dvtm; /* DFS discovery time */
+ int DFS_fntm; /* DFS Finishing time */
struct DagAdjList *child;
struct DagAdjList *parent;
struct DagNode *next;
@@ -85,8 +83,7 @@ typedef struct DagNodeQueueElem {
struct DagNodeQueueElem *next;
} DagNodeQueueElem;
-typedef struct DagNodeQueue
-{
+typedef struct DagNodeQueue {
DagNodeQueueElem *first;
DagNodeQueueElem *last;
int count;
@@ -95,37 +92,36 @@ typedef struct DagNodeQueue
} DagNodeQueue;
// forest as we may have more than one DAG unnconected
-typedef struct DagForest
-{
+typedef struct DagForest {
ListBase DagNode;
struct GHash *nodeHash;
int numNodes;
int is_acyclic;
- int time; // for flushing/tagging, compare with node->lasttime
+ int time; /* for flushing/tagging, compare with node->lasttime */
} DagForest;
// queue operations
-DagNodeQueue * queue_create (int slots);
+DagNodeQueue *queue_create(int slots);
void queue_raz(DagNodeQueue *queue);
void push_queue(DagNodeQueue *queue, DagNode *node);
void push_stack(DagNodeQueue *queue, DagNode *node);
-DagNode * pop_queue(DagNodeQueue *queue);
-DagNode * get_top_node_queue(DagNodeQueue *queue);
+DagNode *pop_queue(DagNodeQueue *queue);
+DagNode *get_top_node_queue(DagNodeQueue *queue);
// Dag management
DagForest *getMainDag(void);
void setMainDag(DagForest *dag);
-DagForest * dag_init(void);
-DagNode * dag_find_node (DagForest *forest, void * fob);
-DagNode * dag_add_node (DagForest *forest, void * fob);
-DagNode * dag_get_node (DagForest *forest, void * fob);
-DagNode * dag_get_sub_node (DagForest *forest, void * fob);
+DagForest *dag_init(void);
+DagNode *dag_find_node(DagForest *forest, void *fob);
+DagNode *dag_add_node(DagForest *forest, void *fob);
+DagNode *dag_get_node(DagForest *forest, void *fob);
+DagNode *dag_get_sub_node(DagForest *forest, void *fob);
void dag_add_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel, const char *name);
void graph_bfs(void);
-DagNodeQueue * graph_dfs(void);
+DagNodeQueue *graph_dfs(void);
void set_node_xy(DagNode *node, float x, float y);
void graph_print_queue(DagNodeQueue *nqueue);
diff --git a/source/blender/blenkernel/nla_private.h b/source/blender/blenkernel/nla_private.h
index 51a7ac7ee62..941a74ec2ab 100644
--- a/source/blender/blenkernel/nla_private.h
+++ b/source/blender/blenkernel/nla_private.h
@@ -39,23 +39,23 @@
typedef struct NlaEvalStrip {
struct NlaEvalStrip *next, *prev;
- NlaTrack *track; /* track that this strip belongs to */
- NlaStrip *strip; /* strip that's being used */
+ NlaTrack *track; /* track that this strip belongs to */
+ NlaStrip *strip; /* strip that's being used */
- short track_index; /* the index of the track within the list */
- short strip_mode; /* which end of the strip are we looking at */
+ short track_index; /* the index of the track within the list */
+ short strip_mode; /* which end of the strip are we looking at */
- float strip_time; /* time at which which strip is being evaluated */
+ float strip_time; /* time at which which strip is being evaluated */
} NlaEvalStrip;
/* NlaEvalStrip->strip_mode */
enum {
- /* standard evaluation */
+ /* standard evaluation */
NES_TIME_BEFORE = -1,
NES_TIME_WITHIN,
NES_TIME_AFTER,
- /* transition-strip evaluations */
+ /* transition-strip evaluations */
NES_TIME_TRANSITION_START,
NES_TIME_TRANSITION_END,
} eNlaEvalStrip_StripMode;
@@ -66,11 +66,11 @@ enum {
typedef struct NlaEvalChannel {
struct NlaEvalChannel *next, *prev;
- PointerRNA ptr; /* pointer to struct containing property to use */
- PropertyRNA *prop; /* RNA-property type to use (should be in the struct given) */
- int index; /* array index (where applicable) */
+ PointerRNA ptr; /* pointer to struct containing property to use */
+ PropertyRNA *prop; /* RNA-property type to use (should be in the struct given) */
+ int index; /* array index (where applicable) */
- float value; /* value of this channel */
+ float value; /* value of this channel */
} NlaEvalChannel;
/* --------------- NLA Functions (not to be used as a proper API) ----------------------- */