[Bf-blender-cvs] [9f5c17f4af6] master: Cleanup: comments in code
Campbell Barton
noreply at git.blender.org
Mon Feb 6 02:51:10 CET 2023
Commit: 9f5c17f4af6ea54385c40f62e0337c13fc4680a5
Author: Campbell Barton
Date: Mon Feb 6 12:23:01 2023 +1100
Branches: master
https://developer.blender.org/rB9f5c17f4af6ea54385c40f62e0337c13fc4680a5
Cleanup: comments in code
===================================================================
M source/blender/editors/interface/interface.cc
M source/blender/editors/interface/interface_widgets.cc
M source/blender/editors/object/object_vgroup.cc
M source/blender/editors/sculpt_paint/paint_image_proj.cc
M source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
M source/blender/makesrna/intern/rna_internal.h
===================================================================
diff --git a/source/blender/editors/interface/interface.cc b/source/blender/editors/interface/interface.cc
index 3e355af823a..d64c1f56a17 100644
--- a/source/blender/editors/interface/interface.cc
+++ b/source/blender/editors/interface/interface.cc
@@ -3955,7 +3955,7 @@ void UI_block_align_begin(uiBlock *block)
block->flag |= UI_BUT_ALIGN_DOWN;
block->alignnr++;
- /* buttons declared after this call will get this align nr */ /* XXX flag? */
+ /* Buttons declared after this call will get this `alignnr`. */ /* XXX flag? */
}
void UI_block_align_end(uiBlock *block)
diff --git a/source/blender/editors/interface/interface_widgets.cc b/source/blender/editors/interface/interface_widgets.cc
index beddc6c7ae7..7b8015cf5a2 100644
--- a/source/blender/editors/interface/interface_widgets.cc
+++ b/source/blender/editors/interface/interface_widgets.cc
@@ -5022,7 +5022,7 @@ static void ui_draw_popover_back_impl(const uiWidgetColors *wcol,
const float unit_size,
const float mval_origin[2])
{
- /* tsk, this isn't nice. */
+ /* Alas, this isn't nice. */
const float unit_half = unit_size / 2;
const float cent_x = mval_origin ? CLAMPIS(mval_origin[0],
rect->xmin + unit_size,
diff --git a/source/blender/editors/object/object_vgroup.cc b/source/blender/editors/object/object_vgroup.cc
index 78a55aab5e9..5fbd5efa9d1 100644
--- a/source/blender/editors/object/object_vgroup.cc
+++ b/source/blender/editors/object/object_vgroup.cc
@@ -2130,8 +2130,8 @@ static void vgroup_smooth_subset(Object *ob,
static int inv_cmp_mdef_vert_weights(const void *a1, const void *a2)
{
- /* qsort sorts in ascending order. We want descending order to save a memcopy
- * so this compare function is inverted from the standard greater than comparison qsort needs.
+ /* #qsort sorts in ascending order. We want descending order to save a #memcpy
+ * so this compare function is inverted from the standard greater than comparison #qsort needs.
* A normal compare function is called with two pointer arguments and should return an integer
* less than, equal to, or greater than zero corresponding to whether its first argument is
* considered less than, equal to, or greater than its second argument.
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.cc b/source/blender/editors/sculpt_paint/paint_image_proj.cc
index db16931d6fb..9bf9f668a6b 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.cc
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.cc
@@ -191,7 +191,7 @@ BLI_INLINE uchar f_to_char(const float val)
/**
* This is mainly a convenience struct used so we can keep an array of images we use -
- * their imbufs, etc, in 1 array, When using threads this array is copied for each thread
+ * their #ImBuf's, etc, in 1 array, When using threads this array is copied for each thread
* because 'partRedrawRect' and 'touch' values would not be thread safe.
*/
struct ProjPaintImage {
@@ -2882,7 +2882,8 @@ static void project_bucket_clip_face(const bool is_ortho,
#endif
}
-/*
+/**
+ * \code{.py}
* # This script creates faces in a blender scene from printed data above.
*
* project_ls = [
@@ -2896,7 +2897,7 @@ static void project_bucket_clip_face(const bool is_ortho,
* V = Mathutils.Vector
*
* def main():
- * sce = bpy.data.scenes.active
+ * scene = bpy.data.scenes.active
*
* for item in project_ls:
* bb = item[0]
@@ -2904,7 +2905,7 @@ static void project_bucket_clip_face(const bool is_ortho,
* poly = item[2]
*
* me = bpy.data.meshes.new()
- * ob = sce.objects.new(me)
+ * ob = scene.objects.new(me)
*
* me.verts.extend([V(bb[0]).xyz, V(bb[1]).xyz, V(bb[2]).xyz, V(bb[3]).xyz])
* me.faces.extend([(0,1,2,3),])
@@ -2926,6 +2927,7 @@ static void project_bucket_clip_face(const bool is_ortho,
*
* if __name__ == '__main__':
* main()
+ * \endcode
*/
#undef ISECT_1
diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
index 9ffe10360af..4367189c997 100644
--- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
+++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
@@ -127,8 +127,8 @@ void SCULPT_filter_cache_init(bContext *C,
BKE_pbvh_node_mark_normals_update(ss->filter_cache->nodes[i]);
}
- /* mesh->runtime.subdiv_ccg is not available. Updating of the normals is done during drawing.
- * Filters can't use normals in multires. */
+ /* `mesh->runtime.subdiv_ccg` is not available. Updating of the normals is done during drawing.
+ * Filters can't use normals in multi-resolution. */
if (BKE_pbvh_type(ss->pbvh) != PBVH_GRIDS) {
BKE_pbvh_update_normals(ss->pbvh, NULL);
}
@@ -438,7 +438,7 @@ static void mesh_filter_task_cb(void *__restrict userdata,
case MESH_FILTER_RANDOM: {
float normal[3];
copy_v3_v3(normal, orig_data.no);
- /* Index is not unique for multires, so hash by vertex coordinates. */
+ /* Index is not unique for multi-resolution, so hash by vertex coordinates. */
const uint *hash_co = (const uint *)orig_co;
const uint hash = BLI_hash_int_2d(hash_co[0], hash_co[1]) ^
BLI_hash_int_2d(hash_co[2], ss->filter_cache->random_seed);
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index b39bc6de7e5..a1f9bf776ae 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -662,7 +662,7 @@ const char *rna_translate_ui_text(const char *text,
struct PropertyRNA *prop,
bool translate);
-/* Internal functions that cycles uses so we need to declare (tsk!). */
+/* Internal functions that cycles uses so we need to declare (not ideal!). */
void rna_RenderPass_rect_set(PointerRNA *ptr, const float *values);
#ifdef RNA_RUNTIME
More information about the Bf-blender-cvs
mailing list