[Bf-blender-cvs] [91a155833e5] master: Cleanup: comments causing bad clang-format output

Campbell Barton noreply at git.blender.org
Tue Jan 8 00:39:02 CET 2019


Commit: 91a155833e59275089641b63ae9271672ac17713
Author: Campbell Barton
Date:   Tue Jan 8 10:28:20 2019 +1100
Branches: master
https://developer.blender.org/rB91a155833e59275089641b63ae9271672ac17713

Cleanup: comments causing bad clang-format output

===================================================================

M	source/blender/blenkernel/intern/object.c
M	source/blender/blenkernel/intern/particle_system.c
M	source/blender/blenlib/BLI_kdopbvh.h
M	source/blender/blenlib/BLI_voronoi_2d.h
M	source/blender/bmesh/tools/bmesh_decimate_collapse.c
M	source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
M	source/blender/draw/engines/eevee/eevee_private.h
M	source/blender/draw/engines/workbench/workbench_private.h
M	source/blender/editors/armature/armature_intern.h
M	source/blender/editors/armature/pose_edit.c
M	source/blender/editors/armature/pose_lib.c
M	source/blender/editors/gpencil/annotate_paint.c
M	source/blender/editors/gpencil/gpencil_paint.c
M	source/blender/editors/sculpt_paint/paint_image_proj.c
M	source/blender/editors/space_view3d/view3d_camera_control.c
M	source/blender/editors/transform/transform.h
M	source/blender/freestyle/intern/stroke/Stroke.h
M	source/blender/modifiers/intern/MOD_screw.c

===================================================================

diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 42b187ec57f..8ce43049265 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1144,7 +1144,8 @@ static void copy_object_pose(Object *obn, const Object *ob, const int flag)
 {
 	bPoseChannel *chan;
 
-	/* note: need to clear obn->pose pointer first, so that BKE_pose_copy_data works (otherwise there's a crash) */
+	/* note: need to clear obn->pose pointer first,
+	 * so that BKE_pose_copy_data works (otherwise there's a crash) */
 	obn->pose = NULL;
 	BKE_pose_copy_data_ex(&obn->pose, ob->pose, flag, true);  /* true = copy constraints */
 
@@ -1626,7 +1627,8 @@ void BKE_object_make_proxy(Main *bmain, Object *ob, Object *target, Object *cob)
 		ob->mat = MEM_dupallocN(target->mat);
 		ob->matbits = MEM_dupallocN(target->matbits);
 		for (i = 0; i < target->totcol; i++) {
-			/* don't need to run test_object_materials since we know this object is new and not used elsewhere */
+			/* don't need to run test_object_materials
+			 * since we know this object is new and not used elsewhere */
 			id_us_plus((ID *)ob->mat[i]);
 		}
 	}
@@ -2788,15 +2790,24 @@ void BKE_scene_foreach_display_point(
 /* copied from DNA_object_types.h */
 typedef struct ObTfmBack {
 	float loc[3], dloc[3], orig[3];
-	float size[3], dscale[3];   /* scale and delta scale */
-	float rot[3], drot[3];      /* euler rotation */
-	float quat[4], dquat[4];    /* quaternion rotation */
-	float rotAxis[3], drotAxis[3];  /* axis angle rotation - axis part */
-	float rotAngle, drotAngle;  /* axis angle rotation - angle part */
-	float obmat[4][4];      /* final worldspace matrix with constraints & animsys applied */
-	float parentinv[4][4]; /* inverse result of parent, so that object doesn't 'stick' to parent */
-	float constinv[4][4]; /* inverse result of constraints. doesn't include effect of parent or object local transform */
-	float imat[4][4];   /* inverse matrix of 'obmat' for during render, temporally: ipokeys of transform  */
+	/** scale and delta scale. */
+	float size[3], dscale[3];
+	/** euler rotation. */
+	float rot[3], drot[3];
+	/** quaternion rotation. */
+	float quat[4], dquat[4];
+	/** axis angle rotation - axis part. */
+	float rotAxis[3], drotAxis[3];
+	/** axis angle rotation - angle part. */
+	float rotAngle, drotAngle;
+	/** final worldspace matrix with constraints & animsys applied. */
+	float obmat[4][4];
+	/** inverse result of parent, so that object doesn't 'stick' to parent. */
+	float parentinv[4][4];
+	/** inverse result of constraints. doesn't include effect of parent or object local transform. */
+	float constinv[4][4];
+	/** inverse matrix of 'obmat' for during render, temporally: ipokeys of transform. */
+	float imat[4][4];
 } ObTfmBack;
 
 void *BKE_object_tfm_backup(Object *ob)
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 8d09215c564..86d2ceddced 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -1688,7 +1688,8 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa
 	/* 4.0 seems to be a pretty good value */
 	float interaction_radius = fluid->radius * (fluid->flag & SPH_FAC_RADIUS ? 4.0f * pa->size : 1.0f);
 	float h = interaction_radius * sphdata->hfac;
-	float rest_density = fluid->rest_density * (fluid->flag & SPH_FAC_DENSITY ? 4.77f : 1.f); /* 4.77 is an experimentally determined density factor */
+	/* 4.77 is an experimentally determined density factor */
+	float rest_density = fluid->rest_density * (fluid->flag & SPH_FAC_DENSITY ? 4.77f : 1.f);
 	float rest_length = fluid->rest_length * (fluid->flag & SPH_FAC_REST_LENGTH ? 2.588f * pa->size : 1.f);
 
 	float stiffness = fluid->stiffness_k;
@@ -2657,12 +2658,18 @@ static int collision_response(ParticleSimulationData *sim, ParticleData *pa, Par
 	ParticleCollisionElement *pce = &col->pce;
 	PartDeflect *pd = col->hit->pd;
 	RNG *rng = sim->rng;
-	float co[3];										/* point of collision */
-	float x = hit->dist/col->original_ray_length;		/* location factor of collision between this iteration */
-	float f = col->f + x * (1.0f - col->f);				/* time factor of collision between timestep */
-	float dt1 = (f - col->f) * col->total_time;			/* time since previous collision (in seconds) */
-	float dt2 = (1.0f - f) * col->total_time;			/* time left after collision (in seconds) */
-	int through = (BLI_rng_get_float(rng) < pd->pdef_perm) ? 1 : 0; /* did particle pass through the collision surface? */
+	/* point of collision */
+	float co[3];
+	/* location factor of collision between this iteration */
+	float x = hit->dist/col->original_ray_length;
+	/* time factor of collision between timestep */
+	float f = col->f + x * (1.0f - col->f);
+	/* time since previous collision (in seconds) */
+	float dt1 = (f - col->f) * col->total_time;
+	/* time left after collision (in seconds) */
+	float dt2 = (1.0f - f) * col->total_time;
+	/* did particle pass through the collision surface? */
+	int through = (BLI_rng_get_float(rng) < pd->pdef_perm) ? 1 : 0;
 
 	/* calculate exact collision location */
 	interp_v3_v3v3(co, col->co1, col->co2, x);
@@ -2682,10 +2689,14 @@ static int collision_response(ParticleSimulationData *sim, ParticleData *pa, Par
 	}
 	/* figure out velocity and other data after collision */
 	else {
-		float v0[3];	/* velocity directly before collision to be modified into velocity directly after collision */
-		float v0_nor[3];/* normal component of v0 */
-		float v0_tan[3];/* tangential component of v0 */
-		float vc_tan[3];/* tangential component of collision surface velocity */
+		/* velocity directly before collision to be modified into velocity directly after collision */
+		float v0[3];
+		/* normal component of v0 */
+		float v0_nor[3];
+		/* tangential component of v0 */
+		float v0_tan[3];
+		/* tangential component of collision surface velocity */
+		float vc_tan[3];
 		float v0_dot, vc_dot;
 		float damp = pd->pdef_damp + pd->pdef_rdamp * 2 * (BLI_rng_get_float(rng) - 0.5f);
 		float frict = pd->pdef_frict + pd->pdef_rfrict * 2 * (BLI_rng_get_float(rng) - 0.5f);
@@ -2728,7 +2739,8 @@ static int collision_response(ParticleSimulationData *sim, ParticleData *pa, Par
 				madd_v3_v3fl(v1_tan, vr_tan, -0.4);
 				mul_v3_fl(v1_tan, 1.0f/1.4f); /* 1/(1+0.4) */
 
-				/* rolling friction is around 0.01 of sliding friction (could be made a parameter) */
+				/* rolling friction is around 0.01 of sliding friction
+				 * (could be made a parameter) */
 				mul_v3_fl(v1_tan, 1.0f - 0.01f * frict);
 
 				/* surface_velocity is opposite to cm velocity */
@@ -3185,7 +3197,8 @@ static void do_hair_dynamics(ParticleSimulationData *sim)
 		}
 	}
 
-	realloc_roots = false; /* whether hair root info array has to be reallocated */
+	/* whether hair root info array has to be reallocated */
+	realloc_roots = false;
 	if (psys->hair_in_mesh) {
 		Mesh *mesh = psys->hair_in_mesh;
 		if (totpoint != mesh->totvert || totedge != mesh->totedge) {
diff --git a/source/blender/blenlib/BLI_kdopbvh.h b/source/blender/blenlib/BLI_kdopbvh.h
index e4203a01b17..d83de68169e 100644
--- a/source/blender/blenlib/BLI_kdopbvh.h
+++ b/source/blender/blenlib/BLI_kdopbvh.h
@@ -61,27 +61,41 @@ typedef struct BVHTreeOverlap {
 } BVHTreeOverlap;
 
 typedef struct BVHTreeNearest {
-	int index;          /* the index of the nearest found (untouched if none is found within a dist radius from the given coordinates) */
-	float co[3];        /* nearest coordinates (untouched it none is found within a dist radius from the given coordinates) */
-	float no[3];        /* normal at nearest coordinates (untouched it none is found within a dist radius from the given coordinates) */
-	float dist_sq;      /* squared distance to search around */
+	/** The index of the nearest found
+	 * (untouched if none is found within a dist radius from the given coordinates) */
+	int index;
+	/** Nearest coordinates
+	 * (untouched it none is found within a dist radius from the given coordinates). */
+	float co[3];
+	/** Normal at nearest coordinates
+	 * (untouched it none is found within a dist radius from the given coordinates). */
+	float no[3];
+	/** squared distance to search around */
+	float dist_sq;
 	int flags;
 } BVHTreeNearest;
 
 typedef struct BVHTreeRay {
-	float origin[3];    /* ray origin */
-	float direction[3]; /* ray direction */
-	float radius;       /* radius around ray */
+	/** ray origin */
+	float origin[3];
+	/** ray direction */
+	float direction[3];
+	/** radius around ray */
+	float radius;
 #ifdef USE_KDOPBVH_WATERTIGHT
 	struct IsectRayPrecalc *isect_precalc;
 #endif
 } BVHTreeRay;
 
 typedef struct BVHTreeRayHit {
-	int index;          /* index of the tree node (untouched if no hit is found) */
-	float co[3];        /* coordinates of the hit point */
-	float no[3];        /* normal on hit point */
-	float dist;         /* distance to the hit point */
+	/** Index of the tree node (untouched if no hit is found). */
+	int index;
+	/** Coordinates of the hit point. */
+	float co[3];
+	/** Normal on hit point. */
+	float no[3];
+	/** Distance to the hit point. */
+	float dist;
 } BVHTreeRayHit;
 
 enum {
diff --git a/source/blender/blenlib/BLI_voronoi_2d.h b/source/blender/blenlib/BLI_voronoi_2d.h
index 8d1ff2d4c2b..7caba2b0692 100644
--- a/source/blender/blenlib/BLI_voronoi_2d.h
+++ b/source/blender/blenlib/BLI_voronoi_2d.h
@@ -40,18 +40,24 @@ typedef struct VoronoiSite {
 typedef struct VoronoiEdge {
 	struct VoronoiEdge *next, *prev;
 
-	float start[2], end[2];	/* start and end points */
+	/* start and end points */
+	float start[2], end[2];
 
 	/* this fields are used during diagram computation only */
 
-	float direction[2];		/* directional vector, from "start", points to "end", normal of |left, right| */
+	/* directional vector, from "start", points to "end", normal of |left, right| */
+	float direction[2];
 
-	float left[2];			/* point on Voronoi place on the left side of edge */
-	float right[2];			/* point on Voronoi place on the right side of edge */
+	/* point on Voronoi place on the left side o

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list