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 <ideasman42@gmail.com>2019-04-21 17:18:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-21 23:30:04 +0300
commit0ac990d088d553c27f5360f62e142e99f087890a (patch)
treeef3637e9f8086bc937b56777ea9b1f36f97790a4 /source/blender/editors/mesh
parentf8b2268f4fbe92a1860c525f70fdc293304575ff (diff)
Cleanup: comments (long lines) in editors
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_add_gizmo.c3
-rw-r--r--source/blender/editors/mesh/editmesh_bevel.c3
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c7
-rw-r--r--source/blender/editors/mesh/editmesh_rip.c29
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c31
-rw-r--r--source/blender/editors/mesh/editmesh_undo.c10
-rw-r--r--source/blender/editors/mesh/editmesh_utils.c3
-rw-r--r--source/blender/editors/mesh/mesh_data.c6
-rw-r--r--source/blender/editors/mesh/meshtools.c18
9 files changed, 64 insertions, 46 deletions
diff --git a/source/blender/editors/mesh/editmesh_add_gizmo.c b/source/blender/editors/mesh/editmesh_add_gizmo.c
index 9ed2c15f1c1..839ee186016 100644
--- a/source/blender/editors/mesh/editmesh_add_gizmo.c
+++ b/source/blender/editors/mesh/editmesh_add_gizmo.c
@@ -58,7 +58,8 @@
* When we place a shape, pick a plane.
*
* We may base this choice on context,
- * for now pick the "ground" based on the 3D cursor's dominant plane pointing down relative to the view.
+ * for now pick the "ground" based on the 3D cursor's dominant plane
+ * pointing down relative to the view.
*/
static void calc_initial_placement_point_from_view(bContext *C,
const float mval[2],
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index 2c0c8b2c708..1a05e182c3a 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -491,7 +491,8 @@ static int edbm_bevel_invoke(bContext *C, wmOperator *op, const wmEvent *event)
/* for OFFSET_VALUE only, the scale is the size of a pixel under the mouse in 3d space */
opdata->scale[OFFSET_VALUE] = rv3d ? ED_view3d_pixel_size(rv3d, center_3d) : 1.0f;
- /* since we are affecting untransformed object but seeing in transformed space, compensate for that */
+ /* since we are affecting untransformed object but seeing in transformed space,
+ * compensate for that */
opdata->scale[OFFSET_VALUE] /= opdata->max_obj_scale;
edbm_bevel_calc_initial_length(op, event, false);
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index f4979c8f2a8..10a767c2b86 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1653,7 +1653,8 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd)
}
/* Now go through the candidates and find intersections */
- /* These tolerances, in screen space, are for intermediate hits, as ends are already snapped to screen */
+ /* These tolerances, in screen space, are for intermediate hits,
+ * as ends are already snapped to screen. */
if (kcd->is_interactive) {
vert_tol = KNIFE_FLT_EPS_PX_VERT;
@@ -1663,8 +1664,8 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd)
else {
/* Use 1/100th of a pixel, see T43896 (too big), T47910 (too small).
*
- * Update, leave this as is until we investigate not using pixel coords for geometry calculations: T48023
- */
+ * Update, leave this as is until we investigate not using pixel coords
+ * for geometry calculations: T48023. */
vert_tol = line_tol = face_tol = 0.5f;
}
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c
index b1a62ffde3d..8d995d542dc 100644
--- a/source/blender/editors/mesh/editmesh_rip.c
+++ b/source/blender/editors/mesh/editmesh_rip.c
@@ -170,23 +170,26 @@ static float edbm_rip_edge_side_measure(
*
* The method used for checking the side of selection is as follows...
* - First tag all rip-able edges.
- * - Build a contiguous edge list by looping over tagged edges and following each ones tagged siblings in both
- * directions.
- * - The loops are not stored in an array, Instead both loops on either side of each edge has its index values set
- * to count down from the last edge, this way, once we have the 'last' edge its very easy to walk down the
- * connected edge loops.
- * The reason for using loops like this is because when the edges are split we don't which face user gets the newly
- * created edge (its as good as random so we cant assume new edges will be on once side).
- * After splitting, its very simple to walk along boundary loops since each only has one edge from a single side.
- * - The end loop pairs are stored in an array however to support multiple edge-selection-islands, so you can rip
- * multiple selections at once.
+ * - Build a contiguous edge list by looping over tagged edges and following each ones tagged
+ * siblings in both directions.
+ * - The loops are not stored in an array, Instead both loops on either side of each edge has
+ * its index values set to count down from the last edge, this way, once we have the 'last'
+ * edge its very easy to walk down the connected edge loops.
+ * The reason for using loops like this is because when the edges are split we don't which
+ * face user gets the newly created edge
+ * (its as good as random so we cant assume new edges will be on once side).
+ * After splitting, its very simple to walk along boundary loops since each only has one edge
+ * from a single side.
+ * - The end loop pairs are stored in an array however to support multiple edge-selection-islands,
+ * so you can rip multiple selections at once.
* - * Execute the split *
- * - For each #EdgeLoopPair walk down both sides of the split using the loops and measure which is facing the mouse.
+ * - For each #EdgeLoopPair walk down both sides of the split using the loops and measure
+ * which is facing the mouse.
* - Deselect the edge loop facing away.
*
* Limitation!
- * This currently works very poorly with intersecting edge islands (verts with more than 2 tagged edges)
- * This is nice to but for now not essential.
+ * This currently works very poorly with intersecting edge islands
+ * (verts with more than 2 tagged edges). This is nice to but for now not essential.
*
* - campbell.
*/
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index fcad933e3c4..05466ce04bc 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -885,8 +885,9 @@ static void edbm_add_edge_face_exec__tricky_finalize_sel(BMesh *bm, BMElem *ele_
BM_select_history_clear(bm);
/* Notes on hidden geometry:
- * - un-hide the face since its possible hidden was copied when copying surrounding face attributes.
- * - un-hide before adding to select history
+ * - Un-hide the face since its possible hidden was copied when copying
+ * surrounding face attributes.
+ * - Un-hide before adding to select history
* since we may extend into an existing, hidden vert/edge.
*/
@@ -946,8 +947,8 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op)
BMElem *ele_desel;
BMFace *ele_desel_face;
- /* be extra clever, figure out if a partial selection should be extended so we can create geometry
- * with single vert or single edge selection */
+ /* be extra clever, figure out if a partial selection should be extended so we can create
+ * geometry with single vert or single edge selection. */
ele_desel = edbm_add_edge_face_exec__tricky_extend_sel(em->bm);
#endif
if (!EDBM_op_init(em,
@@ -980,7 +981,8 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op)
/* Newly created faces may include existing hidden edges,
* copying face data from surrounding, may have copied hidden face flag too.
*
- * Important that faces use flushing since 'edges.out' wont include hidden edges that already existed.
+ * Important that faces use flushing since 'edges.out'
+ * wont include hidden edges that already existed.
*/
BMO_slot_buffer_hflag_disable(
em->bm, bmop.slots_out, "faces.out", BM_FACE, BM_ELEM_HIDDEN, true);
@@ -3425,7 +3427,8 @@ void MESH_OT_blend_from_shape(wmOperatorType *ot)
/* api callbacks */
ot->exec = edbm_blend_from_shape_exec;
- // ot->invoke = WM_operator_props_popup_call; /* disable because search popup closes too easily */
+ /* disable because search popup closes too easily */
+ // ot->invoke = WM_operator_props_popup_call;
ot->ui = edbm_blend_from_shape_ui;
ot->poll = ED_operator_editmesh;
@@ -7730,7 +7733,8 @@ static void point_normals_apply(bContext *C, wmOperator *op, float target[3], co
copy_v3_v3(lnor_ed->nloc, lnor_ed->niloc);
}
else if (do_spherize) {
- /* Note that this is *not* real spherical interpolation. Probably good enough in this case though? */
+ /* Note that this is *not* real spherical interpolation.
+ * Probably good enough in this case though? */
const float strength = RNA_float_get(op->ptr, "spherize_strength");
float spherized_normal[3];
@@ -8810,12 +8814,13 @@ static int edbm_smoothen_normals_exec(bContext *C, wmOperator *op)
float(*smooth_normal)[3] = MEM_callocN(sizeof(*smooth_normal) * lnors_ed_arr->totloop, __func__);
- /* This is weird choice of operation, taking all loops of faces of current vertex... Could lead to some rather
- * far away loops weighting as much as very close ones (topologically speaking), with complex polygons.
- * Using topological distance here (rather than geometrical one) makes sense imho, but would rather go with
- * a more consistent and flexible code, we could even add max topological distance to take into account,
- * and a weighting curve...
- * Would do that later though, think for now we can live with that choice. --mont29 */
+ /* This is weird choice of operation, taking all loops of faces of current vertex.
+ * Could lead to some rather far away loops weighting as much as very close ones
+ * (topologically speaking), with complex polygons.
+ * Using topological distance here (rather than geometrical one)
+ * makes sense imho, but would rather go with a more consistent and flexible code,
+ * we could even add max topological distance to take into account, * and a weighting curve.
+ * Would do that later though, think for now we can live with that choice. --mont29. */
BMLoopNorEditData *lnor_ed = lnors_ed_arr->lnor_editdata;
for (int i = 0; i < lnors_ed_arr->totloop; i++, lnor_ed++) {
l = lnor_ed->loop;
diff --git a/source/blender/editors/mesh/editmesh_undo.c b/source/blender/editors/mesh/editmesh_undo.c
index 2e855d9c5de..28b14b0060d 100644
--- a/source/blender/editors/mesh/editmesh_undo.c
+++ b/source/blender/editors/mesh/editmesh_undo.c
@@ -93,13 +93,13 @@ typedef struct UndoMesh {
int selectmode;
/** \note
- * this isn't a prefect solution, if you edit keys and change shapes this works well (fixing [#32442]),
- * but editing shape keys, going into object mode, removing or changing their order,
- * then go back into editmode and undo will give issues - where the old index will be out of sync
- * with the new object index.
+ * this isn't a prefect solution, if you edit keys and change shapes this works well
+ * (fixing T32442), but editing shape keys, going into object mode, removing or changing their
+ * order, then go back into editmode and undo will give issues - where the old index will be
+ * out of sync with the new object index.
*
* There are a few ways this could be made to work but for now its a known limitation with mixing
- * object and editmode operations - Campbell */
+ * object and editmode operations - Campbell. */
int shapenr;
#ifdef USE_ARRAY_STORE
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 7aa7c2e6114..f3055b5c75e 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -1017,7 +1017,8 @@ static BMVert *cache_mirr_intptr_as_bmvert(intptr_t *index_lookup, int index)
* \param use_select: Restrict to selected verts.
* \param use_topology: Use topology mirror.
* \param maxdist: Distance for close point test.
- * \param r_index: Optional array to write into, as an alternative to a customdata layer (length of total verts).
+ * \param r_index: Optional array to write into, as an alternative to a customdata layer
+ * (length of total verts).
*/
void EDBM_verts_mirror_cache_begin_ex(BMEditMesh *em,
const int axis,
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 580221496ca..fccecf993e8 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -784,7 +784,8 @@ static int mesh_customdata_custom_splitnormals_add_exec(bContext *C, wmOperator
CustomData *data = GET_CD_DATA(me, ldata);
if (me->edit_mesh) {
- /* Tag edges as sharp according to smooth threshold if needed, to preserve autosmooth shading. */
+ /* Tag edges as sharp according to smooth threshold if needed,
+ * to preserve autosmooth shading. */
if (me->flag & ME_AUTOSMOOTH) {
BM_edges_sharp_from_angle_set(me->edit_mesh->bm, me->smoothresh);
}
@@ -792,7 +793,8 @@ static int mesh_customdata_custom_splitnormals_add_exec(bContext *C, wmOperator
BM_data_layer_add(me->edit_mesh->bm, data, CD_CUSTOMLOOPNORMAL);
}
else {
- /* Tag edges as sharp according to smooth threshold if needed, to preserve autosmooth shading. */
+ /* Tag edges as sharp according to smooth threshold if needed,
+ * to preserve autosmooth shading. */
if (me->flag & ME_AUTOSMOOTH) {
float(*polynors)[3] = MEM_mallocN(sizeof(*polynors) * (size_t)me->totpoly, __func__);
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 8cc23edad16..9c799550608 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -150,9 +150,11 @@ static void join_mesh_single(Depsgraph *depsgraph,
mul_m4_v3(cmat, mvert->co);
}
- /* for each shapekey in destination mesh:
- * - if there's a matching one, copy it across (will need to transform vertices into new space...)
- * - otherwise, just copy own coordinates of mesh (no need to transform vertex coordinates into new space)
+ /* For each shapekey in destination mesh:
+ * - if there's a matching one, copy it across
+ * (will need to transform vertices into new space...).
+ * - otherwise, just copy own coordinates of mesh
+ * (no need to transform vertex coordinates into new space).
*/
if (key) {
/* if this mesh has any shapekeys, check first, otherwise just copy coordinates */
@@ -337,7 +339,8 @@ int join_mesh_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- /* only join meshes if there are verts to join, there aren't too many, and we only had one mesh selected */
+ /* Only join meshes if there are verts to join,
+ * there aren't too many, and we only had one mesh selected. */
me = (Mesh *)ob->data;
key = me->key;
@@ -748,9 +751,10 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op)
static MirrTopoStore_t mesh_topo_store = {NULL, -1. - 1, -1};
-/* mode is 's' start, or 'e' end, or 'u' use */
-/* if end, ob can be NULL */
-/* note, is supposed return -1 on error, which callers are currently checking for, but is not used so far */
+/** mode is 's' start, or 'e' end, or 'u' use
+ * if end, ob can be NULL.
+ * \note, is supposed return -1 on error,
+ * which callers are currently checking for, but is not used so far. */
int ED_mesh_mirror_topo_table(Object *ob, Mesh *me_eval, char mode)
{
if (mode == 'u') { /* use table */