Cleanup: spelling, style
This commit is contained in:
@@ -1397,7 +1397,7 @@ unsigned int BKE_curve_calc_coords_axis_len(
|
||||
}
|
||||
|
||||
/**
|
||||
* Calcualte an array for the entire curve (cyclic or non-cyclic).
|
||||
* Calculate an array for the entire curve (cyclic or non-cyclic).
|
||||
* \note Call for each axis.
|
||||
*
|
||||
* \param use_cyclic_duplicate_endpoint: Duplicate values at the beginning & end of the array.
|
||||
|
||||
@@ -2249,7 +2249,7 @@ static void dynamic_paint_create_uv_surface_neighbor_cb(void *userdata, const in
|
||||
/* tri index */
|
||||
/* There is a low possibility of actually having a neighbor point which tri is
|
||||
* already set from another neighbor in a separate thread here.
|
||||
* Cheking for both tri_index and neighbour_pixel above reduces that probability
|
||||
* Checking for both tri_index and neighbour_pixel above reduces that probability
|
||||
* but it remains possible.
|
||||
* That atomic op (and its memory fence) ensures tPoint->neighbour_pixel is set
|
||||
* to non--1 *before* its tri_index is set (i.e. that it cannot be used a neighbour).
|
||||
@@ -4797,7 +4797,7 @@ static void dynamic_paint_effect_drip_cb(void *userdata, const int index)
|
||||
|
||||
/* Sort of spinlock, but only for given ePoint.
|
||||
* Since the odds a same ePoint is modified at the same time by several threads is very low, this is
|
||||
* much more eficient than a global spin lock. */
|
||||
* much more efficient than a global spin lock. */
|
||||
const unsigned int pointlock_idx = n_trgt / 8;
|
||||
const uint8_t pointlock_bitmask = 1 << (n_trgt & 7); /* 7 == 0b111 */
|
||||
while (atomic_fetch_and_or_uint8(&point_locks[pointlock_idx], pointlock_bitmask) & pointlock_bitmask);
|
||||
|
||||
@@ -881,7 +881,7 @@ static int foreach_libblock_check_indirect_usage_callback(
|
||||
}
|
||||
|
||||
/**
|
||||
* Check wether given ID is used indirectly (i.e. by another linked ID).
|
||||
* Check weather given ID is used indirectly (i.e. by another linked ID).
|
||||
*/
|
||||
bool BKE_library_ID_is_indirectly_used(Main *bmain, void *idv)
|
||||
{
|
||||
|
||||
@@ -1291,7 +1291,7 @@ void BKE_nlastrip_recalculate_bounds(NlaStrip *strip)
|
||||
if (IS_EQF(mapping, 0.0f) == 0)
|
||||
strip->end = (actlen * mapping) + strip->start;
|
||||
|
||||
/* make sure we don't overlap our neighbours */
|
||||
/* make sure we don't overlap our neighbors */
|
||||
nlastrip_fix_resize_overlaps(strip);
|
||||
}
|
||||
|
||||
|
||||
@@ -1974,7 +1974,7 @@ void BM_mesh_rebuild(
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-allocatges mesh data with/without toolflags.
|
||||
* Re-allocates mesh data with/without toolflags.
|
||||
*/
|
||||
void BM_mesh_toolflags_set(BMesh *bm, bool use_toolflags)
|
||||
{
|
||||
|
||||
@@ -384,7 +384,7 @@ void BM_face_calc_tangent_edge(const BMFace *f, float r_tangent[3])
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the tanget of the face, using the two longest disconected edges.
|
||||
* Compute the tanget of the face, using the two longest disconnected edges.
|
||||
*
|
||||
* \param r_tangent: Calculated unit length tangent (return value).
|
||||
*/
|
||||
|
||||
@@ -3042,7 +3042,7 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
|
||||
|
||||
if (state & (UI_BUT_DISABLED | UI_BUT_INACTIVE)) {
|
||||
/* Now we reduce alpha of the inner color (i.e. the color shown)
|
||||
* so that this setting can look greyed out, while retaining
|
||||
* so that this setting can look grayed out, while retaining
|
||||
* the checkboard (for transparent values). This is needed
|
||||
* here as the effects of ui_widget_color_disabled() are overwritten.
|
||||
*/
|
||||
|
||||
@@ -618,7 +618,7 @@ int file_select_match(struct SpaceFile *sfile, const char *pattern, char *matche
|
||||
*/
|
||||
for (i = 0; i < n; i++) {
|
||||
file = filelist_file(sfile->files, i);
|
||||
/* Do not check wether file is a file or dir here! Causes T44243 (we do accept dirs at this stage). */
|
||||
/* Do not check weather file is a file or dir here! Causes T44243 (we do accept dirs at this stage). */
|
||||
if (fnmatch(pattern, file->relpath, 0) == 0) {
|
||||
filelist_entry_select_set(sfile->files, file, FILE_SEL_ADD, FILE_SEL_SELECTED, CHECK_ALL);
|
||||
if (!match) {
|
||||
|
||||
@@ -3435,8 +3435,7 @@ static int render_border_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* drawing a border outside the camera view switches off border rendering */
|
||||
if ((border.xmin == border.xmax || border.ymin == border.ymax))
|
||||
{
|
||||
if ((border.xmin == border.xmax || border.ymin == border.ymax)) {
|
||||
if (rv3d->persp == RV3D_CAMOB)
|
||||
scene->r.mode &= ~R_BORDER;
|
||||
else
|
||||
|
||||
@@ -221,7 +221,7 @@ void ED_view3d_smooth_view_ex(
|
||||
copy_v3_v3(sms.dyn_ofs, sview->dyn_ofs);
|
||||
sms.use_dyn_ofs = true;
|
||||
|
||||
/* calcualte the final destination offset */
|
||||
/* calculate the final destination offset */
|
||||
view3d_orbit_apply_dyn_ofs(sms.dst.ofs, sms.src.ofs, sms.src.quat, sms.dst.quat, sms.dyn_ofs);
|
||||
}
|
||||
|
||||
|
||||
@@ -563,7 +563,7 @@ static void recalcData_nla(TransInfo *t)
|
||||
}
|
||||
|
||||
/* Use RNA to write the values to ensure that constraints on these are obeyed
|
||||
* (e.g. for transition strips, the values are taken from the neighbours)
|
||||
* (e.g. for transition strips, the values are taken from the neighbors)
|
||||
*
|
||||
* NOTE: we write these twice to avoid truncation errors which can arise when
|
||||
* moving the strips a large distance using numeric input [#33852]
|
||||
|
||||
@@ -891,9 +891,9 @@ static bool snapDerivedMesh(
|
||||
hit.dist = local_depth;
|
||||
|
||||
if (treedata->tree &&
|
||||
BLI_bvhtree_ray_cast(
|
||||
treedata->tree, ray_start_local, ray_normal_local, 0.0f,
|
||||
&hit, treedata->raycast_callback, treedata) != -1)
|
||||
BLI_bvhtree_ray_cast(
|
||||
treedata->tree, ray_start_local, ray_normal_local, 0.0f,
|
||||
&hit, treedata->raycast_callback, treedata) != -1)
|
||||
{
|
||||
hit.dist += len_diff;
|
||||
hit.dist /= local_scale;
|
||||
|
||||
@@ -743,7 +743,7 @@ static PVert *p_vert_add(PHandle *handle, PHashKey key, const float co[3], PEdge
|
||||
|
||||
/* Sanity check, a single nan/inf point causes the entire result to be invalid.
|
||||
* Note that values within the calculation may _become_ non-finite,
|
||||
* so the rest of the code still needs to take this possability into account. */
|
||||
* so the rest of the code still needs to take this possibility into account. */
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (UNLIKELY(!isfinite(v->co[i]))) {
|
||||
v->co[i] = 0.0f;
|
||||
|
||||
@@ -640,7 +640,7 @@ void FEdgeXDetector::postProcessSuggestiveContourFace(WXFace *iFace)
|
||||
normal_vec = wxf->GetVertexNormal(v); // FIXME: what about e1 ^ e2 ?
|
||||
radial_normal_vec = er_vec ^ normal_vec;
|
||||
|
||||
// Test wether the radial plan intersects with the edge at the opposite of v.
|
||||
// Test weather the radial plan intersects with the edge at the opposite of v.
|
||||
res = GeomUtils::intersectRayPlane(opposite_vertex_a->GetVertex(), opposite_edge->GetVec(),
|
||||
radial_normal_vec, -(v_vec * radial_normal_vec),
|
||||
t, 1.0e-06);
|
||||
|
||||
@@ -1736,11 +1736,13 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr)
|
||||
}
|
||||
|
||||
/* environment lighting */
|
||||
if (!(mat->scene->gm.flag & GAME_GLSL_NO_ENV_LIGHTING) && (world->mode & WO_ENV_LIGHT) && (mat->scene->r.mode & R_SHADOW) &&
|
||||
!BKE_scene_use_new_shading_nodes(mat->scene))
|
||||
if (!(mat->scene->gm.flag & GAME_GLSL_NO_ENV_LIGHTING) &&
|
||||
(world->mode & WO_ENV_LIGHT) &&
|
||||
(mat->scene->r.mode & R_SHADOW) &&
|
||||
!BKE_scene_use_new_shading_nodes(mat->scene))
|
||||
{
|
||||
if ((world->ao_env_energy != 0.0f) && (GPU_link_changed(shi->amb) || ma->amb != 0.0f) &&
|
||||
(GPU_link_changed(shi->refl) || ma->ref != 0.0f))
|
||||
(GPU_link_changed(shi->refl) || ma->ref != 0.0f))
|
||||
{
|
||||
if (world->aocolor != WO_AOPLAIN) {
|
||||
if (!(is_zero_v3(&world->horr) & is_zero_v3(&world->zenr)))
|
||||
@@ -1749,8 +1751,10 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr)
|
||||
GPU_link(mat, "math_multiply", shi->amb, shi->refl, &f);
|
||||
GPU_link(mat, "math_multiply", f, GPU_uniform(&world->ao_env_energy), &f);
|
||||
GPU_link(mat, "shade_mul_value", f, shi->rgb, &fcol);
|
||||
GPU_link(mat, "env_apply", shr->combined, GPU_dynamic_uniform(GPUWorld.horicol, GPU_DYNAMIC_HORIZON_COLOR, NULL),
|
||||
GPU_dynamic_uniform(GPUWorld.zencol, GPU_DYNAMIC_ZENITH_COLOR, NULL), fcol, GPU_builtin(GPU_VIEW_MATRIX), shi->vn, &shr->combined);
|
||||
GPU_link(mat, "env_apply", shr->combined,
|
||||
GPU_dynamic_uniform(GPUWorld.horicol, GPU_DYNAMIC_HORIZON_COLOR, NULL),
|
||||
GPU_dynamic_uniform(GPUWorld.zencol, GPU_DYNAMIC_ZENITH_COLOR, NULL), fcol,
|
||||
GPU_builtin(GPU_VIEW_MATRIX), shi->vn, &shr->combined);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -2585,7 +2589,7 @@ int GPU_lamp_shadow_bind_code(GPULamp *lamp)
|
||||
|
||||
float *GPU_lamp_dynpersmat(GPULamp *lamp)
|
||||
{
|
||||
return (float*)lamp->dynpersmat;
|
||||
return &lamp->dynpersmat[0][0];
|
||||
}
|
||||
|
||||
int GPU_lamp_shadow_layer(GPULamp *lamp)
|
||||
|
||||
@@ -330,7 +330,7 @@ typedef enum ePchan_DrawFlag {
|
||||
|
||||
/* PoseChannel->bboneflag */
|
||||
typedef enum ePchan_BBoneFlag {
|
||||
/* Use custom reference bones (for roll and handle alignment), instead of immediate neighbours */
|
||||
/* Use custom reference bones (for roll and handle alignment), instead of immediate neighbors */
|
||||
PCHAN_BBONE_CUSTOM_HANDLES = (1 << 1),
|
||||
/* Evaluate start handle as being "relative" */
|
||||
PCHAN_BBONE_CUSTOM_START_REL = (1 << 2),
|
||||
|
||||
@@ -713,7 +713,8 @@ static void rna_def_action(BlenderRNA *brna)
|
||||
prop = RNA_def_property(srna, "pose_markers", PROP_COLLECTION, PROP_NONE);
|
||||
RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
|
||||
RNA_def_property_struct_type(prop, "TimelineMarker");
|
||||
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION); /* T45689 - so that the list isn't greyed out; adding/removing is still banned though */
|
||||
/* Use lib exception so the list isn't grayed out; adding/removing is still banned though, see T45689 */
|
||||
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
|
||||
RNA_def_property_ui_text(prop, "Pose Markers", "Markers specific to this action, for labeling poses");
|
||||
rna_def_action_pose_markers(brna, prop);
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@ static void smooth_iter__length_weight(
|
||||
/* fast-path */
|
||||
for (i = 0; i < numVerts; i++) {
|
||||
struct SmoothingData_Weighted *sd = &smooth_data[i];
|
||||
/* divide by sum of all neighbour distances (weighted) and amount of neighbours, (mean average) */
|
||||
/* divide by sum of all neighbour distances (weighted) and amount of neighbors, (mean average) */
|
||||
const float div = sd->edge_length_sum * vertex_edge_count[i];
|
||||
if (div > eps) {
|
||||
#if 0
|
||||
|
||||
@@ -1824,7 +1824,7 @@ static PyObject *bpy_bmface_calc_tangent_edge(BPy_BMFace *self)
|
||||
PyDoc_STRVAR(bpy_bmface_calc_tangent_edge_pair_doc,
|
||||
".. method:: calc_tangent_edge_pair()\n"
|
||||
"\n"
|
||||
" Return face tangent based on the two longest disconected edges.\n"
|
||||
" Return face tangent based on the two longest disconnected edges.\n"
|
||||
"\n"
|
||||
" - Tris: Use the edge pair with the most similar lengths.\n"
|
||||
" - Quads: Use the longest edge pair.\n"
|
||||
|
||||
Reference in New Issue
Block a user