diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-26 14:35:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-26 14:50:48 +0300 |
commit | f1e49038543cf75766f4a220f62cdc6cdbc0e27d (patch) | |
tree | 0cec2c64739a6a4ca246fe26bed6fe629ea315cb /source/blender/editors/uvedit | |
parent | fae5a907d4d1380f087f1226ebbd65d9d0718cc6 (diff) |
Cleanup: full sentences in comments, improve comment formatting
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 10 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_parametrizer.c | 24 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_smart_stitch.c | 6 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 8 |
4 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index e18bbe0d7c2..2f88e50492f 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -608,7 +608,7 @@ static void uv_weld_align(bContext *C, eUVWeldAlign tool) /* Projection of point (x, y) over line (x1, y1, x2, y2) along X axis: * new_y = (y2 - y1) / (x2 - x1) * (x - x1) + y1 * Maybe this should be a BLI func? Or is it already existing? - * Could use interp_v2_v2v2, but not sure it's worth it here...*/ + * Could use interp_v2_v2v2, but not sure it's worth it here. */ if (tool_local == UV_STRAIGHTEN_X) { luv->uv[0] = a * (luv->uv[1] - uv_start[1]) + uv_start[0]; } @@ -1187,15 +1187,15 @@ static bool uv_snap_uvs_to_adjacent_unselected(Scene *scene, Object *obedit) } BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) { - if (BM_elem_flag_test(f, BM_ELEM_TAG)) { /* face: visible */ + if (BM_elem_flag_test(f, BM_ELEM_TAG)) { /* Face: visible. */ BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) { - if (BM_elem_flag_test(l, BM_ELEM_TAG)) { /* loop: selected*/ + if (BM_elem_flag_test(l, BM_ELEM_TAG)) { /* Loop: selected. */ float uv[2] = {0.0f, 0.0f}; int uv_tot = 0; BM_ITER_ELEM (lsub, &lsubiter, l->v, BM_LOOPS_OF_VERT) { - if (BM_elem_flag_test(lsub->f, BM_ELEM_TAG) && /* face: visible. */ - !BM_elem_flag_test(lsub, BM_ELEM_TAG)) /* loop: unselected. */ + if (BM_elem_flag_test(lsub->f, BM_ELEM_TAG) && /* Face: visible. */ + !BM_elem_flag_test(lsub, BM_ELEM_TAG)) /* Loop: unselected. */ { luv = BM_ELEM_CD_GET_VOID_P(lsub, cd_loop_uv_offset); add_v2_v2(uv, luv->uv); diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index 7d82884760c..eb4ca2e13b2 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -82,10 +82,10 @@ typedef struct PVert { struct PVert *nextlink; union PVertUnion { - PHashKey key; /* construct */ - int id; /* abf/lscm matrix index */ - float distortion; /* area smoothing */ - HeapNode *heaplink; /* edge collapsing */ + PHashKey key; /* Construct. */ + int id; /* ABF/LSCM matrix index. */ + float distortion; /* Area smoothing. */ + HeapNode *heaplink; /* Edge collapsing. */ } u; struct PEdge *edge; @@ -99,10 +99,10 @@ typedef struct PEdge { struct PEdge *nextlink; union PEdgeUnion { - PHashKey key; /* construct */ - int id; /* abf matrix index */ - HeapNode *heaplink; /* fill holes */ - struct PEdge *nextcollapse; /* simplification */ + PHashKey key; /* Construct. */ + int id; /* ABF matrix index. */ + HeapNode *heaplink; /* Fill holes. */ + struct PEdge *nextcollapse; /* Simplification. */ } u; struct PVert *vert; @@ -118,10 +118,10 @@ typedef struct PFace { struct PFace *nextlink; union PFaceUnion { - PHashKey key; /* construct */ - int chart; /* construct splitting*/ - float area3d; /* stretch */ - int id; /* abf matrix index */ + PHashKey key; /* Construct. */ + int chart; /* Construct splitting. */ + float area3d; /* Stretch. */ + int id; /* ABF matrix index. */ } u; struct PEdge *edge; diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 0918717e051..71656784947 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -76,7 +76,7 @@ typedef struct StitchPreviewer { float *preview_polys; /* uvs per polygon. */ uint *uvs_per_polygon; - /*number of preview polygons */ + /* Number of preview polygons. */ uint num_polys; /* preview data. These will be either the previewed vertices or edges * depending on stitch mode settings */ @@ -1817,7 +1817,7 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), void /* Closing line */ GPU_vertbuf_attr_set(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index]); - /* j = uvs_per_polygon[i] - 1*/ + /* `j = uvs_per_polygon[i] - 1` */ GPU_vertbuf_attr_set( vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + j * 2]); @@ -1979,7 +1979,7 @@ static StitchState *stitch_init(bContext *C, counter++; state->uvs[counter] = element; } - /* pointer arithmetic to the rescue, as always :)*/ + /* Pointer arithmetic to the rescue, as always :). */ map[element - state->element_map->buf] = counter; } } diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 87ae112a237..ae02097707c 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -498,7 +498,7 @@ static ParamHandle *construct_param_handle_subsurfed(const Scene *scene, /* pointers to modifier data for unwrap control */ ModifierData *md; SubsurfModifierData *smd_real; - /* modifier initialization data, will control what type of subdivision will happen*/ + /* Modifier initialization data, will control what type of subdivision will happen. */ SubsurfModifierData smd = {{NULL}}; /* Used to hold subsurfed Mesh */ DerivedMesh *derivedMesh, *initialDerived; @@ -509,7 +509,7 @@ static ParamHandle *construct_param_handle_subsurfed(const Scene *scene, MEdge *subsurfedEdges; MPoly *subsurfedPolys; MLoop *subsurfedLoops; - /* number of vertices and faces for subsurfed mesh*/ + /* Number of vertices and faces for subsurfed mesh. */ int numOfEdges, numOfFaces; /* holds a map to editfaces for every subsurfed MFace. @@ -1367,7 +1367,7 @@ static void uv_map_rotation_matrix_ex(float result[4][4], rotup[2][2] = cosf(upangle) / radius; rotup[0][0] = 1.0f / radius; - /* calculate transforms*/ + /* Calculate transforms. */ mul_m4_series(result, rotup, rotside, viewmatrix, rotobj); } @@ -2905,7 +2905,7 @@ void ED_uvedit_add_simple_uvs(Main *bmain, const Scene *scene, Object *ob) /* select all uv loops first - pack parameters needs this to make sure charts are registered */ ED_uvedit_select_all(bm); uvedit_unwrap_cube_project(bm, 1.0, false, NULL); - /* set the margin really quickly before the packing operation*/ + /* Set the margin really quickly before the packing operation. */ scene->toolsettings->uvcalc_margin = 0.001f; uvedit_pack_islands(scene, ob, bm); BM_mesh_bm_to_me(bmain, bm, me, (&(struct BMeshToMeshParams){0})); |