Cleanup: formatting, spelling

This commit is contained in:
Campbell Barton
2020-03-03 22:06:52 +11:00
parent 582205c134
commit ce2dc6ef2b
12 changed files with 22 additions and 25 deletions

View File

@@ -6377,8 +6377,8 @@ static int dynamicPaint_doStep(Depsgraph *depsgraph,
return ret;
}
/*
* Calculate a single frame and included subframes for surface
/**
* Calculate a single frame and included sub-frames for surface.
*/
int dynamicPaint_calculateFrame(DynamicPaintSurface *surface,
struct Depsgraph *depsgraph,

View File

@@ -323,7 +323,7 @@ MINLINE int compare_rgb_uchar(const unsigned char col_a[3],
MINLINE float dither_random_value(float s, float t)
{
/* Original code from https://www.shadertoy.com/view/4t2SDh */
/* The nois reshaping technique does not work on CPU.
/* The noise reshaping technique does not work on CPU.
* We generate and merge two distribution instead */
/* Uniform noise in [0..1[ range */
float nrnd0 = sinf(s * 12.9898f + t * 78.233f) * 43758.5453f;

View File

@@ -7676,8 +7676,8 @@ static void *restore_pointer_by_name_main(Main *mainp, ID *id, ePointerUserMode
* Only for undo files, or to restore a screen after reading without UI...
*
* \param user:
* - USER_IGNORE: no usercount change
* - USER_REAL: ensure a real user (even if a fake one is set)
* - USER_IGNORE: no user-count change.
* - USER_REAL: ensure a real user (even if a fake one is set).
* \param id_map: lookup table, use when performing many lookups.
* this could be made an optional argument (falling back to a full lookup),
* however at the moment it's always available.

View File

@@ -1250,12 +1250,13 @@ static void update_noise_and_wave_distortion(bNodeTree *ntree)
}
}
/* Wave Texture node: Restore previous texture directions and offset.
/**
* Wave Texture node: Restore previous texture directions and offset.
* 1. In 2.81, Wave texture had fixed diagonal direction (Bands) or
* mapping along distance (Rings). Now, directions are customizable
* properties, with X axis being new default. To fix this we set new
* direction options to Diagonal and Spherical.
* 2. Sine profile is now negatively offseted by PI/2 to better match
* 2. Sine profile is now negatively offset by PI/2 to better match
* other profiles. To fix this we set new Phase Offset input to PI/2
* in nodes with Sine profile.
*/

View File

@@ -789,10 +789,10 @@ void EEVEE_lightprobes_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *ved
if (pinfo->do_grid_update) {
scene_orig->eevee.light_cache->flag |= LIGHTCACHE_UPDATE_GRID;
}
/* If we update grid we need to update the cubemaps too.
* So always refresh cubemaps. */
/* If we update grid we need to update the cube-maps too.
* So always refresh cube-maps. */
scene_orig->eevee.light_cache->flag |= LIGHTCACHE_UPDATE_CUBE;
/* Tag the lightcache to auto update. */
/* Tag the light-cache to auto update. */
scene_orig->eevee.light_cache->flag |= LIGHTCACHE_UPDATE_AUTO;
/* Use a notifier to trigger the operator after drawing. */
WM_event_add_notifier(draw_ctx->evil_C, NC_LIGHTPROBE, scene_orig);

View File

@@ -1284,9 +1284,8 @@ static void draw_axes(ArmatureDrawContext *ctx,
final_col[3] = (ctx->const_color) ? 1.0 : (BONE_FLAG(eBone, pchan) & BONE_SELECTED) ? 0.1 : 0.65;
if (pchan && pchan->custom && !(arm->flag & ARM_NO_CUSTOM)) {
/** Special case: Custom bones can have different scale than the bone.
* Recompute display matrix without the custom scalling applied. (T65640)
**/
/* Special case: Custom bones can have different scale than the bone.
* Recompute display matrix without the custom scaling applied. (T65640). */
float axis_mat[4][4];
float length = pchan->bone->length;
copy_m4_m4(axis_mat, pchan->custom_tx ? pchan->custom_tx->pose_mat : pchan->pose_mat);

View File

@@ -12,7 +12,7 @@ void main()
{
finalColor = colorLight;
/* Relative to DPI scalling. Have constant screen size. */
/* Relative to DPI scaling. Have constant screen size. */
vec3 screen_pos = screenVecs[0].xyz * pos.x + screenVecs[1].xyz * pos.y;
vec3 p = inst_pos;
p.z *= (pos.z == 0.0) ? 0.0 : 1.0;

View File

@@ -137,11 +137,11 @@ void main()
}
/* Empties */
else if ((vclass & VCLASS_EMPTY_SCALED) != 0) {
/* This is a bit silly but we avoid scalling the object matrix on CPU (saving a mat4 mul) */
/* This is a bit silly but we avoid scaling the object matrix on CPU (saving a mat4 mul) */
vpos *= empty_scale;
}
else if ((vclass & VCLASS_EMPTY_SIZE) != 0) {
/* This is a bit silly but we avoid scalling the object matrix on CPU (saving a mat4 mul) */
/* This is a bit silly but we avoid scaling the object matrix on CPU (saving a mat4 mul) */
vpos *= empty_size;
}
else if ((vclass & VCLASS_EMPTY_AXES) != 0) {
@@ -177,7 +177,7 @@ void main()
vec3 world_pos;
if ((vclass & VCLASS_SCREENSPACE) != 0) {
/* Relative to DPI scalling. Have constant screen size. */
/* Relative to DPI scaling. Have constant screen size. */
vec3 screen_pos = screenVecs[0].xyz * vpos.x + screenVecs[1].xyz * vpos.y;
vec3 p = (obmat * vec4(vofs, 1.0)).xyz;
float screen_size = mul_project_m4_v3_zfac(p) * sizePixel;

View File

@@ -514,7 +514,7 @@ static void drw_call_obinfos_init(DRWObjectInfos *ob_infos, Object *ob)
ob_infos->ob_flag += (ob->base_flag & BASE_FROM_DUPLI) ? (1 << 2) : 0;
ob_infos->ob_flag += (ob->base_flag & BASE_FROM_SET) ? (1 << 3) : 0;
ob_infos->ob_flag += (ob == DST.draw_ctx.obact) ? (1 << 4) : 0;
/* Negative scalling. */
/* Negative scaling. */
ob_infos->ob_flag *= (ob->transflag & OB_NEG_SCALE) ? -1.0f : 1.0f;
/* Object Color. */
copy_v4_v4(ob_infos->ob_color, ob->color);

View File

@@ -104,7 +104,7 @@ layout(std140) uniform globalsBlock
vec4 screenVecs[2];
vec4 sizeViewport; /* Inverted size in zw. */
float sizePixel; /* This one is for dpi scalling */
float sizePixel; /* This one is for dpi scaling */
float pixelFac; /* To use with mul_project_m4_v3_zfac() */
float sizeObjectCenter;
float sizeLightCenter;

View File

@@ -667,7 +667,8 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
/* 2) duplicate base */
/* Only duplicate linked armature but take into account user preferences for duplicating actions. */
/* Only duplicate linked armature but take into account
* user preferences for duplicating actions. */
short dupflag = USER_DUP_ARM | (U.dupflag & USER_DUP_ACT);
Base *base_new = ED_object_add_duplicate(bmain, scene, view_layer, base_old, dupflag);
Object *ob_new = base_new->object;

View File

@@ -1409,11 +1409,7 @@ static int separate_exec(bContext *C, wmOperator *op)
/* Take into account user preferences for duplicating actions. */
short dupflag = (U.dupflag & USER_DUP_ACT);
newbase = ED_object_add_duplicate(bmain,
scene,
view_layer,
oldbase,
dupflag);
newbase = ED_object_add_duplicate(bmain, scene, view_layer, oldbase, dupflag);
DEG_relations_tag_update(bmain);
newob = newbase->object;