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>2012-03-03 20:31:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-03 20:31:46 +0400
commita2c182e9233333fc3b8ff40d352113ec95e7e30c (patch)
tree37a9e08f4e6c4bf794aa0c8c15af875299db4a1b /source/blender/editors/mesh
parent86cec98f9e1523ed41b67ef998174289dbae9b83 (diff)
style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide).
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/bmesh_select.c44
-rw-r--r--source/blender/editors/mesh/bmesh_selecthistory.c4
-rw-r--r--source/blender/editors/mesh/bmesh_tools.c49
-rw-r--r--source/blender/editors/mesh/editface.c6
-rw-r--r--source/blender/editors/mesh/editmesh_bvh.c12
-rw-r--r--source/blender/editors/mesh/loopcut.c4
-rw-r--r--source/blender/editors/mesh/mesh_data.c26
-rw-r--r--source/blender/editors/mesh/mesh_intern.h20
-rw-r--r--source/blender/editors/mesh/meshtools.c8
9 files changed, 87 insertions, 86 deletions
diff --git a/source/blender/editors/mesh/bmesh_select.c b/source/blender/editors/mesh/bmesh_select.c
index 2e21f6d1f28..fd6242fb209 100644
--- a/source/blender/editors/mesh/bmesh_select.c
+++ b/source/blender/editors/mesh/bmesh_select.c
@@ -214,11 +214,11 @@ void EDBM_free_backbuf(void)
}
/* mcords is a polygon mask
- - grab backbuffer,
- - draw with black in backbuffer,
- - grab again and compare
- returns 'OK'
-*/
+ * - grab backbuffer,
+ * - draw with black in backbuffer,
+ * - grab again and compare
+ * returns 'OK'
+ */
int EDBM_mask_init_backbuf_border(ViewContext *vc, int mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax)
{
unsigned int *dr, *drm;
@@ -626,10 +626,10 @@ BMFace *EDBM_findnearestface(ViewContext *vc, int *dist)
}
/* best distance based on screen coords.
- use em->selectmode to define how to use
- selected vertices and edges get disadvantage
- return 1 if found one
-*/
+ * use em->selectmode to define how to use
+ * selected vertices and edges get disadvantage
+ * return 1 if found one
+ */
static int unified_findnearest(ViewContext *vc, BMVert **r_eve, BMEdge **r_eed, BMFace **r_efa)
{
BMEditMesh *em = vc->em;
@@ -770,13 +770,11 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
/* ********************************* */
/*
-VERT GROUP
- mode 1: same normal
- mode 2: same number of face users
- mode 3: same vertex groups
-*/
-
-
+ * VERT GROUP
+ * mode 1: same normal
+ * mode 2: same number of face users
+ * mode 3: same vertex groups
+ */
static int similar_vert_select_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_edit_object(C);
@@ -1271,7 +1269,7 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B
* path to edge n found so far, Finally, heap is a priority heap which is built on the
* the same data as the cost arry, but inverted: it is a worklist of edges prioritized
* by the shortest path found so far to the edge.
- */
+ */
#if 0 /* UNUSED */ /* this block does nothing, not sure why its here? - campbell */
for (i = 0; i < totvert; i++) {
@@ -1995,8 +1993,8 @@ void MESH_OT_select_less(wmOperatorType *ot)
}
/* Walk all reachable elements of the same type as h_act in breadth-first
- order, starting from h_act. Deselects elements if the depth when they
- are reached is not a multiple of "nth". */
+ * order, starting from h_act. Deselects elements if the depth when they
+ * are reached is not a multiple of "nth". */
static void walker_deselect_nth(BMEditMesh *em, int nth, int offset, BMHeader *h_act)
{
BMElem *ele;
@@ -2203,9 +2201,9 @@ int EM_view3d_poll(bContext *C)
static int select_sharp_edges_exec(bContext *C, wmOperator *op)
{
/* Find edges that have exactly two neighboring faces,
- * check the angle between those faces, and if angle is
- * small enough, select the edge
- */
+ * check the angle between those faces, and if angle is
+ * small enough, select the edge
+ */
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
BMIter iter;
@@ -2543,7 +2541,7 @@ static int region_to_loop(bContext *C, wmOperator *UNUSED(op))
}
/* If in face-only select mode, switch to edge select mode so that
- an edge-only selection is not inconsistent state */
+ * an edge-only selection is not inconsistent state */
if (em->selectmode == SCE_SELECT_FACE) {
em->selectmode = SCE_SELECT_EDGE;
EDBM_selectmode_set(em);
diff --git a/source/blender/editors/mesh/bmesh_selecthistory.c b/source/blender/editors/mesh/bmesh_selecthistory.c
index f0c00d0ff07..c912813ac63 100644
--- a/source/blender/editors/mesh/bmesh_selecthistory.c
+++ b/source/blender/editors/mesh/bmesh_selecthistory.c
@@ -46,8 +46,8 @@ void EDBM_editselection_normal(float *normal, BMEditSelection *ese)
}
/* Calculate a plane that is rightangles to the edge/vert/faces normal
-also make the plane run along an axis that is related to the geometry,
-because this is used for the manipulators Y axis.*/
+ * also make the plane run along an axis that is related to the geometry,
+ * because this is used for the manipulators Y axis. */
void EDBM_editselection_plane(BMEditMesh *em, float *plane, BMEditSelection *ese)
{
BM_editselection_plane(em->bm, plane, ese);
diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c
index 4ea74777d89..79164d87e98 100644
--- a/source/blender/editors/mesh/bmesh_tools.c
+++ b/source/blender/editors/mesh/bmesh_tools.c
@@ -445,13 +445,14 @@ static int EDBM_Extrude_Mesh(Scene *scene, Object *obedit, BMEditMesh *em, wmOpe
if (em->bm->totedgesel == 0) nr = 0;
nr = 1;
- /* else if (em->totedgesel == 1) nr = 3;
+#if 0
+ else if (em->totedgesel == 1) nr = 3;
else if (em->totfacesel == 0) nr = 3;
else if (em->totfacesel == 1)
nr = 1; // pupmenu("Extrude %t|Region %x1|Only Edges%x3");
else
nr = 1; // pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3");
- */
+#endif
}
else {
if (em->bm->totfacesel == 0) nr = 0;
@@ -475,11 +476,11 @@ static int EDBM_Extrude_Mesh(Scene *scene, Object *obedit, BMEditMesh *em, wmOpe
else {
/* We need to force immediate calculation here because
- * transform may use derived objects (which are now stale).
- *
- * This shouldn't be necessary, derived queries should be
- * automatically building this data if invalid. Or something.
- */
+ * transform may use derived objects (which are now stale).
+ *
+ * This shouldn't be necessary, derived queries should be
+ * automatically building this data if invalid. Or something.
+ */
// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
object_handle_update(scene, obedit);
@@ -1433,11 +1434,11 @@ void EDBM_hide_mesh(BMEditMesh *em, int swap)
/* original hide flushing comment (OUTDATED):
* hide happens on least dominant select mode, and flushes up, not down! (helps preventing errors in subsurf) */
- /* - vertex hidden, always means edge is hidden too
- - edge hidden, always means face is hidden too
- - face hidden, only set face hide
- - then only flush back down what's absolute hidden
- */
+ /* - vertex hidden, always means edge is hidden too
+ * - edge hidden, always means face is hidden too
+ * - face hidden, only set face hide
+ * - then only flush back down what's absolute hidden
+ */
}
@@ -1889,9 +1890,9 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op)
/* dependencies graph and notification stuff */
DAG_id_tag_update(ob->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
-/* DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT | ND_GEOM_SELECT, ob);
-*/
+/* DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ * WM_event_add_notifier(C, NC_OBJECT | ND_GEOM_SELECT, ob);
+ */
/* we succeeded */
return OPERATOR_FINISHED;
}
@@ -2277,9 +2278,9 @@ static int select_vertex_path_exec(bContext *C, wmOperator *op)
EDBM_selectmode_flush(em);
/* dependencies graph and notification stuff */
-/* DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT | ND_GEOM_SELECT, ob);
-*/
+/* DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ * WM_event_add_notifier(C, NC_OBJECT | ND_GEOM_SELECT, ob);
+ */
DAG_id_tag_update(ob->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
@@ -2809,8 +2810,8 @@ static int solidify_exec(bContext *C, wmOperator *op)
}
/* deselect only the faces in the region to be solidified (leave wire
- edges and loose verts selected, as there will be no corresponding
- geometry selected below) */
+ * edges and loose verts selected, as there will be no corresponding
+ * geometry selected below) */
BMO_slot_buffer_hflag_disable(bm, &bmop, "geom", BM_ELEM_SELECT, BM_FACE, TRUE);
/* run the solidify operator */
@@ -3945,10 +3946,10 @@ void MESH_OT_select_mirror(wmOperatorType *ot)
}
#if 0 /* UNUSED */
-/********* qsort routines. not sure how to make these
- work, since we aren't using linked lists for
- geometry anymore. might need a sortof "swap"
- function for bmesh elements. *********/
+/* qsort routines. not sure how to make these
+ * work, since we aren't using linked lists for
+ * geometry anymore. might need a sortof "swap"
+ * function for bmesh elements. */
typedef struct xvertsort {
float x;
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index 58b5154cdff..a6ceba061f6 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -144,7 +144,7 @@ static int facesel_face_pick(struct bContext *C, Mesh *me, Object *ob, const int
if (rect) {
/* sample rect to increase changes of selecting, so that when clicking
- on an edge in the backbuf, we can still select a face */
+ * on an edge in the backbuf, we can still select a face */
int dist;
*index = view3d_sample_backbuf_rect(&vc, mval, 3, 1, me->totpoly+1, &dist,0,NULL, NULL);
@@ -332,10 +332,10 @@ void paintface_select_linked(bContext *UNUSED(C), Object *ob, int UNUSED(mval[2]
if (mode==0 || mode==1) {
// XXX - Causes glitches, not sure why
- /*
+#if 0
if (!facesel_face_pick(C, me, mval, &index, 1))
return;
- */
+#endif
}
select_linked_tfaces_with_seams(mode, me, index);
diff --git a/source/blender/editors/mesh/editmesh_bvh.c b/source/blender/editors/mesh/editmesh_bvh.c
index fc7818183bb..d9ba7a1b36a 100644
--- a/source/blender/editors/mesh/editmesh_bvh.c
+++ b/source/blender/editors/mesh/editmesh_bvh.c
@@ -86,8 +86,8 @@ BMBVHTree *BMBVH_NewBVH(BMEditMesh *em, int flag, Scene *scene, Object *obedit)
float cos[3][3], (*cagecos)[3] = NULL;
int i;
- /*when initializing cage verts, we only want the first cage coordinate for each vertex,
- so that e.g. mirror or array use original vertex coordiantes and not mirrored or duplicate*/
+ /* when initializing cage verts, we only want the first cage coordinate for each vertex,
+ * so that e.g. mirror or array use original vertex coordiantes and not mirrored or duplicate */
BLI_smallhash_init(&shash);
BMEdit_RecalcTessellation(em);
@@ -381,8 +381,8 @@ int BMBVH_EdgeVisible(BMBVHTree *tree, BMEdge *e, ARegion *ar, View3D *v3d, Obje
scale_point(co1, co2, 0.99);
scale_point(co3, co2, 0.99);
- /*ok, idea is to generate rays going from the camera origin to the
- three points on the edge (v1, mid, v2)*/
+ /* ok, idea is to generate rays going from the camera origin to the
+ * three points on the edge (v1, mid, v2)*/
sub_v3_v3v3(dir1, origin, co1);
sub_v3_v3v3(dir2, origin, co2);
sub_v3_v3v3(dir3, origin, co3);
@@ -395,8 +395,8 @@ int BMBVH_EdgeVisible(BMBVHTree *tree, BMEdge *e, ARegion *ar, View3D *v3d, Obje
mul_v3_fl(dir2, epsilon);
mul_v3_fl(dir3, epsilon);
- /*offset coordinates slightly along view vectors, to avoid
- hitting the faces that own the edge.*/
+ /* offset coordinates slightly along view vectors, to avoid
+ * hitting the faces that own the edge.*/
add_v3_v3v3(co1, co1, dir1);
add_v3_v3v3(co2, co2, dir2);
add_v3_v3v3(co3, co3, dir3);
diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c
index a82310be926..5f8c842f4f3 100644
--- a/source/blender/editors/mesh/loopcut.c
+++ b/source/blender/editors/mesh/loopcut.c
@@ -133,8 +133,8 @@ static void ringsel_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
}
}
-/*given two opposite edges in a face, finds the ordering of their vertices so
- that cut preview lines won't cross each other*/
+/* given two opposite edges in a face, finds the ordering of their vertices so
+ * that cut preview lines won't cross each other*/
static void edgering_find_order(BMEditMesh *em, BMEdge *lasteed, BMEdge *eed,
BMVert *lastv1, BMVert *v[2][2])
{
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 4259f7fc558..b4b9461b3c0 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -95,13 +95,12 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la
index = CustomData_get_layer_index(data, type);
/* ok, deleting a non-active layer needs to preserve the active layer indices.
- to do this, we store a pointer to the .data member of both layer and the active layer,
- (to detect if we're deleting the active layer or not), then use the active
- layer data pointer to find where the active layer has ended up.
-
-
- this is necessary because the deletion functions only support deleting the active
- layer. */
+ * to do this, we store a pointer to the .data member of both layer and the active layer,
+ * (to detect if we're deleting the active layer or not), then use the active
+ * layer data pointer to find where the active layer has ended up.
+ *
+ * this is necessary because the deletion functions only support deleting the active
+ * layer. */
actlayerdata = data->layers[CustomData_get_active_layer_index(data, type)].data;
rndlayerdata = data->layers[CustomData_get_render_layer_index(data, type)].data;
clonelayerdata = data->layers[CustomData_get_clone_layer_index(data, type)].data;
@@ -691,8 +690,11 @@ static int sticky_add_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob= ED_object_context(C);
Mesh *me= ob->data;
- /*if(me->msticky)
- return OPERATOR_CANCELLED;*/
+ /* why is this commented out? */
+#if 0
+ if(me->msticky)
+ return OPERATOR_CANCELLED;
+#endif
RE_make_sticky(scene, v3d);
@@ -772,7 +774,7 @@ void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges, int calc_tessface)
polyindex = CustomData_get_layer(&mesh->fdata, CD_POLYINDEX);
/* add a normals layer for tesselated faces, a tessface normal will
- contain the normal of the poly the face was tesselated from. */
+ * contain the normal of the poly the face was tesselated from. */
face_nors = CustomData_add_layer(&mesh->fdata, CD_NORMAL, CD_CALLOC, NULL, mesh->totface);
mesh_calc_normals_mapping(
@@ -987,7 +989,7 @@ static void mesh_remove_faces(Mesh *mesh, int len)
mesh->totface= totface;
}
-/*
+#if 0
void ED_mesh_geometry_add(Mesh *mesh, ReportList *reports, int verts, int edges, int faces)
{
if(mesh->edit_btmesh) {
@@ -1002,7 +1004,7 @@ void ED_mesh_geometry_add(Mesh *mesh, ReportList *reports, int verts, int edges,
if(faces)
mesh_add_faces(mesh, faces);
}
-*/
+#endif
void ED_mesh_faces_add(Mesh *mesh, ReportList *reports, int count)
{
diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h
index b1c95da1731..1afc1796ef6 100644
--- a/source/blender/editors/mesh/mesh_intern.h
+++ b/source/blender/editors/mesh/mesh_intern.h
@@ -51,22 +51,22 @@ struct EnumPropertyItem;
/* ******************** bmeshutils.c */
/*
-ok: the EDBM module is for editmode bmesh stuff. in contrast, the
- BMEdit module is for code shared with blenkernel that concerns
- the BMEditMesh structure.
-*/
+ * ok: the EDBM module is for editmode bmesh stuff. in contrast, the
+ * BMEdit module is for code shared with blenkernel that concerns
+ * the BMEditMesh structure.
+ */
/*calls a bmesh op, reporting errors to the user, etc*/
int EDBM_CallOpf(struct BMEditMesh *em, struct wmOperator *op, const char *fmt, ...);
-/*same as above, but doesn't report errors.*/
+/* same as above, but doesn't report errors.*/
int EDBM_CallOpfSilent(struct BMEditMesh *em, const char *fmt, ...);
-/*these next two functions are the split version of EDBM_CallOpf, so you can
- do stuff with a bmesh operator, after initializing it but before executing
- it.
-
- execute the operator with BM_Exec_Op*/
+/* these next two functions are the split version of EDBM_CallOpf, so you can
+ * do stuff with a bmesh operator, after initializing it but before executing
+ * it.
+ *
+ * execute the operator with BM_Exec_Op */
int EDBM_InitOpf(struct BMEditMesh *em, struct BMOperator *bmop,
struct wmOperator *op, const char *fmt, ...);
/*cleans up after a bmesh operator*/
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 7bf41bdce00..f44af97d403 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -31,8 +31,8 @@
/*
- meshtools.c: no editmode (violated already :), tools operating on meshes
-*/
+ * meshtools.c: no editmode (violated already :), tools operating on meshes
+ */
#include <stddef.h>
#include <stdlib.h>
@@ -87,7 +87,7 @@
/*********************** JOIN ***************************/
/* join selected meshes into the active mesh, context sensitive
-return 0 if no join is made (error) and 1 if the join is done */
+ * return 0 if no join is made (error) and 1 if the join is done */
int join_mesh_exec(bContext *C, wmOperator *op)
{
@@ -555,7 +555,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
/*********************** JOIN AS SHAPES ***************************/
/* Append selected meshes vertex locations as shapes of the active mesh,
- return 0 if no join is made (error) and 1 of the join is done */
+ * return 0 if no join is made (error) and 1 of the join is done */
int join_mesh_shapes_exec(bContext *C, wmOperator *op)
{