Cleanup: move comments onto own lines to avoid breaking lines
This commit is contained in:
parent
b708917d94
commit
163996b681
|
@ -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,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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! */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -4507,8 +4507,9 @@ static void direct_link_pointcache_cb(FileData *fd, void *data)
|
|||
|
||||
/* the cache saves non-struct data without DNA */
|
||||
if (pm->data[i] && ptcache_data_struct[i][0] == '\0' && (fd->flags & FD_FLAGS_SWITCH_ENDIAN)) {
|
||||
int tot = (BKE_ptcache_data_size(i) * pm->totpoint) /
|
||||
sizeof(int); /* data_size returns bytes */
|
||||
/* data_size returns bytes. */
|
||||
int tot = (BKE_ptcache_data_size(i) * pm->totpoint) / sizeof(int);
|
||||
|
||||
int *poin = pm->data[i];
|
||||
|
||||
BLI_endian_switch_int32_array(poin, tot);
|
||||
|
@ -4776,8 +4777,10 @@ static void direct_link_particlesystems(FileData *fd, ListBase *particles)
|
|||
if (psys->particles && psys->particles->boid) {
|
||||
pa = psys->particles;
|
||||
pa->boid = newdataadr(fd, pa->boid);
|
||||
pa->boid->ground =
|
||||
NULL; /* This is purely runtime data, but still can be an issue if left dangling. */
|
||||
|
||||
/* This is purely runtime data, but still can be an issue if left dangling. */
|
||||
pa->boid->ground = NULL;
|
||||
|
||||
for (a = 1, pa++; a < psys->totpart; a++, pa++) {
|
||||
pa->boid = (pa - 1)->boid + 1;
|
||||
pa->boid->ground = NULL;
|
||||
|
@ -7169,8 +7172,10 @@ static void direct_link_area(FileData *fd, ScrArea *area)
|
|||
|
||||
BLI_listbase_clear(&area->handlers);
|
||||
area->type = NULL; /* spacetype callbacks */
|
||||
area->butspacetype =
|
||||
SPACE_EMPTY; /* Should always be unset so that rna_Area_type_get works correctly */
|
||||
|
||||
/* Should always be unset so that rna_Area_type_get works correctly. */
|
||||
area->butspacetype = SPACE_EMPTY;
|
||||
|
||||
area->region_active_win = -1;
|
||||
|
||||
area->flag &= ~AREA_FLAG_ACTIVE_TOOL_UPDATE;
|
||||
|
@ -7180,8 +7185,9 @@ static void direct_link_area(FileData *fd, ScrArea *area)
|
|||
/* if we do not have the spacetype registered we cannot
|
||||
* free it, so don't allocate any new memory for such spacetypes. */
|
||||
if (!BKE_spacetype_exists(area->spacetype)) {
|
||||
area->butspacetype =
|
||||
area->spacetype; /* Hint for versioning code to replace deprecated space types. */
|
||||
/* Hint for versioning code to replace deprecated space types. */
|
||||
area->butspacetype = area->spacetype;
|
||||
|
||||
area->spacetype = SPACE_EMPTY;
|
||||
}
|
||||
|
||||
|
|
|
@ -791,8 +791,8 @@ void ArmatureImporter::make_armatures(bContext *C, std::vector<Object *> &object
|
|||
std::vector<Object *> ob_arms;
|
||||
std::map<COLLADAFW::UniqueId, SkinInfo>::iterator it;
|
||||
|
||||
leaf_bone_length =
|
||||
FLT_MAX; /*TODO: Make this work for more than one armature in the import file*/
|
||||
/* TODO: Make this work for more than one armature in the import file. */
|
||||
leaf_bone_length = FLT_MAX;
|
||||
|
||||
for (it = skin_by_data_uid.begin(); it != skin_by_data_uid.end(); it++) {
|
||||
|
||||
|
|
|
@ -1554,9 +1554,8 @@ static void screen_px_from_persp(const float uv[2],
|
|||
w_int[2] *= wtot_inv;
|
||||
}
|
||||
else {
|
||||
w[0] = w[1] = w[2] =
|
||||
/* dummy values for zero area face */
|
||||
w_int[0] = w_int[1] = w_int[2] = 1.0f / 3.0f;
|
||||
/* Dummy values for zero area face. */
|
||||
w[0] = w[1] = w[2] = w_int[0] = w_int[1] = w_int[2] = 1.0f / 3.0f;
|
||||
}
|
||||
/* done re-weighting */
|
||||
|
||||
|
|
|
@ -198,8 +198,10 @@ static PyObject *Stroke_insert_vertex(BPy_Stroke *self, PyObject *args, PyObject
|
|||
&py_sv_it)) {
|
||||
return NULL;
|
||||
}
|
||||
((BPy_StrokeVertex *)py_sv)->py_cp.py_if0D.borrowed =
|
||||
true; /* make the wrapped StrokeVertex internal */
|
||||
|
||||
/* Make the wrapped StrokeVertex internal. */
|
||||
((BPy_StrokeVertex *)py_sv)->py_cp.py_if0D.borrowed = true;
|
||||
|
||||
StrokeVertex *sv = ((BPy_StrokeVertex *)py_sv)->sv;
|
||||
StrokeInternal::StrokeVertexIterator sv_it(*(((BPy_StrokeVertexIterator *)py_sv_it)->sv_it));
|
||||
self->s->InsertVertex(sv, sv_it);
|
||||
|
|
|
@ -180,10 +180,10 @@ static const GPUShaderInput *add_uniform(GPUShaderInterface *shaderface, const c
|
|||
|
||||
input->location = glGetUniformLocation(shaderface->program, name);
|
||||
|
||||
uint name_len = strlen(name);
|
||||
const uint name_len = strlen(name);
|
||||
/* Include NULL terminator. */
|
||||
shaderface->name_buffer = MEM_reallocN(shaderface->name_buffer,
|
||||
shaderface->name_buffer_offset + name_len +
|
||||
1); /* include NULL terminator */
|
||||
shaderface->name_buffer_offset + name_len + 1);
|
||||
char *name_buffer = shaderface->name_buffer + shaderface->name_buffer_offset;
|
||||
strcpy(name_buffer, name);
|
||||
|
||||
|
|
|
@ -493,11 +493,12 @@ bool IMB_initImBuf(
|
|||
ibuf->y = y;
|
||||
ibuf->planes = planes;
|
||||
ibuf->ftype = IMB_FTYPE_PNG;
|
||||
ibuf->foptions.quality =
|
||||
15; /* the 15 means, set compression to low ratio but not time consuming */
|
||||
ibuf->channels = 4; /* float option, is set to other values when buffers get assigned */
|
||||
ibuf->ppm[0] = ibuf->ppm[1] = IMB_DPI_DEFAULT /
|
||||
0.0254f; /* IMB_DPI_DEFAULT -> pixels-per-meter */
|
||||
/* The '15' means, set compression to low ratio but not time consuming. */
|
||||
ibuf->foptions.quality = 15;
|
||||
/* float option, is set to other values when buffers get assigned. */
|
||||
ibuf->channels = 4;
|
||||
/* IMB_DPI_DEFAULT -> pixels-per-meter. */
|
||||
ibuf->ppm[0] = ibuf->ppm[1] = IMB_DPI_DEFAULT / 0.0254f;
|
||||
|
||||
if (flags & IB_rect) {
|
||||
if (imb_addrectImBuf(ibuf) == false) {
|
||||
|
|
|
@ -1449,12 +1449,12 @@ static StructRNA *rna_Operator_register(Main *bmain,
|
|||
|
||||
/* setup dummy operator & operator type to store static properties in */
|
||||
dummyop.type = &dummyot;
|
||||
dummyot.idname = temp_buffers.idname; /* only assigne the pointer, string is NULL'd */
|
||||
dummyot.name = temp_buffers.name; /* only assigne the pointer, string is NULL'd */
|
||||
dummyot.description = temp_buffers.description; /* only assigne the pointer, string is NULL'd */
|
||||
dummyot.idname = temp_buffers.idname; /* only assign the pointer, string is NULL'd */
|
||||
dummyot.name = temp_buffers.name; /* only assign the pointer, string is NULL'd */
|
||||
dummyot.description = temp_buffers.description; /* only assign the pointer, string is NULL'd */
|
||||
dummyot.translation_context =
|
||||
temp_buffers.translation_context; /* only assigne the pointer, string is NULL'd */
|
||||
dummyot.undo_group = temp_buffers.undo_group; /* only assigne the pointer, string is NULL'd */
|
||||
temp_buffers.translation_context; /* only assign the pointer, string is NULL'd */
|
||||
dummyot.undo_group = temp_buffers.undo_group; /* only assign the pointer, string is NULL'd */
|
||||
RNA_pointer_create(NULL, &RNA_Operator, &dummyop, &dummyotr);
|
||||
|
||||
/* clear in case they are left unset */
|
||||
|
@ -1597,12 +1597,12 @@ static StructRNA *rna_MacroOperator_register(Main *bmain,
|
|||
|
||||
/* setup dummy operator & operator type to store static properties in */
|
||||
dummyop.type = &dummyot;
|
||||
dummyot.idname = temp_buffers.idname; /* only assigne the pointer, string is NULL'd */
|
||||
dummyot.name = temp_buffers.name; /* only assigne the pointer, string is NULL'd */
|
||||
dummyot.description = temp_buffers.description; /* only assigne the pointer, string is NULL'd */
|
||||
dummyot.idname = temp_buffers.idname; /* only assign the pointer, string is NULL'd */
|
||||
dummyot.name = temp_buffers.name; /* only assign the pointer, string is NULL'd */
|
||||
dummyot.description = temp_buffers.description; /* only assign the pointer, string is NULL'd */
|
||||
dummyot.translation_context =
|
||||
temp_buffers.translation_context; /* only assigne the pointer, string is NULL'd */
|
||||
dummyot.undo_group = temp_buffers.undo_group; /* only assigne the pointer, string is NULL'd */
|
||||
temp_buffers.translation_context; /* only assign the pointer, string is NULL'd */
|
||||
dummyot.undo_group = temp_buffers.undo_group; /* only assign the pointer, string is NULL'd */
|
||||
RNA_pointer_create(NULL, &RNA_Macro, &dummyop, &dummyotr);
|
||||
|
||||
/* clear in case they are left unset */
|
||||
|
|
|
@ -841,8 +841,10 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
|
|||
/* notice we use 'mp->totloop' which is later overwritten,
|
||||
* we could lookup the original face but there's no point since this is a copy
|
||||
* and will have the same value, just take care when changing order of assignment */
|
||||
k1 = mpoly[pidx].loopstart +
|
||||
(((edge_order[eidx] - 1) + mp->totloop) % mp->totloop); /* prev loop */
|
||||
|
||||
/* prev loop */
|
||||
k1 = mpoly[pidx].loopstart + (((edge_order[eidx] - 1) + mp->totloop) % mp->totloop);
|
||||
|
||||
k2 = mpoly[pidx].loopstart + (edge_order[eidx]);
|
||||
|
||||
mp->totloop = 4;
|
||||
|
|
|
@ -698,8 +698,8 @@ void BPH_hair_volume_normalize_vertex_grid(HairGrid *grid)
|
|||
}
|
||||
}
|
||||
|
||||
static const float density_threshold =
|
||||
0.001f; /* cells with density below this are considered empty */
|
||||
/* Cells with density below this are considered empty. */
|
||||
static const float density_threshold = 0.001f;
|
||||
|
||||
/* Contribution of target density pressure to the laplacian in the pressure poisson equation.
|
||||
* This is based on the model found in
|
||||
|
|
|
@ -335,8 +335,10 @@ RenderResult *render_result_new(Render *re,
|
|||
|
||||
BLI_strncpy(rl->name, view_layer->name, sizeof(rl->name));
|
||||
rl->layflag = view_layer->layflag;
|
||||
rl->passflag =
|
||||
view_layer->passflag; /* for debugging: view_layer->passflag | SCE_PASS_RAYHITS; */
|
||||
|
||||
/* for debugging: view_layer->passflag | SCE_PASS_RAYHITS; */
|
||||
rl->passflag = view_layer->passflag;
|
||||
|
||||
rl->rectx = rectx;
|
||||
rl->recty = recty;
|
||||
|
||||
|
|
|
@ -1201,8 +1201,8 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
|
|||
//# define USE_WIN_ACTIVATE
|
||||
#endif
|
||||
|
||||
wm->winactive =
|
||||
win; /* no context change! c->wm->windrawable is drawable, or for area queues */
|
||||
/* No context change! C->wm->windrawable is drawable, or for area queues. */
|
||||
wm->winactive = win;
|
||||
|
||||
win->active = 1;
|
||||
// window_handle(win, INPUTCHANGE, win->active);
|
||||
|
@ -1454,8 +1454,9 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
|
|||
event.prevx = event.x;
|
||||
event.prevy = event.y;
|
||||
|
||||
wm->winactive =
|
||||
win; /* no context change! c->wm->windrawable is drawable, or for area queues */
|
||||
/* No context change! C->wm->windrawable is drawable, or for area queues. */
|
||||
wm->winactive = win;
|
||||
|
||||
win->active = 1;
|
||||
|
||||
wm_event_add(win, &event);
|
||||
|
|
Loading…
Reference in New Issue