Cleanup: grammar corrections, minor improvements to wording
Also back-tick quote some code references in comments to differentiate them from English text.
This commit is contained in:
@@ -1008,7 +1008,7 @@ enum ShaderDataFlag {
|
||||
SD_HOLDOUT = (1 << 5),
|
||||
/* Shader has non-zero volume extinction. */
|
||||
SD_EXTINCTION = (1 << 6),
|
||||
/* Shader has have volume phase (scatter) closure. */
|
||||
/* Shader has a volume phase (scatter) closure. */
|
||||
SD_SCATTER = (1 << 7),
|
||||
/* Shader is being evaluated in a volume. */
|
||||
SD_IS_VOLUME_SHADER_EVAL = (1 << 8),
|
||||
|
||||
@@ -702,7 +702,7 @@ void Film::finalize_passes(Scene *scene, const bool use_denoise)
|
||||
}
|
||||
}
|
||||
|
||||
/* Order from by components and type, This is required to for AOVs and cryptomatte passes,
|
||||
/* Order from by components and type, This is required for AOVs and cryptomatte passes,
|
||||
* which the kernel assumes to be in order. Note this must use stable sort so cryptomatte
|
||||
* passes remain in the right order. */
|
||||
new_passes.stable_sort(compare_pass_order);
|
||||
|
||||
@@ -35,7 +35,7 @@ OrientationBounds merge(const OrientationBounds &cone_a, const OrientationBounds
|
||||
return cone_a;
|
||||
}
|
||||
|
||||
/* Set cone a to always have the greater theta_o. */
|
||||
/* Set cone `a` to always have the greater `theta_o`. */
|
||||
const OrientationBounds *a = &cone_a;
|
||||
const OrientationBounds *b = &cone_b;
|
||||
if (cone_b.theta_o > cone_a.theta_o) {
|
||||
@@ -47,20 +47,20 @@ OrientationBounds merge(const OrientationBounds &cone_a, const OrientationBounds
|
||||
const float theta_d = safe_acosf(cos_a_b);
|
||||
const float theta_e = fmaxf(a->theta_e, b->theta_e);
|
||||
|
||||
/* Return axis and theta_o of a if it already contains b. */
|
||||
/* This should also be called when b is empty. */
|
||||
/* Return axis and `theta_o` of `a` if it already contains `b`. */
|
||||
/* This should also be called when `b` is empty. */
|
||||
if (a->theta_o + 5e-4f >= fminf(M_PI_F, theta_d + b->theta_o)) {
|
||||
return OrientationBounds({a->axis, a->theta_o, theta_e});
|
||||
}
|
||||
|
||||
/* Compute new theta_o that contains both a and b. */
|
||||
/* Compute new `theta_o` that contains both `a` and `b`. */
|
||||
const float theta_o = (theta_d + a->theta_o + b->theta_o) * 0.5f;
|
||||
|
||||
if (theta_o >= M_PI_F) {
|
||||
return OrientationBounds({a->axis, M_PI_F, theta_e});
|
||||
}
|
||||
|
||||
/* Slerp between a and b. */
|
||||
/* Slerp between `a` and `b`. */
|
||||
float3 new_axis;
|
||||
if (cos_a_b < -0.9995f) {
|
||||
/* Opposite direction, any orthogonal vector is fine. */
|
||||
|
||||
@@ -463,10 +463,10 @@ ccl_device_inline float4 fabs(const float4 a)
|
||||
# endif
|
||||
}
|
||||
|
||||
/* The floating-point remainder of the division operation a / b calculated by this function is
|
||||
* exactly the value a - iquot * b, where iquot is a / b with its fractional part truncated.
|
||||
/* The floating-point remainder of the division operation `a / b` calculated by this function is
|
||||
* exactly the value `a - iquot * b`, where `iquot` is `a / b with` its fractional part truncated.
|
||||
*
|
||||
* The returned value has the same sign as a and is less than b in magnitude. */
|
||||
* The returned value has the same sign as `a` and is less than `b` in magnitude. */
|
||||
ccl_device_inline float4 fmod(const float4 a, const float b)
|
||||
{
|
||||
# if defined(__KERNEL_NEON__)
|
||||
|
||||
@@ -242,8 +242,8 @@ struct MeshRuntime {
|
||||
|
||||
/**
|
||||
* Settings for lazily evaluating the subdivision on the CPU if needed. These are
|
||||
* set in the modifier when GPU subdivision can be performed, and owned by the by
|
||||
* the modifier in the object.
|
||||
* set in the modifier when GPU subdivision can be performed,
|
||||
* and owned by the modifier in the object.
|
||||
*/
|
||||
SubsurfRuntimeData *subsurf_runtime_data = nullptr;
|
||||
|
||||
|
||||
@@ -3291,16 +3291,16 @@ static void softbody_reset(Object *ob, SoftBody *sb, float (*vertexCos)[3], int
|
||||
copy_v3_v3(bp->origT, bp->pos);
|
||||
bp->vec[0] = bp->vec[1] = bp->vec[2] = 0.0f;
|
||||
|
||||
/* the bp->prev*'s are for rolling back from a canceled try to propagate in time
|
||||
/* The `bp->prev*` 's are for rolling back from a canceled try to propagate in time
|
||||
* adaptive step size algorithm in a nutshell:
|
||||
* 1. set scheduled time step to new dtime
|
||||
* 2. try to advance the scheduled time step, being optimistic execute it
|
||||
* 3. check for success
|
||||
* 3.a we 're fine continue, may be we can increase scheduled time again ?? if so, do so!
|
||||
* 3.b we did exceed error limit --> roll back, shorten the scheduled time and try again at 2.
|
||||
* 4. check if we did reach dtime
|
||||
* 4.a nope we need to do some more at 2.
|
||||
* 4.b yup we're done
|
||||
* 1) set scheduled time step to new dtime
|
||||
* 2) try to advance the scheduled time step, being optimistic execute it
|
||||
* 3) check for success
|
||||
* 3a) we 're fine continue, may be we can increase scheduled time again ?? if so, do so!
|
||||
* 3b) we did exceed error limit --> roll back, shorten the scheduled time and try again at 2.
|
||||
* 4) check if we did reach dtime
|
||||
* 4a) nope we need to do some more at 2.
|
||||
* 4b) yup we're done
|
||||
*/
|
||||
|
||||
copy_v3_v3(bp->prevpos, bp->pos);
|
||||
|
||||
@@ -1183,7 +1183,7 @@ static int adjacent_edge_point_index_from_coord(const SubdivCCG &subdiv_ccg,
|
||||
topology_refiner->base_level().GetEdgeVertices(adjacent_edge_index);
|
||||
|
||||
/* Vertex index of an edge which is used to see whether edge points in the right direction.
|
||||
* Tricky part here is that depending whether input coordinate is are maximum X or Y coordinate
|
||||
* Tricky part here is that depending whether input coordinate is a maximum X or Y coordinate
|
||||
* of the grid we need to use different edge direction.
|
||||
* Basically, the edge adjacent to a previous loop needs to point opposite direction. */
|
||||
int directional_edge_vertex_index = -1;
|
||||
|
||||
@@ -2546,7 +2546,7 @@ void BKE_tracking_distortion_bounds_deltas(MovieDistortion *distortion,
|
||||
/* The tracking distortion functions expect the coordinates to be in the space of the image
|
||||
* where the tracking camera was calibrated. So we first remap the coordinates into that space,
|
||||
* apply the distortion, then remap back to the original coordinates space. This is done by
|
||||
* dividing the by the size then multiplying by the calibration size, making sure to add 0.5 to
|
||||
* dividing by the size then multiplying by the calibration size, making sure to add 0.5 to
|
||||
* evaluate at the center of pixels. */
|
||||
float2 coordinates = ((position + 0.5f) / float2(size)) * float2(calibration_size);
|
||||
/* Notice that the condition is inverted, that's because when we are undistorting, we compute
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace blender::bke::volume_grid::file_cache {
|
||||
*/
|
||||
struct GridCache {
|
||||
/**
|
||||
* Grid returned by #readAllGridMetadata. This only contains a the meta-data and transform of
|
||||
* Grid returned by #readAllGridMetadata. This only contains the meta-data and transform of
|
||||
* the grid, but not the tree.
|
||||
*/
|
||||
openvdb::GridBase::Ptr meta_data_grid;
|
||||
|
||||
@@ -84,7 +84,7 @@ class ImplicitSharingInfo : NonCopyable, NonMovable {
|
||||
return strong_users_.load(std::memory_order_acquire) == 0;
|
||||
}
|
||||
|
||||
/** Call when a the data has a new additional owner. */
|
||||
/** Call when the data has a new additional owner. */
|
||||
void add_user() const
|
||||
{
|
||||
BLI_assert(!this->is_expired());
|
||||
|
||||
@@ -346,8 +346,8 @@ class IndexMask : private IndexMaskData {
|
||||
int64_t operator[](const RawMaskIterator &it) const;
|
||||
|
||||
/**
|
||||
* Get a new mask that contains a consecutive subset of this mask. Takes O(log n) time and but
|
||||
* can reuse the memory from the source mask.
|
||||
* Get a new mask that contains a consecutive subset of this mask. Takes O(log n) time
|
||||
* but can reuse the memory from the source mask.
|
||||
*/
|
||||
IndexMask slice(IndexRange range) const;
|
||||
IndexMask slice(int64_t start, int64_t size) const;
|
||||
|
||||
@@ -67,7 +67,7 @@ std::ostream &operator<<(std::ostream &os, const Vert *v);
|
||||
* A Plane whose equation is `dot(norm, p) + d = 0`.
|
||||
* The norm and d fields are always present, but the norm_exact
|
||||
* and d_exact fields may be lazily populated. Since we don't
|
||||
* store degenerate planes, we can tell if a the exact versions
|
||||
* store degenerate planes, we can tell if the exact versions
|
||||
* are not populated yet by having `norm_exact == 0`.
|
||||
*/
|
||||
struct Plane {
|
||||
|
||||
@@ -201,7 +201,7 @@ void BLI_path_normalize_unc(char *path, int path_maxncpy);
|
||||
/**
|
||||
* Convert `path` to a canonical representation.
|
||||
* This is intended for system paths (passed in as command-line arguments of via scripts)
|
||||
* which are valid in that they resolve to a file/directory and but could be `CWD` relative or
|
||||
* which are valid in that they resolve to a file/directory but could be `CWD` relative or
|
||||
* contain redundant slashes that cause absolute/relative conversion to fail.
|
||||
* (specifically the `//` prefix used by Blender).
|
||||
*
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
int64_t(c) << 16 | int64_t(b) << 8 | (a))
|
||||
|
||||
/**
|
||||
* Important that this value is an is _not_ aligned with `sizeof(void *)`.
|
||||
* Important that this value is not aligned with `sizeof(void *)`.
|
||||
* So having a pointer to 2/4/8... aligned memory is enough to ensure
|
||||
* the `freeword` will never be used.
|
||||
* To be safe, use a word that's the same in both directions.
|
||||
|
||||
@@ -50,7 +50,7 @@ bool BLI_file_alias_target(const char *filepath,
|
||||
[targetURL getFileSystemRepresentation:r_targetpath maxLength:FILE_MAXDIR];
|
||||
return false;
|
||||
}
|
||||
/* Note that the if-condition may also change the value of `r_targetpath`. */
|
||||
/* Note that the `if` condition may also change the value of `r_targetpath`. */
|
||||
if (![targetURL getFileSystemRepresentation:r_targetpath maxLength:FILE_MAXDIR]) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -698,7 +698,7 @@ static void calc_solidify_normals(BMesh *bm)
|
||||
|
||||
BM_ITER_MESH (e, &eiter, bm, BM_EDGES_OF_MESH) {
|
||||
|
||||
/* If the edge is not part of a the solidify region
|
||||
/* If the edge is not part of the solidify region
|
||||
* its normal should not be considered */
|
||||
if (!BMO_edge_flag_test(bm, e, EDGE_MARK)) {
|
||||
continue;
|
||||
|
||||
@@ -86,7 +86,7 @@ DistortionGrid::DistortionGrid(
|
||||
/* The tracking distortion functions expect the coordinates to be in the space of the image
|
||||
* where the tracking camera was calibrated. So we first remap the coordinates into that space,
|
||||
* apply the distortion, then remap back to the original coordinates space. This is done by
|
||||
* dividing the by the size then multiplying by the calibration size, making sure to add 0.5 to
|
||||
* dividing by the size then multiplying by the calibration size, making sure to add 0.5 to
|
||||
* evaluate at the center of pixels.
|
||||
*
|
||||
* Subtract the lower left bounds delta since we are looping over the extended domain. */
|
||||
|
||||
@@ -505,7 +505,7 @@ void deg_graph_tag_parameters_if_needed(Main *bmain,
|
||||
~(ID_RECALC_SYNC_TO_EVAL | ID_RECALC_SELECT | ID_RECALC_BASE_FLAGS |
|
||||
ID_RECALC_SHADING |
|
||||
/* While drivers may use the current-frame, this value is assigned
|
||||
* explicitly and doesn't require a the scene to be copied again. */
|
||||
* explicitly and doesn't require the scene to be copied again. */
|
||||
ID_RECALC_FRAME_CHANGE);
|
||||
|
||||
if (clean_flags == 0) {
|
||||
|
||||
@@ -44,7 +44,7 @@ class Precompute {
|
||||
}
|
||||
|
||||
/**
|
||||
* Write a the content of a texture to a PFM image file for inspection.
|
||||
* Write the content of a texture to a PFM image file for inspection.
|
||||
* OpenGL texture coordinate convention with Y up is respected.
|
||||
*/
|
||||
template<typename VecT>
|
||||
@@ -89,7 +89,7 @@ class Precompute {
|
||||
}
|
||||
|
||||
/**
|
||||
* Write a the content of a texture as a C++ header file array.
|
||||
* Write the content of a texture as a C++ header file array.
|
||||
* The content is to be copied to `eevee_lut.cc` and formatted with `make format`.
|
||||
*/
|
||||
template<typename VecT>
|
||||
|
||||
@@ -138,7 +138,7 @@ class VolumeModule {
|
||||
return enabled_ && use_lights_;
|
||||
}
|
||||
|
||||
/* Return a the future value of enabled() that will only be available after end_sync(). */
|
||||
/* Return the future value of enabled() that will only be available after end_sync(). */
|
||||
bool will_enable() const;
|
||||
|
||||
/* Returns the state of the module. */
|
||||
|
||||
@@ -814,10 +814,10 @@ class Texture : NonCopyable {
|
||||
|
||||
/**
|
||||
* Layer range view cover only the given range.
|
||||
* This can only called to create one range.
|
||||
* This can only be called to create one range.
|
||||
* View is recreated if:
|
||||
* - The source texture is recreated.
|
||||
* - The layer_len is different from the last call the this function.
|
||||
* - The layer_len is different from the last call to this function.
|
||||
* IMPORTANT: It is not recreated if the layer_start is different from the last call.
|
||||
* IMPORTANT: If this view is recreated any reference to it should be updated.
|
||||
*/
|
||||
|
||||
@@ -233,17 +233,17 @@ static void block_align_proximity_compute(ButAlign *butal, ButAlign *butal_other
|
||||
*
|
||||
* <pre>
|
||||
* +-----------+-----------+
|
||||
* | BUT 1 | BUT 2 |
|
||||
* | BUT_1 | BUT_2 |
|
||||
* |-----------------------+
|
||||
* | BUT 3 |
|
||||
* | BUT_3 |
|
||||
* +-----------+
|
||||
* </pre>
|
||||
*
|
||||
* Here, BUT 3 RIGHT side would not get 'dragged' to align with BUT 1 RIGHT side,
|
||||
* since BUT 3 has not RIGHT neighbor.
|
||||
* So, this function, when called with BUT 1, will 'walk' the whole column in \a side_s1 direction
|
||||
* (TOP or DOWN when called for RIGHT side), and force buttons like BUT 3 to align as needed,
|
||||
* if BUT 1 and BUT 3 were detected as needing top-right corner stitching in
|
||||
* Here, BUT_3 RIGHT side would not get 'dragged' to align with BUT_1 RIGHT side,
|
||||
* since BUT_3 has not RIGHT neighbor.
|
||||
* So, this function, when called with BUT_1, will 'walk' the whole column in \a side_s1 direction
|
||||
* (TOP or DOWN when called for RIGHT side), and force buttons like BUT_3 to align as needed,
|
||||
* if BUT_1 and BUT_3 were detected as needing top-right corner stitching in
|
||||
* #block_align_proximity_compute() step.
|
||||
*
|
||||
* \note To avoid doing this twice, some stitching flags are cleared to break the
|
||||
|
||||
@@ -8263,7 +8263,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent *
|
||||
|
||||
const bool is_disabled = but->flag & UI_BUT_DISABLED || data->disable_force;
|
||||
|
||||
/* if but->pointype is set, but->poin should be too */
|
||||
/* If `but->pointype` is set, `but->poin` should be too. */
|
||||
BLI_assert(!bool(but->pointype) || but->poin);
|
||||
|
||||
/* Only hard-coded stuff here, button interactions with configurable
|
||||
|
||||
@@ -55,7 +55,7 @@ class ColumnValues final {
|
||||
/**
|
||||
* Get a good column width for the column name and values.
|
||||
*
|
||||
* \param max_sample_size: If provided, only a subset of the column values is looked at to
|
||||
* \param max_sample_size: If provided, only a subset of the column values are inspected to
|
||||
* determine the width. This is useful when there are lots of rows to avoid unnecessarily long
|
||||
* computations in drawing code. If provided, there is also an enforced minimum width to avoid
|
||||
* very narrow columns when the sampled values all happen to be very short.
|
||||
|
||||
@@ -829,7 +829,7 @@ static void special_aftertrans_update__sequencer(bContext *C, TransInfo *t)
|
||||
sseq->flag &= ~SPACE_SEQ_DESELECT_STRIP_HANDLE;
|
||||
|
||||
/* #freeSeqData in `transform_conversions.cc` does this
|
||||
* keep here so the else at the end won't run. */
|
||||
* keep here so the `else` at the end won't run. */
|
||||
if (t->state == TRANS_CANCEL) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ void GPU_framebuffer_default_size(GPUFrameBuffer *fb, int width, int height);
|
||||
* \{ */
|
||||
|
||||
/**
|
||||
* Set a the viewport offset and size.
|
||||
* Set the viewport offset and size.
|
||||
* These are reset to the original dimensions explicitly (using `GPU_framebuffer_viewport_reset()`)
|
||||
* or when binding the frame-buffer after modifying its attachments.
|
||||
*
|
||||
@@ -592,7 +592,7 @@ void GPU_framebuffer_read_color(GPUFrameBuffer *fb,
|
||||
void *r_data);
|
||||
|
||||
/**
|
||||
* Read a the color of the window screen as it is currently displayed (so the previously rendered
|
||||
* Read the color of the window screen as it is currently displayed (so the previously rendered
|
||||
* back-buffer).
|
||||
* DEPRECATED: This isn't even working correctly on some implementation.
|
||||
* TODO: Emulate this by doing some slow texture copy on the backend side or try to read the areas
|
||||
|
||||
@@ -628,7 +628,7 @@ struct RawArray {
|
||||
};
|
||||
|
||||
/**
|
||||
* This struct is are typically defined in arrays which define an *enum* for RNA,
|
||||
* This struct is typically defined in arrays which define an *enum* for RNA,
|
||||
* which is used by the RNA API both for user-interface and the Python API.
|
||||
*/
|
||||
struct EnumPropertyItem {
|
||||
|
||||
@@ -1754,7 +1754,7 @@ static void wm_history_file_update()
|
||||
* - A smaller thumbnail is stored in the `.blend` file itself, sized at #BLEN_THUMB_SIZE.
|
||||
* The size is kept small to prevent thumbnails bloating the size of `.blend` files.
|
||||
*
|
||||
* The this thumbnail will be extracted if the file is shared or the local thumbnail cache
|
||||
* The thumbnail will be extracted if the file is shared or the local thumbnail cache
|
||||
* is cleared. see: `blendthumb_extract.cc` for logic that extracts the thumbnail.
|
||||
*
|
||||
* \{ */
|
||||
|
||||
Reference in New Issue
Block a user