[Bf-blender-cvs] [781e2124277] temp-sculpt-colors: temp-sculpt-colors: Cleanup a few comments.
Joseph Eagar
noreply at git.blender.org
Mon Mar 7 09:28:40 CET 2022
Commit: 781e2124277d38968529af25a5fcbc2793f4bd84
Author: Joseph Eagar
Date: Mon Mar 7 00:28:18 2022 -0800
Branches: temp-sculpt-colors
https://developer.blender.org/rB781e2124277d38968529af25a5fcbc2793f4bd84
temp-sculpt-colors: Cleanup a few comments.
===================================================================
M source/blender/blenkernel/intern/attribute.c
M source/blender/draw/intern/draw_cache_impl_mesh.c
M source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc
M source/blender/editors/sculpt_paint/paint_vertex.cc
M source/blender/editors/sculpt_paint/sculpt_undo.c
===================================================================
diff --git a/source/blender/blenkernel/intern/attribute.c b/source/blender/blenkernel/intern/attribute.c
index 3dfd43c6b17..56ddae73d0b 100644
--- a/source/blender/blenkernel/intern/attribute.c
+++ b/source/blender/blenkernel/intern/attribute.c
@@ -474,7 +474,7 @@ static void get_domains_types(AttributeDomain domains[ATTR_DOMAIN_NUM])
domains[i] = i;
}
- /* swap corner and face */
+ /* Swap corner and face. */
SWAP(AttributeDomain, domains[ATTR_DOMAIN_FACE], domains[ATTR_DOMAIN_CORNER]);
}
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index ec74cc59208..eb9a50493f0 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -517,8 +517,8 @@ static DRW_MeshCDMask mesh_cd_calc_used_gpu_layers(const Object *object,
const CustomData *cd_vdata = mesh_cd_vdata_get_from_mesh(me_final);
const CustomData *cd_edata = mesh_cd_edata_get_from_mesh(me_final);
- /* create a local copy of mesh with final customdata domains
- we can query */
+ /* Create a local copy of mesh with final customdata domains
+ we can query. */
Mesh query_mesh = *me;
BKE_id_attribute_copy_domains_temp(&query_mesh.id, cd_vdata, cd_edata, cd_ldata, cd_pdata, NULL);
@@ -652,9 +652,9 @@ static DRW_MeshCDMask mesh_cd_calc_used_gpu_layers(const Object *object,
break;
}
- /* note that attr->type will always be CD_PROP_COLOR even for
+ /* Note: attr->type will always be CD_PROP_COLOR even for
CD_MLOOPCOL layers, see node_shader_gpu_vertex_color in
- node_shader_vertex_color.cc
+ node_shader_vertex_color.cc.
*/
case CD_MCOL:
case CD_MLOOPCOL:
@@ -680,7 +680,7 @@ static DRW_MeshCDMask mesh_cd_calc_used_gpu_layers(const Object *object,
layer_i;
}
- /* Note that this is not the same as the layer_i below. */
+ /* Note: this is not the same as the layer_i below. */
if (layer_i != -1) {
layer = (domain == ATTR_DOMAIN_POINT ? cd_vdata : cd_ldata)->layers + layer_i;
}
diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc
index e0993739b56..93710fba3b9 100644
--- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc
+++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc
@@ -80,8 +80,6 @@ static void init_vcol_format(GPUVertFormat *format,
{
GPU_vertformat_deinterleave(format);
- /* note that there are two vcol types that work across point and corner domains */
-
const uint32_t vcol_layers = cache->cd_used.vcol;
blender::Vector<VColRef> refs = get_vcol_refs(cd_vdata, cd_ldata, vcol_layers);
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc
index 6e483cec97c..c7f88f9235f 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex.cc
@@ -373,7 +373,6 @@ static Color vpaint_blend_cpp(const VPaint *vp,
Color color_blend = ED_vpaint_blend_tool2<Color, Traits>(
blend, color_curr, color_paint, alpha_i);
- // = Color::blendTool(blend, color_curr, color_paint, alpha_i);
/* If no accumulate, clip color adding with `color_orig` & `color_test`. */
if (!brush_use_accumulate(vp)) {
@@ -424,7 +423,6 @@ static uint vpaint_blend(const VPaint *vp,
uint color_orig,
uint color_paint,
const int alpha_i,
- /* pre scaled from [0-1] --> [0-255] */
const int brush_alpha_value_i)
{
return color2uint(vpaint_blend_cpp<Color4b, ByteTraits>(vp,
@@ -2254,7 +2252,6 @@ static void do_wpaint_brush_calc_average_weight_cb_ex(
BKE_brush_curve_strength(data->brush, sqrtf(test.dist), cache->radius) > 0.0) {
const int v_index = has_grids ? data->me->mloop[vd.grid_indices[vd.g]].v :
vd.vert_indices[vd.i];
- // const float grid_alpha = has_grids ? 1.0f / vd.gridsize : 1.0f;
const char v_flag = data->me->mvert[v_index].flag;
/* If the vertex is selected. */
@@ -2784,8 +2781,6 @@ extern "C" static int vpaint_mode_toggle_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene);
- // WM_msg_publish_rna_prop(mbus, &ob->id, ob, Object, mode);
-
WM_toolsystem_update_from_context_view3d(C);
return OPERATOR_FINISHED;
@@ -2904,11 +2899,9 @@ static void *vpaint_init_vpaint(bContext *C,
* if not we can skip face map trickiness */
if (vertex_paint_use_fast_update_check(ob)) {
vpd->use_fast_update = true;
- // printf("Fast update!\n");
}
else {
vpd->use_fast_update = false;
- // printf("No fast update!\n");
}
/* to keep tracked of modified loops for shared vertex color blending */
@@ -3583,7 +3576,6 @@ static float tex_color_alpha_ubyte_2(VPaint *vp,
mul_v3_v3(rgba_br, rgba);
*r_color = fromFloat<Color>(rgba_br);
- // rgb_float_to_uchar((uchar *)r_color, rgba_br);
return rgba[3];
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 9ddc582c9a9..8bc532a8429 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -1078,7 +1078,7 @@ static SculptUndoNode *sculpt_undo_alloc_node(Object *ob, PBVHNode *node, Sculpt
usculpt->undo_size += alloc_size;
/* FIXME: Should explain why this is allocated here, to be freed in
- * `SCULPT_undo_push_end_ex(ob)`? */
+ * `SCULPT_undo_push_end_ex()`? */
alloc_size = sizeof(*unode->no) * (size_t)allvert;
unode->no = MEM_callocN(alloc_size, "SculptUndoNode.no");
usculpt->undo_size += alloc_size;
More information about the Bf-blender-cvs
mailing list