Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-05-19 03:02:52 +0300
committerCampbell Barton <campbell@blender.org>2022-05-19 04:17:01 +0300
commit3e2017491ae62ed1b6436484b227ef7542f599aa (patch)
treef951f2b9e8a866ef64115f11cc5c1d9b035dd699
parent30e666f747bae89d50029cbcc505ffa9a12ab05e (diff)
Cleanup: spelling in comments & move doc-strings to headers
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_camera.cc4
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_material.cc14
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_material.hh9
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_shader_shared.hh2
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_velocity.cc8
-rw-r--r--source/blender/editors/mesh/meshtools.cc4
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h6
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h6
-rw-r--r--source/blender/gpu/GPU_storage_buffer.h13
-rw-r--r--source/blender/makesdna/intern/makesdna.c8
10 files changed, 40 insertions, 34 deletions
diff --git a/source/blender/draw/engines/eevee_next/eevee_camera.cc b/source/blender/draw/engines/eevee_next/eevee_camera.cc
index 11cc6453817..e6d2e2db764 100644
--- a/source/blender/draw/engines/eevee_next/eevee_camera.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_camera.cc
@@ -69,7 +69,7 @@ void Camera::init()
data.type = DRW_view_is_persp_get(inst_.drw_view) ? CAMERA_PERSP : CAMERA_ORTHO;
}
else {
- /* Lightprobe baking. */
+ /* Light-probe baking. */
data.type = CAMERA_PERSP;
}
}
@@ -91,7 +91,7 @@ void Camera::sync()
DRW_view_camtexco_get(inst_.drw_view, data.uv_scale);
}
else if (inst_.render) {
- /* TODO(fclem) Overscan */
+ /* TODO(@fclem): Over-scan. */
// RE_GetCameraWindowWithOverscan(inst_.render->re, g_data->overscan, data.winmat);
RE_GetCameraWindow(inst_.render->re, camera_eval, data.winmat.ptr());
RE_GetCameraModelMatrix(inst_.render->re, camera_eval, data.viewinv.ptr());
diff --git a/source/blender/draw/engines/eevee_next/eevee_material.cc b/source/blender/draw/engines/eevee_next/eevee_material.cc
index 33204ed9474..1676c89d679 100644
--- a/source/blender/draw/engines/eevee_next/eevee_material.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_material.cc
@@ -51,7 +51,6 @@ DefaultSurfaceNodeTree::~DefaultSurfaceNodeTree()
MEM_SAFE_FREE(ntree_);
}
-/* Configure a default nodetree with the given material. */
bNodeTree *DefaultSurfaceNodeTree::nodetree_get(::Material *ma)
{
/* WARNING: This function is not threadsafe. Which is not a problem for the moment. */
@@ -223,7 +222,7 @@ MaterialPass MaterialModule::material_pass_get(::Material *blender_mat,
/* IMPORTANT: We always create a subgroup so that all subgroups are inserted after the
* first "empty" shgroup. This avoids messing the order of subgroups when there is more
* nested subgroup (i.e: hair drawing). */
- /* TODO(fclem) Remove material resource binding from the first group creation. */
+ /* TODO(@fclem): Remove material resource binding from the first group creation. */
matpass.shgrp = DRW_shgroup_create_sub(grp);
DRW_shgroup_add_material_resources(matpass.shgrp, matpass.gpumat);
}
@@ -244,13 +243,13 @@ Material &MaterialModule::material_sync(::Material *blender_mat,
(has_motion ? MAT_PIPE_DEFERRED_PREPASS_VELOCITY :
MAT_PIPE_DEFERRED_PREPASS);
- /* TEST until we have defered pipeline up and running. */
+ /* TEST until we have deferred pipeline up and running. */
surface_pipe = MAT_PIPE_FORWARD;
prepass_pipe = has_motion ? MAT_PIPE_FORWARD_PREPASS_VELOCITY : MAT_PIPE_FORWARD_PREPASS;
MaterialKey material_key(blender_mat, geometry_type, surface_pipe);
- /* TODO allocate in blocks to avoid memory fragmentation. */
+ /* TODO: allocate in blocks to avoid memory fragmentation. */
auto add_cb = [&]() { return new Material(); };
Material &mat = *material_map_.lookup_or_add_cb(material_key, add_cb);
@@ -274,7 +273,6 @@ Material &MaterialModule::material_sync(::Material *blender_mat,
return mat;
}
-/* Return correct material or empty default material if slot is empty. */
::Material *MaterialModule::material_from_slot(Object *ob, int slot)
{
if (ob->base_flag & BASE_HOLDOUT) {
@@ -290,8 +288,6 @@ Material &MaterialModule::material_sync(::Material *blender_mat,
return ma;
}
-/* Returned Material references are valid until the next call to this function or
- * material_get(). */
MaterialArray &MaterialModule::material_array_get(Object *ob, bool has_motion)
{
material_array_.materials.clear();
@@ -308,8 +304,6 @@ MaterialArray &MaterialModule::material_array_get(Object *ob, bool has_motion)
return material_array_;
}
-/* Returned Material references are valid until the next call to this function or
- * material_array_get(). */
Material &MaterialModule::material_get(Object *ob,
bool has_motion,
int mat_nr,
@@ -322,4 +316,4 @@ Material &MaterialModule::material_get(Object *ob,
/** \} */
-} // namespace blender::eevee \ No newline at end of file
+} // namespace blender::eevee
diff --git a/source/blender/draw/engines/eevee_next/eevee_material.hh b/source/blender/draw/engines/eevee_next/eevee_material.hh
index bdf9b7824c5..23165a741b9 100644
--- a/source/blender/draw/engines/eevee_next/eevee_material.hh
+++ b/source/blender/draw/engines/eevee_next/eevee_material.hh
@@ -191,6 +191,7 @@ class DefaultSurfaceNodeTree {
DefaultSurfaceNodeTree();
~DefaultSurfaceNodeTree();
+ /** Configure a default node-tree with the given material. */
bNodeTree *nodetree_get(::Material *ma);
};
@@ -242,7 +243,14 @@ class MaterialModule {
void begin_sync();
+ /**
+ * Returned Material references are valid until the next call to this function or material_get().
+ */
MaterialArray &material_array_get(Object *ob, bool has_motion);
+ /**
+ * Returned Material references are valid until the next call to this function or
+ * material_array_get().
+ */
Material &material_get(Object *ob, bool has_motion, int mat_nr, eMaterialGeometry geometry_type);
private:
@@ -250,6 +258,7 @@ class MaterialModule {
eMaterialGeometry geometry_type,
bool has_motion);
+ /** Return correct material or empty default material if slot is empty. */
::Material *material_from_slot(Object *ob, int slot);
MaterialPass material_pass_get(::Material *blender_mat,
eMaterialPipeline pipeline_type,
diff --git a/source/blender/draw/engines/eevee_next/eevee_shader_shared.hh b/source/blender/draw/engines/eevee_next/eevee_shader_shared.hh
index d9fee1b6073..1261c855a82 100644
--- a/source/blender/draw/engines/eevee_next/eevee_shader_shared.hh
+++ b/source/blender/draw/engines/eevee_next/eevee_shader_shared.hh
@@ -53,7 +53,7 @@ struct CameraData {
float4x4 viewinv;
float4x4 winmat;
float4x4 wininv;
- /** Camera UV scale and bias. Also known as viewcamtexcofac. */
+ /** Camera UV scale and bias. Also known as `viewcamtexcofac`. */
float2 uv_scale;
float2 uv_bias;
/** Panorama parameters. */
diff --git a/source/blender/draw/engines/eevee_next/eevee_velocity.cc b/source/blender/draw/engines/eevee_next/eevee_velocity.cc
index c556ba21fb5..9f8dce43910 100644
--- a/source/blender/draw/engines/eevee_next/eevee_velocity.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_velocity.cc
@@ -74,7 +74,7 @@ void VelocityModule::step_camera_sync()
bool VelocityModule::step_object_sync(Object *ob,
ObjectKey &object_key,
- int /* IDRecalcFlag */ recalc)
+ int /*IDRecalcFlag*/ recalc)
{
bool has_motion = object_has_velocity(ob) || (recalc & ID_RECALC_TRANSFORM);
/* NOTE: Fragile. This will only work with 1 frame of lag since we can't record every geometry
@@ -175,7 +175,7 @@ bool VelocityModule::step_object_sync(Object *ob,
void VelocityModule::step_swap()
{
{
- /* Now that vertex buffers are garanteed to be updated, proceed with
+ /* Now that vertex buffers are guaranteed to be updated, proceed with
* offset computation and copy into the geometry step buffer. */
uint dst_ofs = 0;
for (VelocityGeometryData &geom : geometry_map.values()) {
@@ -184,8 +184,8 @@ void VelocityModule::step_swap()
geom.ofs = dst_ofs;
dst_ofs += src_len;
}
- /* TODO(fclem): Fail gracefully (disable motion blur + warning print) if tot_len *
- * sizeof(float4) is greater than max SSBO size. */
+ /* TODO(@fclem): Fail gracefully (disable motion blur + warning print) if
+ `tot_len * sizeof(float4)` is greater than max SSBO size. */
geometry_steps[step_]->resize(max_ii(16, dst_ofs));
for (VelocityGeometryData &geom : geometry_map.values()) {
diff --git a/source/blender/editors/mesh/meshtools.cc b/source/blender/editors/mesh/meshtools.cc
index b104820733b..fafccf68f03 100644
--- a/source/blender/editors/mesh/meshtools.cc
+++ b/source/blender/editors/mesh/meshtools.cc
@@ -1374,8 +1374,8 @@ bool ED_mesh_pick_vert(
if (use_zbuf) {
if (dist_px > 0) {
- /* sample rect to increase chances of selecting, so that when clicking
- * on an face in the backbuf, we can still select a vert */
+ /* Sample rectangle to increase chances of selecting, so that when clicking
+ * on an face in the back-buffer, we can still select a vert. */
*r_index = DRW_select_buffer_find_nearest_to_point(
vc.depsgraph, vc.region, vc.v3d, mval, 1, me->totvert + 1, &dist_px);
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index f9633c91087..5fa115ed629 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -1652,11 +1652,11 @@ void SCULPT_do_paint_brush(struct PaintModeSettings *paint_mode_settings,
int totnode) ATTR_NONNULL();
/**
- * @brief Get the image canvas for painting on the given object.
+ * \brief Get the image canvas for painting on the given object.
*
- * @return #true if an image is found. The #r_image and #r_image_user fields are filled with the
+ * \return #true if an image is found. The #r_image and #r_image_user fields are filled with the
* image and image user. Returns false when the image isn't found. In the later case the r_image
- * and r_image_user are set to nullptr/NULL.
+ * and r_image_user are set to NULL.
*/
bool SCULPT_paint_image_canvas_get(struct PaintModeSettings *paint_mode_settings,
struct Object *ob,
diff --git a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
index 06738ef6a12..ad3e1b5d7f2 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
+++ b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
@@ -362,8 +362,10 @@ typedef struct LineartRenderTaskInfo {
int thread_id;
- /* #pending_edges here only stores a refernce to a portion in LineartRenderbuffer::pending_edges,
- * assigned by the occlusion scheduler. */
+ /**
+ * #pending_edges here only stores a reference to a portion in
+ * LineartRenderbuffer::pending_edges, assigned by the occlusion scheduler.
+ */
struct LineartPendingEdges pending_edges;
} LineartRenderTaskInfo;
diff --git a/source/blender/gpu/GPU_storage_buffer.h b/source/blender/gpu/GPU_storage_buffer.h
index 739b0784317..ca6a848786b 100644
--- a/source/blender/gpu/GPU_storage_buffer.h
+++ b/source/blender/gpu/GPU_storage_buffer.h
@@ -48,12 +48,13 @@ void GPU_storagebuf_clear(GPUStorageBuf *ssbo,
void GPU_storagebuf_clear_to_zero(GPUStorageBuf *ssbo);
/**
- * @brief Copy a part of a vertex buffer to a storage buffer.
- * \a ssbo: destination storage buffer
- * \a src: source vertex buffer
- * \a dst_offset: where to start copying to (in bytes).
- * \a src_offset: where to start copying from (in bytes).
- * \a copy_size: byte size of the segment to copy.
+ * \brief Copy a part of a vertex buffer to a storage buffer.
+ *
+ * \param ssbo: destination storage buffer
+ * \param src: source vertex buffer
+ * \param dst_offset: where to start copying to (in bytes).
+ * \param src_offset: where to start copying from (in bytes).
+ * \param copy_size: byte size of the segment to copy.
*/
void GPU_storagebuf_copy_sub_from_vertbuf(
GPUStorageBuf *ssbo, GPUVertBuf *src, uint dst_offset, uint src_offset, uint copy_size);
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 07f15c4fa28..806513009be 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -43,11 +43,11 @@
#define SDNA_MAX_FILENAME_LENGTH 255
-/* The include file below is automatically generated from the SRC_DNA_INC
-+ * variable in 'source/blender/CMakeLists.txt'. */
+/* The include file below is automatically generated from the `SRC_DNA_INC`
+ * variable in 'source/blender/CMakeLists.txt'. */
static const char *includefiles[] = {
#include "dna_includes_as_strings.h"
- /* empty string to indicate end of includefiles */
+ /* Empty string to indicate end of include files. */
"",
};
@@ -1536,7 +1536,7 @@ int main(int argc, char **argv)
# pragma GCC poison long
#endif
-/* The include file below is automatically generated from the SRC_DNA_INC
+/* The include file below is automatically generated from the `SRC_DNA_INC`
* variable in 'source/blender/CMakeLists.txt'. */
#include "dna_includes_all.h"