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>2019-07-02 15:17:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-07-02 15:17:22 +0300
commit163996b68129f3a34db73c6a6a1e81ec8f4a81e4 (patch)
treea78662ee2ff3ce658f5a29ff241944ac7bd2953f /source/blender/blenkernel
parentb708917d94afa3a77be5e571b1c36a364d2ec6b5 (diff)
Cleanup: move comments onto own lines to avoid breaking lines
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_library_query.h7
-rw-r--r--source/blender/blenkernel/intern/action.c4
-rw-r--r--source/blender/blenkernel/intern/brush.c14
-rw-r--r--source/blender/blenkernel/intern/cloth.c6
-rw-r--r--source/blender/blenkernel/intern/data_transfer.c4
-rw-r--r--source/blender/blenkernel/intern/image_gen.c4
-rw-r--r--source/blender/blenkernel/intern/library.c5
-rw-r--r--source/blender/blenkernel/intern/mask_rasterize.c8
-rw-r--r--source/blender/blenkernel/intern/mesh_evaluate.c6
-rw-r--r--source/blender/blenkernel/intern/mesh_mapping.c12
-rw-r--r--source/blender/blenkernel/intern/softbody.c4
11 files changed, 44 insertions, 30 deletions
diff --git a/source/blender/blenkernel/BKE_library_query.h b/source/blender/blenkernel/BKE_library_query.h
index 4f74b2b5a6b..b959b55b1d6 100644
--- a/source/blender/blenkernel/BKE_library_query.h
+++ b/source/blender/blenkernel/BKE_library_query.h
@@ -65,9 +65,10 @@ enum {
enum {
IDWALK_RET_NOP = 0,
- IDWALK_RET_STOP_ITER = 1 << 0, /* Completely stop iteration. */
- IDWALK_RET_STOP_RECURSION =
- 1 << 1, /* Stop recursion, that is, do not loop over ID used by current one. */
+ /** Completely stop iteration. */
+ IDWALK_RET_STOP_ITER = 1 << 0,
+ /** Stop recursion, that is, do not loop over ID used by current one. */
+ IDWALK_RET_STOP_RECURSION = 1 << 1,
};
/**
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 65b837048cb..6dd4eefc014 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -1522,8 +1522,8 @@ void what_does_obaction(
workob->constraints.first = ob->constraints.first;
workob->constraints.last = ob->constraints.last;
- workob->pose =
- pose; /* need to set pose too, since this is used for both types of Action Constraint */
+ /* Need to set pose too, since this is used for both types of Action Constraint. */
+ workob->pose = pose;
if (pose) {
/* This function is most likely to be used with a temporary pose with a single bone in there.
* For such cases it makes no sense to create hash since it'll only waste CPU ticks on memory
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 78d965564e6..ec9a774a65c 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -73,8 +73,8 @@ static void brush_defaults(Brush *brush)
brush->topology_rake_factor = 0.0f;
brush->crease_pinch_factor = 0.5f;
brush->sculpt_plane = SCULPT_DISP_DIR_AREA;
- brush->plane_offset =
- 0.0f; /* how far above or below the plane that is found by averaging the faces */
+ /* How far above or below the plane that is found by averaging the faces. */
+ brush->plane_offset = 0.0f;
brush->plane_trim = 0.5f;
brush->clone.alpha = 0.5f;
brush->normal_weight = 0.0f;
@@ -82,7 +82,8 @@ static void brush_defaults(Brush *brush)
brush->flag |= BRUSH_ALPHA_PRESSURE;
/* BRUSH PAINT TOOL SETTINGS */
- brush->rgb[0] = 1.0f; /* default rgb color of the brush when painting - white */
+ /* Default rgb color of the brush when painting - white. */
+ brush->rgb[0] = 1.0f;
brush->rgb[1] = 1.0f;
brush->rgb[2] = 1.0f;
@@ -90,13 +91,14 @@ static void brush_defaults(Brush *brush)
/* BRUSH STROKE SETTINGS */
brush->flag |= (BRUSH_SPACE | BRUSH_SPACE_ATTEN);
- brush->spacing =
- 10; /* how far each brush dot should be spaced as a percentage of brush diameter */
+ /* How far each brush dot should be spaced as a percentage of brush diameter. */
+ brush->spacing = 10;
brush->smooth_stroke_radius = 75;
brush->smooth_stroke_factor = 0.9f;
- brush->rate = 0.1f; /* time delay between dots of paint or sculpting when doing airbrush mode */
+ /* Time delay between dots of paint or sculpting when doing airbrush mode. */
+ brush->rate = 0.1f;
brush->jitter = 0.0f;
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index dc238641a86..63d58f7e32e 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -105,8 +105,10 @@ void cloth_init(ClothModifierData *clmd)
clmd->sim_parms->maxspringlen = 10;
clmd->sim_parms->vgroup_mass = 0;
clmd->sim_parms->vgroup_shrink = 0;
- clmd->sim_parms->shrink_min =
- 0.0f; /* min amount the fabric will shrink by 0.0 = no shrinking, 1.0 = shrink to nothing*/
+
+ /* Min amount the fabric will shrink by 0.0 = no shrinking, 1.0 = shrink to nothing. */
+ clmd->sim_parms->shrink_min = 0.0f;
+
clmd->sim_parms->avg_spring_len = 0.0;
clmd->sim_parms->presets = 2; /* cotton as start setting */
clmd->sim_parms->timescale = 1.0f; /* speed factor, describes how fast cloth moves */
diff --git a/source/blender/blenkernel/intern/data_transfer.c b/source/blender/blenkernel/intern/data_transfer.c
index 8dcf1f0d001..2640683811f 100644
--- a/source/blender/blenkernel/intern/data_transfer.c
+++ b/source/blender/blenkernel/intern/data_transfer.c
@@ -1408,8 +1408,8 @@ bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph,
SpaceTransform auto_space_transform;
Mesh *me_src;
- bool dirty_nors_dst =
- true; /* Assumed always true if not using an evaluated mesh as destination. */
+ /* Assumed always true if not using an evaluated mesh as destination. */
+ bool dirty_nors_dst = true;
int i;
MDeformVert *mdef = NULL;
diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c
index c7fdfb60a1c..6f53c351626 100644
--- a/source/blender/blenkernel/intern/image_gen.c
+++ b/source/blender/blenkernel/intern/image_gen.c
@@ -242,9 +242,9 @@ static void checker_board_color_fill(
}
for (y = offset; y < height + offset; y++) {
+ /* Use a number lower then 1.0 else its too bright. */
+ hsv[2] = 0.1 + (y * (0.4 / total_height));
- hsv[2] = 0.1 +
- (y * (0.4 / total_height)); /* use a number lower then 1.0 else its too bright */
for (x = 0; x < width; x++) {
hsv[0] = (float)((double)(x / hue_step) * 1.0 / width * hue_step);
hsv_to_rgb_v(hsv, rgb);
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 974c6d6e0a6..ab5ae7be5a6 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -1855,8 +1855,9 @@ static void library_make_local_copying_check(ID *id,
MainIDRelationsEntry *entry = BLI_ghash_lookup(id_relations->id_used_to_user, id);
BLI_gset_insert(loop_tags, id);
for (; entry != NULL; entry = entry->next) {
- ID *par_id =
- (ID *)entry->id_pointer; /* used_to_user stores ID pointer, not pointer to ID pointer... */
+
+ /* Used_to_user stores ID pointer, not pointer to ID pointer. */
+ ID *par_id = (ID *)entry->id_pointer;
/* Our oh-so-beloved 'from' pointers... */
if (entry->usage_flag & IDWALK_CB_LOOPBACK) {
diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c
index 6ab888ce2ea..2ab5b69a022 100644
--- a/source/blender/blenkernel/intern/mask_rasterize.c
+++ b/source/blender/blenkernel/intern/mask_rasterize.c
@@ -721,7 +721,7 @@ void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle,
}
if (is_fill) {
- /* applt intersections depending on fill settings */
+ /* Apply intersections depending on fill settings. */
if (spline->flag & MASK_SPLINE_NOINTERSECT) {
BKE_mask_spline_feather_collapse_inner_loops(
spline, diff_feather_points, tot_diff_feather_points);
@@ -730,8 +730,10 @@ void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle,
copy_v2_v2(co, diff_points[0]);
sf_vert_prev = BLI_scanfill_vert_add(&sf_ctx, co);
sf_vert_prev->tmp.u = sf_vert_tot;
- sf_vert_prev->keyindex = sf_vert_tot +
- tot_diff_point; /* absolute index of feather vert */
+
+ /* Absolute index of feather vert. */
+ sf_vert_prev->keyindex = sf_vert_tot + tot_diff_point;
+
sf_vert_tot++;
/* TODO, an alternate functions so we can avoid double vector copy! */
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index f53700fbfb0..17b22a6d095 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.c
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -1164,8 +1164,10 @@ static void split_loop_nor_fan_do(LoopSplitTaskDataCommon *common_data, LoopSpli
*/
const unsigned int mv_pivot_index = ml_curr->v; /* The vertex we are "fanning" around! */
const MVert *mv_pivot = &mverts[mv_pivot_index];
- const MEdge *me_org =
- &medges[ml_curr->e]; /* ml_curr would be mlfan_prev if we needed that one */
+
+ /* ml_curr would be mlfan_prev if we needed that one. */
+ const MEdge *me_org = &medges[ml_curr->e];
+
const int *e2lfan_curr;
float vec_curr[3], vec_prev[3], vec_org[3];
const MLoop *mlfan_curr;
diff --git a/source/blender/blenkernel/intern/mesh_mapping.c b/source/blender/blenkernel/intern/mesh_mapping.c
index 40e300e6e2d..7f64b156747 100644
--- a/source/blender/blenkernel/intern/mesh_mapping.c
+++ b/source/blender/blenkernel/intern/mesh_mapping.c
@@ -656,8 +656,10 @@ static void poly_edge_loop_islands_calc(const MEdge *medge,
int poly_prev = 0;
const int temp_poly_group_id = 3; /* Placeholder value. */
- const int poly_group_id_overflowed =
- 5; /* Group we could not find any available bit, will be reset to 0 at end */
+
+ /* Group we could not find any available bit, will be reset to 0 at end. */
+ const int poly_group_id_overflowed = 5;
+
int tot_group = 0;
bool group_id_overflow = false;
@@ -780,8 +782,10 @@ static void poly_edge_loop_islands_calc(const MEdge *medge,
"Warning, could not find an available id for current smooth group, faces will me "
"marked "
"as out of any smooth group...\n");
- poly_group_id =
- poly_group_id_overflowed; /* Can't use 0, will have to set them to this value later. */
+
+ /* Can't use 0, will have to set them to this value later. */
+ poly_group_id = poly_group_id_overflowed;
+
group_id_overflow = true;
}
if (gid_bit > tot_group) {
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 5af3f22cad2..b54c11daf03 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -155,8 +155,8 @@ typedef struct SB_thread_context {
#define BFF_INTERSECT 1 /* collider edge intrudes face */
#define BFF_CLOSEVERT 2 /* collider vertex repulses face */
-static float SoftHeunTol =
- 1.0f; /* humm .. this should be calculated from sb parameters and sizes */
+/* humm .. this should be calculated from sb parameters and sizes. */
+static float SoftHeunTol = 1.0f;
/* local prototypes */
static void free_softbody_intern(SoftBody *sb);