Cleanup: spelling in comments, capitalize tags
This commit is contained in:
@@ -206,8 +206,9 @@ void GHOST_ContextCGL::metalInit()
|
||||
@autoreleasepool {
|
||||
id<MTLDevice> device = m_metalLayer.device;
|
||||
|
||||
/* Create a command queue for blit/present operation. Note: All context should share a single
|
||||
* command queue to ensure correct ordering of work submitted from multiple contexts. */
|
||||
/* Create a command queue for blit/present operation.
|
||||
* NOTE: All context should share a single command queue
|
||||
* to ensure correct ordering of work submitted from multiple contexts. */
|
||||
if (s_sharedMetalCommandQueue == nil) {
|
||||
s_sharedMetalCommandQueue = (MTLCommandQueue *)[device
|
||||
newCommandQueueWithMaxCommandBufferCount:GHOST_ContextCGL::max_command_buffer_count];
|
||||
|
||||
@@ -4285,11 +4285,10 @@ void CustomData_blend_write_prepare(CustomData &data,
|
||||
data.totlayer = layers_to_write.size();
|
||||
data.maxlayer = data.totlayer;
|
||||
|
||||
/* Note: data->layers may be null, this happens when adding
|
||||
* a legacy MPoly struct to a mesh with no other face attributes.
|
||||
/* NOTE: `data->layers` may be null, this happens when adding
|
||||
* a legacy #MPoly struct to a mesh with no other face attributes.
|
||||
* This leaves us with no unique ID for DNA to identify the old
|
||||
* data with when loading the file.
|
||||
*/
|
||||
* data with when loading the file. */
|
||||
if (!data.layers && layers_to_write.size() > 0) {
|
||||
/* We just need an address that's unique. */
|
||||
data.layers = reinterpret_cast<CustomDataLayer *>(&data.layers);
|
||||
|
||||
@@ -2617,7 +2617,7 @@ bool *BKE_keyblock_get_dependent_keys(const Key *key, const int index)
|
||||
marked[index] = true;
|
||||
|
||||
/* Iterative breadth-first search through the key list. This method minimizes
|
||||
* the number of scans through the list and is failsafe vs reference cycles. */
|
||||
* the number of scans through the list and is fail-safe vs reference cycles. */
|
||||
bool updated, found = false;
|
||||
int i;
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ void BKE_screen_foreach_id_screen_area(LibraryForeachIDData *data, ScrArea *area
|
||||
if (sbuts->pinid == nullptr) {
|
||||
sbuts->flag &= ~SB_PIN_CONTEXT;
|
||||
}
|
||||
/* Note: Restoring path pointers is complicated, if not impossible, because this contains
|
||||
/* NOTE: Restoring path pointers is complicated, if not impossible, because this contains
|
||||
* data pointers too, not just ID ones. See #40046. */
|
||||
MEM_SAFE_FREE(sbuts->path);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ void main()
|
||||
#endif
|
||||
|
||||
/* Temporal supersampling */
|
||||
/* Note : this uses the cell non-jittered position (texel center). */
|
||||
/* NOTE: this uses the cell non-jittered position (texel center). */
|
||||
vec3 curr_ndc = volume_to_ndc(vec3(gl_FragCoord.xy, float(volumetric_geom_iface.slice) + 0.5) *
|
||||
volInvTexSize.xyz);
|
||||
vec3 wpos = get_world_space_from_depth(curr_ndc.xy, curr_ndc.z);
|
||||
|
||||
@@ -658,7 +658,7 @@ static void calc_shapeKeys(Object *obedit, ListBase *newnurbs)
|
||||
LISTBASE_FOREACH (Nurb *, nu, &editnurb->nurbs) {
|
||||
|
||||
if (nu->bezt) {
|
||||
/* Three vects to store handles and one for tilt. */
|
||||
/* Three vectors to store handles and one for tilt. */
|
||||
totvec += nu->pntsu * 4;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -336,7 +336,7 @@ static int gizmo_arrow_modal(bContext *C,
|
||||
float offset[3];
|
||||
float facdir = 1.0f;
|
||||
|
||||
/* (src, dst) */
|
||||
/* A pair: (source, destination). */
|
||||
struct {
|
||||
blender::float2 mval;
|
||||
float ray_origin[3], ray_direction[3];
|
||||
|
||||
@@ -705,12 +705,11 @@ static void annotation_draw_data_layers(
|
||||
*/
|
||||
if (ED_gpencil_session_active() && (gpl->flag & GP_LAYER_ACTIVE) &&
|
||||
(gpf->flag & GP_FRAME_PAINT)) {
|
||||
/* Buffer stroke needs to be drawn with a different linestyle
|
||||
/* Buffer stroke needs to be drawn with a different line-style
|
||||
* to help differentiate them from normal strokes.
|
||||
*
|
||||
* It should also be noted that sbuffer contains temporary point types
|
||||
* i.e. tGPspoints NOT bGPDspoints
|
||||
*/
|
||||
* It should also be noted that #bGPdata_Runtime::sbuffer contains temporary point types
|
||||
* i.e. #tGPspoints NOT #bGPDspoints. */
|
||||
annotation_draw_stroke_buffer(gpd, lthick, dflag, ink);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,24 +105,24 @@ static void gaussian_blur_1D(const Span<T> src,
|
||||
{
|
||||
/* 1D Gaussian-like smoothing function.
|
||||
*
|
||||
* Note : This is the algorithm used by BKE_gpencil_stroke_smooth_point (legacy),
|
||||
* but generalized and written in C++.
|
||||
* NOTE: This is the algorithm used by #BKE_gpencil_stroke_smooth_point (legacy),
|
||||
* but generalized and written in C++.
|
||||
*
|
||||
* This function uses a binomial kernel, which is the discrete version of gaussian blur.
|
||||
* The weight for a value at the relative index is:
|
||||
* w = nCr(n, j + n/2) / 2^n = (n/1 * (n-1)/2 * ... * (n-j-n/2)/(j+n/2)) / 2^n
|
||||
* `w = nCr(n, j + n/2) / 2^n = (n/1 * (n-1)/2 * ... * (n-j-n/2)/(j+n/2)) / 2^n`.
|
||||
* All weights together sum up to 1.
|
||||
* This is equivalent to doing multiple iterations of averaging neighbors,
|
||||
* where n = iterations * 2 and -n/2 <= j <= n/2
|
||||
* where: `n = iterations * 2 and -n/2 <= j <= n/2`.
|
||||
*
|
||||
* Now the problem is that nCr(n, j + n/2) is very hard to compute for n > 500, since even
|
||||
* double precision isn't sufficient. A very good robust approximation for n > 20 is
|
||||
* nCr(n, j + n/2) / 2^n = sqrt(2/(pi*n)) * exp(-2*j*j/n)
|
||||
* Now the problem is that `nCr(n, j + n/2)` is very hard to compute for `n > 500`, since even
|
||||
* double precision isn't sufficient. A very good robust approximation for `n > 20` is:
|
||||
* `nCr(n, j + n/2) / 2^n = sqrt(2/(pi*n)) * exp(-2*j*j/n)`.
|
||||
*
|
||||
* `keep_shape` is a new option to stop the points from severely deforming.
|
||||
* It uses different partially negative weights.
|
||||
* w = 2 * (nCr(n, j + n/2) / 2^n) - (nCr(3*n, j + n) / 2^(3*n))
|
||||
* ~ 2 * sqrt(2/(pi*n)) * exp(-2*j*j/n) - sqrt(2/(pi*3*n)) * exp(-2*j*j/(3*n))
|
||||
* `w = 2 * (nCr(n, j + n/2) / 2^n) - (nCr(3*n, j + n) / 2^(3*n))`
|
||||
* ` ~ 2 * sqrt(2/(pi*n)) * exp(-2*j*j/n) - sqrt(2/(pi*3*n)) * exp(-2*j*j/(3*n))`
|
||||
* All weights still sum up to 1.
|
||||
* Note that these weights only work because the averaging is done in relative coordinates.
|
||||
*/
|
||||
|
||||
@@ -137,13 +137,13 @@ static int grease_pencil_layer_reorder_exec(bContext *C, wmOperator *op)
|
||||
|
||||
switch (reorder_location) {
|
||||
case LAYER_REORDER_ABOVE: {
|
||||
/* Note: The layers are stored from bottom to top, so inserting above (visually), means
|
||||
/* NOTE: The layers are stored from bottom to top, so inserting above (visually), means
|
||||
* inserting the link after the target. */
|
||||
target_layer->parent_group().add_layer_after(active_layer, &target_layer->as_node());
|
||||
break;
|
||||
}
|
||||
case LAYER_REORDER_BELOW: {
|
||||
/* Note: The layers are stored from bottom to top, so inserting below (visually), means
|
||||
/* NOTE: The layers are stored from bottom to top, so inserting below (visually), means
|
||||
* inserting the link before the target. */
|
||||
target_layer->parent_group().add_layer_before(active_layer, &target_layer->as_node());
|
||||
break;
|
||||
|
||||
@@ -400,7 +400,7 @@ static void tree_element_material_activate(bContext *C,
|
||||
{
|
||||
/* we search for the object parent */
|
||||
Object *ob = (Object *)outliner_search_back(te, ID_OB);
|
||||
/* Note : ob->matbits can be nullptr when a local object points to a library mesh. */
|
||||
/* NOTE: `ob->matbits` can be nullptr when a local object points to a library mesh. */
|
||||
BKE_view_layer_synced_ensure(scene, view_layer);
|
||||
if (ob == nullptr || ob != BKE_view_layer_active_object_get(view_layer) ||
|
||||
ob->matbits == nullptr) {
|
||||
@@ -1040,7 +1040,7 @@ static eOLDrawState tree_element_active_material_get(const Scene *scene,
|
||||
{
|
||||
/* we search for the object parent */
|
||||
const Object *ob = (const Object *)outliner_search_back((TreeElement *)te, ID_OB);
|
||||
/* Note : ob->matbits can be nullptr when a local object points to a library mesh. */
|
||||
/* NOTE: `ob->matbits` can be nullptr when a local object points to a library mesh. */
|
||||
BKE_view_layer_synced_ensure(scene, view_layer);
|
||||
if (ob == nullptr || ob != BKE_view_layer_active_object_get(view_layer) ||
|
||||
ob->matbits == nullptr) {
|
||||
|
||||
@@ -96,7 +96,7 @@ typedef enum eGPUBlend {
|
||||
/** Order independent transparency.
|
||||
* NOTE: Cannot be used as is. Needs special setup (frame-buffer, shader ...). */
|
||||
GPU_BLEND_OIT,
|
||||
/** Special blend to add color under and multiply dst color by src alpha. */
|
||||
/** Special blend to add color under and multiply DST color by SRC alpha. */
|
||||
GPU_BLEND_BACKGROUND,
|
||||
/** Custom blend parameters using dual source blending : SRC0 + SRC1 * DST
|
||||
* NOTE: Can only be used with _ONE_ Draw Buffer and shader needs to be specialized. */
|
||||
|
||||
@@ -1058,12 +1058,12 @@ static int ffmpeg_seek_by_byte(AVFormatContext *pFormatCtx)
|
||||
|
||||
static int64_t ffmpeg_get_seek_pts(anim *anim, int64_t pts_to_search)
|
||||
{
|
||||
/* FFmpeg seeks internally using DTS values instead of PTS. In some files DTS and PTS values are
|
||||
* offset and sometimes ffmpeg fails to take this into account when seeking.
|
||||
/* FFMPEG seeks internally using DTS values instead of PTS. In some files DTS and PTS values are
|
||||
* offset and sometimes FFMPEG fails to take this into account when seeking.
|
||||
* Therefore we need to seek backwards a certain offset to make sure the frame we want is in
|
||||
* front of us. It is not possible to determine the exact needed offset, this value is determined
|
||||
* experimentally. Note: Too big offset can impact performance. Current 3 frame offset has no
|
||||
* measurable impact.
|
||||
* front of us. It is not possible to determine the exact needed offset,
|
||||
* this value is determined experimentally.
|
||||
* NOTE: Too big offset can impact performance. Current 3 frame offset has no measurable impact.
|
||||
*/
|
||||
int64_t seek_pts = pts_to_search - (ffmpeg_steps_per_frame_get(anim) * 3);
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ void MeshFromGeometry::create_polys_loops(Mesh *mesh, bool use_vertex_groups)
|
||||
/* Setup vertex group data, if needed. */
|
||||
if (!dverts.is_empty()) {
|
||||
const int group_index = curr_face.vertex_group_index;
|
||||
/* Note: face might not belong to any group */
|
||||
/* NOTE: face might not belong to any group. */
|
||||
if (group_index >= 0 || 1) {
|
||||
MDeformWeight *dw = BKE_defvert_ensure_index(&dverts[corner_verts[tot_loop_idx]],
|
||||
group_index);
|
||||
|
||||
@@ -245,19 +245,23 @@ bool RE_engine_use_persistent_data(struct RenderEngine *engine);
|
||||
struct RenderEngine *RE_engine_get(const struct Render *re);
|
||||
struct RenderEngine *RE_view_engine_get(const struct ViewRender *view_render);
|
||||
|
||||
/* Acquire render engine for drawing via its `draw()` callback.
|
||||
/**
|
||||
* Acquire render engine for drawing via its `draw()` callback.
|
||||
*
|
||||
* If drawing is not possible false is returned. If drawing is possible then the engine is
|
||||
* "acquired" so that it can not be freed by the render pipeline.
|
||||
*
|
||||
* Drawing is possible if the engine has the `draw()` callback and it is in its `render()`
|
||||
* callback. */
|
||||
* callback.
|
||||
*/
|
||||
bool RE_engine_draw_acquire(struct Render *re);
|
||||
void RE_engine_draw_release(struct Render *re);
|
||||
|
||||
/* GPU context for engine to create and update GPU resources in its own thread,
|
||||
/**
|
||||
* GPU context for engine to create and update GPU resources in its own thread,
|
||||
* without blocking the main thread. Used by Cycles' display driver to create
|
||||
* display textures. */
|
||||
* display textures.
|
||||
*/
|
||||
bool RE_engine_gpu_context_create(struct RenderEngine *engine);
|
||||
void RE_engine_gpu_context_destroy(struct RenderEngine *engine);
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ dict_custom = {
|
||||
# Correct spelling, update the dictionary, here:
|
||||
# https://github.com/en-wl/wordlist
|
||||
"accessor",
|
||||
"accumulatively",
|
||||
"additively",
|
||||
"adjoint",
|
||||
"adjugate",
|
||||
@@ -317,6 +318,8 @@ dict_custom = {
|
||||
"suboptimally",
|
||||
"subrange",
|
||||
"subtractive",
|
||||
"subtype",
|
||||
"subtypes",
|
||||
"superset",
|
||||
"symmetrizable",
|
||||
"symmetrize",
|
||||
|
||||
Reference in New Issue
Block a user