Cleanup: spelling, trailing space for comment-blocks

This commit is contained in:
Campbell Barton 2022-03-31 13:00:10 +11:00
parent 41ee5382f6
commit 3d132ead50
32 changed files with 47 additions and 46 deletions

View File

@ -438,7 +438,7 @@ ccl_device bool light_sample_from_intersection(KernelGlobals kg,
const float3 dir = make_float3(klight->spot.dir[0], klight->spot.dir[1], klight->spot.dir[2]);
/* the normal of the oriented disk */
const float3 lightN = normalize(ray_P - center);
/* we set the light normal to the outgoing direction to support texturing*/
/* We set the light normal to the outgoing direction to support texturing. */
ls->Ng = -ls->D;
float invarea = klight->spot.invarea;
@ -467,7 +467,7 @@ ccl_device bool light_sample_from_intersection(KernelGlobals kg,
const float3 center = make_float3(klight->co[0], klight->co[1], klight->co[2]);
const float3 lighN = normalize(ray_P - center);
/* we set the light normal to the outgoing direction to support texturing*/
/* We set the light normal to the outgoing direction to support texturing. */
ls->Ng = -ls->D;
float invarea = klight->spot.invarea;

View File

@ -87,7 +87,7 @@ class DebugFlags {
/* Reset flags to their defaults. */
void reset();
/* Whether adaptive feature based runtime compile is enabled or not.*/
/* Whether adaptive feature based runtime compile is enabled or not. */
bool adaptive_compile;
};
@ -110,7 +110,7 @@ class DebugFlags {
/* Reset flags to their defaults. */
void reset();
/* Whether adaptive feature based runtime compile is enabled or not.*/
/* Whether adaptive feature based runtime compile is enabled or not. */
bool adaptive_compile;
};

View File

@ -64,7 +64,7 @@
ime.event.target_end = -1;
/* Register a function to be executed when Input Method is changed using
* 'Control + Space' or language-specific keys (such as 'Eisu / Kana' key for Japanese).*/
* 'Control + Space' or language-specific keys (such as 'Eisu / Kana' key for Japanese). */
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
[center addObserver:self
selector:@selector(ImeDidChangeCallback:)

View File

@ -274,7 +274,7 @@ class CurvesGeometry : public ::CurvesGeometry {
void ensure_evaluated_offsets() const;
/**
* Retrieve offsets into a Bezier curve's avaluated points for each control point.
* Retrieve offsets into a Bezier curve's evaluated points for each control point.
* Call #ensure_evaluated_offsets() first to ensure that the evaluated offsets cache is current.
*/
Span<int> bezier_evaluated_offsets_for_curve(int curve_index) const;

View File

@ -383,7 +383,7 @@ bool BKE_lib_override_library_main_operations_create(struct Main *bmain, bool fo
/**
* Reset all overrides in given \a id_root, while preserving ID relations.
*
* \param do_reset_system_override If \a true, reset the given ID as a system override one (i.e.
* \param do_reset_system_override: If \a true, reset the given ID as a system override one (i.e.
* non-editable).
*/
void BKE_lib_override_library_id_reset(struct Main *bmain,
@ -392,8 +392,8 @@ void BKE_lib_override_library_id_reset(struct Main *bmain,
/**
* Reset all overrides in given \a id_root and its dependencies, while preserving ID relations.
*
* \param do_reset_system_override If \a true, reset the given ID and all of its descendants in the
* override hierarchy as system override ones (i.e. non-editable).
* \param do_reset_system_override: If \a true, reset the given ID and all of its descendants in
* the override hierarchy as system override ones (i.e. non-editable).
*/
void BKE_lib_override_library_id_hierarchy_reset(struct Main *bmain,
struct ID *id_root,

View File

@ -743,7 +743,7 @@ void BKE_gpencil_prepare_eval_data(Depsgraph *depsgraph, Scene *scene, Object *o
}
BLI_assert(ob->data != NULL);
/* Only copy strokes from visible frames to evaluated data.*/
/* Only copy strokes from visible frames to evaluated data. */
gpencil_copy_visible_frames_to_eval(depsgraph, scene, ob);
}

View File

@ -1469,7 +1469,7 @@ static void ccgdm_create_grids(DerivedMesh *dm)
DMFlagMat *gridFlagMats;
CCGFace **gridFaces;
int *gridOffset;
int index, numFaces, numGrids, S, gIndex /*, gridSize*/;
int index, numFaces, numGrids, S, gIndex /*, gridSize */;
if (ccgdm->gridData) {
return;

View File

@ -679,9 +679,9 @@ class CPPType : NonCopyable, NonMovable {
* compile-time. This allows the compiler to optimize a function for specific types, while all
* other types can still use a generic fallback function.
*
* \param Types The types that code should be generated for.
* \param fn The function object to call. This is expected to have a templated `operator()` and a
* non-templated `operator()`. The templated version will be called if the current #CPPType
* \param Types: The types that code should be generated for.
* \param fn: The function object to call. This is expected to have a templated `operator()` and
* a non-templated `operator()`. The templated version will be called if the current #CPPType
* matches any of the given types. Otherwise, the non-templated function is called.
*/
template<typename... Types, typename Fn> void to_static_type(const Fn &fn) const

View File

@ -578,7 +578,7 @@ DLRBT_Node *BLI_dlrbTree_add(DLRBT_Tree *tree,
}
default: /* update the duplicate node as appropriate */
{
/* Return the updated node after calling the callback. */
/* Return the updated node after calling the callback. */
node = parNode;
if (update_cb) {
update_cb(node, data);

View File

@ -58,7 +58,7 @@ void create_uniform_samples(const Span<float> lengths,
}
/* Add the samples on the last cyclic segment if necessary, and also the samples
* that weren't created in the previous loop due to floating point inacuracy. */
* that weren't created in the previous loop due to floating point inaccuracy. */
if (cyclic && lengths.size() > 1) {
indices.drop_front(i_dst).fill(points_num - 1);
const float segment_length = lengths.last() - lengths.last(1);

View File

@ -202,7 +202,7 @@ void ViewerOperation::update_image(const rcti *rect)
rect->ymax);
/* This could be improved to use partial updates. For now disabled as the full frame compositor
* would not use partial frames anymore and the image engine requires more testing.*/
* would not use partial frames anymore and the image engine requires more testing. */
BKE_image_partial_update_mark_full_update(image_);
this->update_draw();
}

View File

@ -886,7 +886,7 @@ ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph, const IDNode
return id_cow;
}
/* In case we don't need to do a copy-on-write, we can use the update cache of the grease
* pencil data to do an update-on-write.*/
* pencil data to do an update-on-write. */
if (id_type == ID_GD && BKE_gpencil_can_avoid_full_copy_on_write(
(const ::Depsgraph *)depsgraph, (bGPdata *)id_orig)) {
BKE_gpencil_update_on_write((bGPdata *)id_orig, (bGPdata *)id_cow);

View File

@ -58,7 +58,7 @@ struct OneTextureMethod {
{
/* Although this works, computing an inverted matrix adds some precision issues and leads to
* tearing artifacts. This should be modified to use the scaling and transformation from the
* not inverted matrix.*/
* not inverted matrix. */
float4x4 mat(instance_data->ss_to_texture);
float4x4 mat_inv = mat.inverted();
float3 min_uv = mat_inv * float3(0.0f, 0.0f, 0.0f);
@ -420,7 +420,7 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
/* IMB_transform works in a non-consistent space. This should be documented or fixed!.
* Construct a variant of the info_uv_to_texture that adds the texel space
* transformation.*/
* transformation. */
float uv_to_texel[4][4];
copy_m4_m4(uv_to_texel, instance_data.ss_to_texture);
float scale[3] = {static_cast<float>(texture_width) / static_cast<float>(tile_buffer.x),

View File

@ -14,7 +14,7 @@
struct ImageUsage {
/** Render pass of the image that is used. */
short pass = 0;
/** Layer of the image that is used.*/
/** Layer of the image that is used. */
short layer = 0;
/** View of the image that is used. */
short view = 0;

View File

@ -13,7 +13,7 @@ typedef struct GlobalsUboStorage GlobalsUboStorage;
/* Future Plan: These globals were once shared between multiple overlay engines. But now that they
* have been merged into one engine, there is no reasons to keep these globals out of the overlay
* engine. */
* engine. */
#define UBO_FIRST_COLOR colorWire
#define UBO_LAST_COLOR colorUVShadow

View File

@ -81,7 +81,7 @@ float gpencil_stroke_thickness_modulate(float thickness, vec4 ndc_pos, vec4 view
float gpencil_clamp_small_stroke_thickness(float thickness, vec4 ndc_pos)
{
/* To avoid aliasing artifacts, we clamp the line thickness and
* reduce its opacity in the fragment shader.*/
* reduce its opacity in the fragment shader. */
float min_thickness = ndc_pos.w * 1.3;
thickness = max(min_thickness, thickness);

View File

@ -30,10 +30,10 @@
/**
* The code below uses a suffix naming convention to indicate the coordinate space:
* cu: Local space of the curves object that is being edited.
* su: Local space of the surface object.
* wo: World space.
* ha: Local space of an individual hair in the legacy hair system.
* `cu`: Local space of the curves object that is being edited.
* `su`: Local space of the surface object.
* `wo`: World space.
* `ha`: Local space of an individual hair in the legacy hair system.
*/
namespace blender::ed::curves {

View File

@ -2222,7 +2222,7 @@ static int gpencil_fill_modal(bContext *C, wmOperator *op, const wmEvent *event)
/* Hash of selected frames. */
GHash *frame_list = BLI_ghash_int_new_ex(__func__, 64);
/* If not multiframe and there is no frame in CFRA for the active layer, create
/* If not multi-frame and there is no frame in CFRA for the active layer, create
* a new frame. */
if (!is_multiedit) {
tgpf->gpf = BKE_gpencil_layer_frame_get(

View File

@ -322,7 +322,7 @@ static bool gpencil_weightpaint_brush_init(bContext *C, wmOperator *op)
gso->region = CTX_wm_region(C);
/* Multiframe settings. */
/* Multi-frame settings. */
gso->is_multiframe = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gso->gpd);
gso->use_multiframe_falloff = (ts->gp_sculpt.flag & GP_SCULPT_SETT_FLAG_FRAME_FALLOFF) != 0;

View File

@ -166,7 +166,7 @@ void ED_mesh_mirrtopo_init(BMEditMesh *em,
const bool is_editmode = (em != NULL);
MEdge *medge = NULL, *med;
/* editmode*/
/* Edit-mode variables. */
BMEdge *eed;
BMIter iter;

View File

@ -2052,7 +2052,7 @@ static int uv_select_more_less(bContext *C, const bool select)
}
/* If the current face is not selected and at least one neighboring face is
* selected, then tag the current face to grow selection.*/
* selected, then tag the current face to grow selection. */
if (sel_state == (NEIGHBORING_FACE_IS_SEL | CURR_FACE_IS_UNSEL)) {
BM_elem_flag_enable(efa, BM_ELEM_TAG);
changed = true;
@ -3378,7 +3378,8 @@ static void uv_select_flush_from_tag_loop(const Scene *scene, Object *obedit, co
* but dealing with sticky modes for vertex selections is best done in a separate function.
*
* \note Current behavior is selecting only; deselecting can be added but the behavior isn't
* required anywhere.*/
* required anywhere.
*/
static void uv_select_flush_from_loop_edge_flag(const Scene *scene, BMEditMesh *em)
{
const ToolSettings *ts = scene->toolsettings;

View File

@ -2119,7 +2119,7 @@ static void p_collapse_cost_vertex(PVert *vert, float *r_mincost, PEdge **r_mine
enext = p_wheel_edge_next(e);
if (enext == NULL) {
/* the other boundary edge, where we only have the pair halfedge */
/* The other boundary edge, where we only have the pair half-edge. */
pair = e->next->next;
if (p_collapse_allowed(NULL, pair)) {

View File

@ -284,7 +284,7 @@ struct ShaderCreateInfo {
bool auto_resource_location_ = false;
/** If true, force depth and stencil tests to always happen before fragment shader invocation. */
bool early_fragment_test_ = false;
/** Allow optimisation when fragment shader writes to gl_FragDepth. */
/** Allow optimization when fragment shader writes to `gl_FragDepth`. */
DepthWrite depth_write_ = DepthWrite::ANY;
/**
* Maximum length of all the resource names including each null terminator.

View File

@ -197,7 +197,7 @@ void GPU_viewport_bind_from_offscreen(GPUViewport *viewport,
/* XR surfaces will already check for texture size changes and free if necessary (see
* #wm_xr_session_surface_offscreen_ensure()), so don't free here as it has a significant
* performance impact (leads to texture re-creation in #gpu_viewport_textures_create() every VR
* drawing iteration).*/
* drawing iteration). */
if (!is_xr_surface) {
gpu_viewport_textures_free(viewport);
}

View File

@ -363,7 +363,7 @@ void MTLBackend::capabilities_init(MTLContext *ctx)
MTLBackend::capabilities.supports_family_mac2);
GCaps.compute_shader_support = false; /* TODO(Metal): Add compute support. */
GCaps.shader_storage_buffer_objects_support =
false; /* TODO(Metal): implement Storage Buffer support.*/
false; /* TODO(Metal): implement Storage Buffer support. */
/* Maximum buffer bindings: 31. Consider required slot for uniforms/UBOs/Vertex attributes.
* Can use argument buffers if a higher limit is required. */

View File

@ -255,8 +255,8 @@ void create_input(pxr::UsdShadeShader &shader, const InputSpec &spec, const void
/* Find the UVMAP node input to the given texture image node and convert it
* to a USD primvar reader shader. If no UVMAP node is found, create a primvar
* reader for the given default uv set. The primvar reader will be attached to
* the 'st' input of the given USD texture shader. */
* reader for the given default uv set. The primvar reader will be attached to
* the 'st' input of the given USD texture shader. */
static void create_uvmap_shader(const USDExporterContext &usd_export_context,
bNode *tex_node,
pxr::UsdShadeMaterial &usd_material,
@ -359,7 +359,7 @@ static void export_in_memory_texture(Image *ima,
BLI_split_file_part(image_abs_path, file_name, FILE_MAX);
}
else {
/* Use the image name for the file name. */
/* Use the image name for the file name. */
strcpy(file_name, ima->id.name + 2);
}
@ -452,7 +452,7 @@ static bNode *traverse_channel(bNodeSocket *input, const short target_type)
}
/* Returns the first occurrence of a principled BSDF or a diffuse BSDF node found in the given
* material's node tree. Returns null if no instance of either type was found.*/
* material's node tree. Returns null if no instance of either type was found. */
static bNode *find_bsdf_node(Material *material)
{
LISTBASE_FOREACH (bNode *, node, &material->nodetree->nodes) {

View File

@ -138,7 +138,7 @@ typedef struct BrushGpencilSettings {
} BrushGpencilSettings;
typedef struct BrushCurvesSculptSettings {
/* Number of curves added by the add brush. */
/** Number of curves added by the add brush. */
int add_amount;
} BrushCurvesSculptSettings;

View File

@ -802,7 +802,7 @@ void RNA_collection_clear(PointerRNA *ptr, const char *name);
bool RNA_property_is_set_ex(PointerRNA *ptr, PropertyRNA *prop, bool use_ghost);
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop);
void RNA_property_unset(PointerRNA *ptr, PropertyRNA *prop);
/** See #RNA_property_is_set_ex documentation. */
/** See #RNA_property_is_set_ex documentation. */
bool RNA_struct_property_is_set_ex(PointerRNA *ptr, const char *identifier, bool use_ghost);
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier);
bool RNA_property_is_idprop(const PropertyRNA *prop);

View File

@ -1878,7 +1878,7 @@ static void rna_Scene_editmesh_select_mode_update(bContext *C, PointerRNA *UNUSE
static void rna_Scene_uv_select_mode_update(bContext *C, PointerRNA *UNUSED(ptr))
{
/* Makes sure that the UV selection states are consistent with the current UV select mode and
* sticky mode.*/
* sticky mode. */
ED_uvedit_selectmode_clean_multi(C);
}

View File

@ -332,7 +332,7 @@ static Curves *resample_to_uniform_count(const CurveComponent &src_component,
/* Sampling arbitrary attributes works by first interpolating them to the curve's standard
* "evaluated points" and then interpolating that result with the uniform samples. This is
* potentially wasteful when downsampling a curve to many fewer points. There are two possible
* potentially wasteful when down-sampling a curve to many fewer points. There are two possible
* solutions: only sample the necessary points for interpolation, or first sample curve
* parameter/segment indices and evaluate the curve directly. */
Array<int> sample_indices(dst_curves.points_num());

View File

@ -47,7 +47,7 @@ static Array<float> accumulated_lengths_curve_domain(const bke::CurvesGeometry &
/**
* Return the length of each control point along each curve, starting at zero for the first point.
* Importantly, this is different than the length at each evaluated point. The implemenation is
* Importantly, this is different than the length at each evaluated point. The implementation is
* different for every curve type:
* - Catmull Rom Curves: Use the resolution to find the evaluated point for each control point.
* - Poly Curves: Copy the evaluated lengths, but we need to add a zero to the front of the array.

View File

@ -523,7 +523,7 @@ static void extrude_mesh_edges(MeshComponent &component,
}
case ATTR_DOMAIN_FACE: {
/* Attribute values for new faces are a mix of the values of faces connected to the its
* original edge. */
* original edge. */
copy_with_mixing(data.slice(new_poly_range), data.as_span(), [&](const int i) {
return edge_to_poly_map[edge_selection[i]].as_span();
});