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-26 06:56:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-26 06:56:48 +0400
commit48f0444760ea33c67d607b4f1e1dadd66e1eea76 (patch)
treeba74b1cee1e42fe56f2b18006d46b6e082c76568 /source/blender/editors/mesh/editmesh_select.c
parent44010fb6590cc540b1e87e4753603fc34b378ff8 (diff)
style cleanup: editors/mesh - mostly whitespace around operators
Diffstat (limited to 'source/blender/editors/mesh/editmesh_select.c')
-rw-r--r--source/blender/editors/mesh/editmesh_select.c232
1 files changed, 117 insertions, 115 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index dae4eac7e6d..df1a824f3de 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -121,7 +121,7 @@ void EDBM_automerge(Scene *scene, Object *obedit, int update)
/* ****************************** SELECTION ROUTINES **************** */
-unsigned int bm_solidoffs = 0, bm_wireoffs = 0, bm_vertoffs = 0; /* set in drawobject.c ... for colorindices */
+unsigned int bm_solidoffs = 0, bm_wireoffs = 0, bm_vertoffs = 0; /* set in drawobject.c ... for colorindices */
/* facilities for border select and circle select */
static char *selbuf = NULL;
@@ -260,7 +260,7 @@ int EDBM_mask_init_backbuf_border(ViewContext *vc, int mcords[][2], short tot, s
}
glEnd();
- glFinish(); /* to be sure readpixels sees mask */
+ glFinish(); /* to be sure readpixels sees mask */
/* grab mask */
bufmask = view3d_read_backbuf(vc, xmin, ymin, xmax, ymax);
@@ -371,8 +371,8 @@ static unsigned int findnearestvert__backbufIndextest(void *handle, unsigned int
*
* dist (in/out): minimal distance to the nearest and at the end, actual distance
* sel: selection bias
- * if SELECT, selected vertice are given a 5 pixel bias to make them further than unselect verts
- * if 0, unselected vertice are given the bias
+ * if SELECT, selected vertice are given a 5 pixel bias to make them further than unselect verts
+ * if 0, unselected vertice are given the bias
* strict: if 1, the vertice corresponding to the sel parameter are ignored and not just biased
*/
BMVert *EDBM_findnearestvert(ViewContext *vc, int *dist, short sel, short strict)
@@ -583,12 +583,12 @@ BMFace *EDBM_findnearestface(ViewContext *vc, int *dist)
data.mval[0] = vc->mval[0];
data.mval[1] = vc->mval[1];
- data.dist = 0x7FFF; /* largest short */
+ data.dist = 0x7FFF; /* largest short */
data.toFace = efa;
mesh_foreachScreenFace(vc, findnearestface__getDistance, &data);
- if (vc->em->selectmode == SCE_SELECT_FACE || data.dist < *dist) { /* only faces, no dist check */
+ if (vc->em->selectmode == SCE_SELECT_FACE || data.dist < *dist) { /* only faces, no dist check */
*dist = data.dist;
return efa;
}
@@ -653,7 +653,7 @@ static int unified_findnearest(ViewContext *vc, BMVert **r_eve, BMEdge **r_eed,
if (em->selectmode & SCE_SELECT_FACE)
*r_efa = EDBM_findnearestface(vc, &dist);
- dist -= 20; /* since edges select lines, we give dots advantage of 20 pix */
+ dist -= 20; /* since edges select lines, we give dots advantage of 20 pix */
if (em->selectmode & SCE_SELECT_EDGE)
*r_eed = EDBM_findnearestedge(vc, &dist);
@@ -724,7 +724,7 @@ static int similar_face_select_exec(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_SELECT, ob->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data);
/* we succeeded */
return OPERATOR_FINISHED;
@@ -765,7 +765,7 @@ static int similar_edge_select_exec(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_SELECT, ob->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data);
/* we succeeded */
return OPERATOR_FINISHED;
@@ -809,7 +809,7 @@ static int similar_vert_select_exec(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_SELECT, ob->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data);
/* we succeeded */
return OPERATOR_FINISHED;
@@ -831,7 +831,7 @@ static int edbm_select_similar_exec(bContext *C, wmOperator *op)
if (type < 100) return similar_vert_select_exec(C, op);
else if (type < 200) return similar_edge_select_exec(C, op);
- else return similar_face_select_exec(C, op);
+ else return similar_face_select_exec(C, op);
}
static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
@@ -884,7 +884,7 @@ void MESH_OT_select_similar(wmOperatorType *ot)
ot->description = "Select similar vertices, edges or faces by property types";
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
prop = ot->prop = RNA_def_enum(ot->srna, "type", prop_similar_types, SIMVERT_NORMAL, "Type", "");
@@ -907,7 +907,7 @@ static void walker_select(BMEditMesh *em, int walkercode, void *start, int selec
BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP,
BMW_NIL_LAY);
ele = BMW_begin(&walker, start);
- for ( ; ele; ele = BMW_step(&walker)) {
+ for (; ele; ele = BMW_step(&walker)) {
if (!select) {
BM_select_history_remove(bm, ele);
}
@@ -929,7 +929,7 @@ static int edbm_loop_multiselect_exec(bContext *C, wmOperator *op)
int totedgesel = 0;
for (eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL);
- eed; eed = BM_iter_step(&iter)) {
+ eed; eed = BM_iter_step(&iter)) {
if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
totedgesel++;
@@ -968,7 +968,7 @@ static int edbm_loop_multiselect_exec(bContext *C, wmOperator *op)
MEM_freeN(edarray);
// if (EM_texFaceCheck())
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -985,7 +985,7 @@ void MESH_OT_loop_multi_select(wmOperatorType *ot)
ot->description = "Select a loop of connected edges by connection type";
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "ring", 0, "Ring", "");
@@ -1062,7 +1062,7 @@ static void mouse_mesh_loop(bContext *C, int mval[2], short extend, short ring)
* active here in face select mode */
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit);
}
}
@@ -1072,7 +1072,7 @@ static int edbm_select_loop_invoke(bContext *C, wmOperator *op, wmEvent *event)
view3d_operator_needs_opengl(C);
mouse_mesh_loop(C, event->mval, RNA_boolean_get(op->ptr, "extend"),
- RNA_boolean_get(op->ptr, "ring"));
+ RNA_boolean_get(op->ptr, "ring"));
/* cannot do tweaks for as long this keymap is after transform map */
return OPERATOR_FINISHED;
@@ -1139,7 +1139,7 @@ static float edgetag_cut_cost(BMEditMesh *UNUSED(em), BMEdge *e1, BMEdge *e2, BM
}
static void edgetag_add_adjacent(BMEditMesh *em, SmallHash *visithash, Heap *heap, int mednum, int vertnum,
- int *nedges, int *edges, int *prevedge, float *cost)
+ int *nedges, int *edges, int *prevedge, float *cost)
{
BMEdge *e1 = EDBM_get_edge_for_index(em, mednum);
BMVert *v = EDBM_get_vert_for_index(em, vertnum);
@@ -1169,43 +1169,43 @@ static void edgetag_context_set(BMEditMesh *em, Scene *scene, BMEdge *e, int val
{
switch (scene->toolsettings->edge_mode) {
- case EDGE_MODE_SELECT:
- BM_elem_select_set(em->bm, e, val);
- break;
- case EDGE_MODE_TAG_SEAM:
- BM_elem_flag_set(e, BM_ELEM_SEAM, val);
- break;
- case EDGE_MODE_TAG_SHARP:
- BM_elem_flag_set(e, BM_ELEM_SMOOTH, !val);
- break;
- case EDGE_MODE_TAG_CREASE:
- {
- float *crease = CustomData_bmesh_get(&em->bm->edata, e->head.data, CD_CREASE);
- *crease = (val) ? 1.0f : 0.0f;
- break;
- }
- case EDGE_MODE_TAG_BEVEL:
- {
- float *bweight = CustomData_bmesh_get(&em->bm->edata, e->head.data, CD_BWEIGHT);
- *bweight = (val) ? 1.0f : 0.0f;
- break;
- }
+ case EDGE_MODE_SELECT:
+ BM_elem_select_set(em->bm, e, val);
+ break;
+ case EDGE_MODE_TAG_SEAM:
+ BM_elem_flag_set(e, BM_ELEM_SEAM, val);
+ break;
+ case EDGE_MODE_TAG_SHARP:
+ BM_elem_flag_set(e, BM_ELEM_SMOOTH, !val);
+ break;
+ case EDGE_MODE_TAG_CREASE:
+ {
+ float *crease = CustomData_bmesh_get(&em->bm->edata, e->head.data, CD_CREASE);
+ *crease = (val) ? 1.0f : 0.0f;
+ break;
+ }
+ case EDGE_MODE_TAG_BEVEL:
+ {
+ float *bweight = CustomData_bmesh_get(&em->bm->edata, e->head.data, CD_BWEIGHT);
+ *bweight = (val) ? 1.0f : 0.0f;
+ break;
+ }
}
}
static int edgetag_context_check(Scene *scene, BMEditMesh *em, BMEdge *e)
{
switch (scene->toolsettings->edge_mode) {
- case EDGE_MODE_SELECT:
- return BM_elem_flag_test(e, BM_ELEM_SELECT) ? 1 : 0;
- case EDGE_MODE_TAG_SEAM:
- return BM_elem_flag_test(e, BM_ELEM_SEAM);
- case EDGE_MODE_TAG_SHARP:
- return !BM_elem_flag_test(e, BM_ELEM_SMOOTH);
- case EDGE_MODE_TAG_CREASE:
- return BM_elem_float_data_get(&em->bm->edata, e, CD_CREASE) ? 1 : 0;
- case EDGE_MODE_TAG_BEVEL:
- return BM_elem_float_data_get(&em->bm->edata, e, CD_BWEIGHT) ? 1 : 0;
+ case EDGE_MODE_SELECT:
+ return BM_elem_flag_test(e, BM_ELEM_SELECT) ? 1 : 0;
+ case EDGE_MODE_TAG_SEAM:
+ return BM_elem_flag_test(e, BM_ELEM_SEAM);
+ case EDGE_MODE_TAG_SHARP:
+ return !BM_elem_flag_test(e, BM_ELEM_SMOOTH);
+ case EDGE_MODE_TAG_CREASE:
+ return BM_elem_float_data_get(&em->bm->edata, e, CD_CREASE) ? 1 : 0;
+ case EDGE_MODE_TAG_BEVEL:
+ return BM_elem_float_data_get(&em->bm->edata, e, CD_BWEIGHT) ? 1 : 0;
}
return 0;
}
@@ -1225,7 +1225,8 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B
/* note, would pass BM_EDGE except we are looping over all edges anyway */
BM_mesh_elem_index_ensure(em->bm, BM_VERT /* | BM_EDGE */);
- BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+ BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL)
+ {
e->oflags[0].f = 0; /* XXX, whats this for, BMESH_TODO, double check if this is needed */
if (BM_elem_flag_test(e, BM_ELEM_HIDDEN)) {
BLI_smallhash_insert(&visithash, (uintptr_t)e, NULL);
@@ -1416,7 +1417,7 @@ static void mouse_mesh_shortest_path(bContext *C, int mval[2])
}
DAG_id_tag_update(ob->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data);
}
}
@@ -1443,7 +1444,7 @@ void MESH_OT_select_shortest_path(wmOperatorType *ot)
ot->description = "Select shortest path between two selections";
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", "");
@@ -1512,7 +1513,7 @@ int mouse_mesh(bContext *C, const int mval[2], short extend)
// BIF_preview_changed(ID_MA);
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit);
return 1;
}
@@ -1568,10 +1569,10 @@ void EDBM_selectmode_set(BMEditMesh *em)
else if (em->selectmode & SCE_SELECT_EDGE) {
/* deselect vertices, and select again based on edge select */
eve = BM_iter_new(&iter, em->bm, BM_VERTS_OF_MESH, NULL);
- for ( ; eve; eve = BM_iter_step(&iter)) BM_elem_select_set(em->bm, eve, FALSE);
+ for (; eve; eve = BM_iter_step(&iter)) BM_elem_select_set(em->bm, eve, FALSE);
eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL);
- for ( ; eed; eed = BM_iter_step(&iter)) {
+ for (; eed; eed = BM_iter_step(&iter)) {
if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
BM_elem_select_set(em->bm, eed, TRUE);
}
@@ -1583,10 +1584,10 @@ void EDBM_selectmode_set(BMEditMesh *em)
else if (em->selectmode & SCE_SELECT_FACE) {
/* deselect eges, and select again based on face select */
eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL);
- for ( ; eed; eed = BM_iter_step(&iter)) BM_elem_select_set(em->bm, eed, FALSE);
+ for (; eed; eed = BM_iter_step(&iter)) BM_elem_select_set(em->bm, eed, FALSE);
efa = BM_iter_new(&iter, em->bm, BM_FACES_OF_MESH, NULL);
- for ( ; efa; efa = BM_iter_step(&iter)) {
+ for (; efa; efa = BM_iter_step(&iter)) {
if (BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
BM_elem_select_set(em->bm, efa, TRUE);
}
@@ -1605,7 +1606,7 @@ void EDBM_convertsel(BMEditMesh *em, short oldmode, short selectmode)
if (selectmode == SCE_SELECT_EDGE) {
/* select all edges associated with every selected vertex */
eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL);
- for ( ; eed; eed = BM_iter_step(&iter)) {
+ for (; eed; eed = BM_iter_step(&iter)) {
if ((BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) ||
BM_elem_flag_test(eed->v2, BM_ELEM_SELECT)))
{
@@ -1619,7 +1620,7 @@ void EDBM_convertsel(BMEditMesh *em, short oldmode, short selectmode)
/* select all faces associated with every selected vertex */
efa = BM_iter_new(&iter, em->bm, BM_FACES_OF_MESH, NULL);
- for ( ; efa; efa = BM_iter_step(&iter)) {
+ for (; efa; efa = BM_iter_step(&iter)) {
l = BM_iter_new(&liter, em->bm, BM_LOOPS_OF_FACE, efa);
for (; l; l = BM_iter_step(&liter)) {
if (BM_elem_flag_test(l->v, BM_ELEM_SELECT)) {
@@ -1638,7 +1639,7 @@ void EDBM_convertsel(BMEditMesh *em, short oldmode, short selectmode)
/* select all faces associated with every selected vertex */
efa = BM_iter_new(&iter, em->bm, BM_FACES_OF_MESH, NULL);
- for ( ; efa; efa = BM_iter_step(&iter)) {
+ for (; efa; efa = BM_iter_step(&iter)) {
l = BM_iter_new(&liter, em->bm, BM_LOOPS_OF_FACE, efa);
for (; l; l = BM_iter_step(&liter)) {
if (BM_elem_flag_test(l->v, BM_ELEM_SELECT)) {
@@ -1786,7 +1787,7 @@ static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *
/* return warning! */
if (unified_findnearest(&vc, &eve, &eed, &efa) == 0) {
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit);
return OPERATOR_CANCELLED;
}
@@ -1832,13 +1833,13 @@ static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *
BMW_NIL_LAY);
e = BMW_begin(&walker, eed->v1);
- for ( ; e; e = BMW_step(&walker)) {
+ for (; e; e = BMW_step(&walker)) {
BM_elem_select_set(bm, e, sel);
}
BMW_end(&walker);
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1854,7 +1855,7 @@ void MESH_OT_select_linked_pick(wmOperatorType *ot)
ot->description = "(De)select all vertices linked to the edge under the mouse cursor";
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "");
RNA_def_boolean(ot->srna, "limit", 0, "Limit by Seams", "");
@@ -1932,7 +1933,7 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op)
}
EDBM_selectmode_flush_ex(em, SCE_SELECT_VERTEX);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1949,7 +1950,7 @@ void MESH_OT_select_linked(wmOperatorType *ot)
ot->description = "Select all vertices linked to the active mesh";
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "limit", 0, "Limit by Seams", "");
}
@@ -1963,7 +1964,7 @@ static int edbm_select_more_exec(bContext *C, wmOperator *UNUSED(op))
EDBM_select_more(em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1979,7 +1980,7 @@ void MESH_OT_select_more(wmOperatorType *ot)
ot->poll = ED_operator_editmesh;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int edbm_select_less_exec(bContext *C, wmOperator *UNUSED(op))
@@ -1989,7 +1990,7 @@ static int edbm_select_less_exec(bContext *C, wmOperator *UNUSED(op))
EDBM_select_less(em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -2005,7 +2006,7 @@ void MESH_OT_select_less(wmOperatorType *ot)
ot->poll = ED_operator_editmesh;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* Walk all reachable elements of the same type as h_act in breadth-first
@@ -2028,30 +2029,31 @@ static void walker_deselect_nth(BMEditMesh *em, int nth, int offset, BMHeader *h
/* Determine which type of iter, walker, and select flush to use
* based on type of the elements being deselected */
switch (h_act->htype) {
- case BM_VERT:
- itertype = BM_VERTS_OF_MESH;
- walktype = BMW_CONNECTED_VERTEX;
- flushtype = SCE_SELECT_VERTEX;
- mask_vert = BM_ELEM_SELECT;
- break;
- case BM_EDGE:
- itertype = BM_EDGES_OF_MESH;
- walktype = BMW_SHELL;
- flushtype = SCE_SELECT_EDGE;
- mask_edge = BM_ELEM_SELECT;
- break;
- case BM_FACE:
- itertype = BM_FACES_OF_MESH;
- walktype = BMW_ISLAND;
- flushtype = SCE_SELECT_FACE;
- mask_face = BM_ELEM_SELECT;
- break;
+ case BM_VERT:
+ itertype = BM_VERTS_OF_MESH;
+ walktype = BMW_CONNECTED_VERTEX;
+ flushtype = SCE_SELECT_VERTEX;
+ mask_vert = BM_ELEM_SELECT;
+ break;
+ case BM_EDGE:
+ itertype = BM_EDGES_OF_MESH;
+ walktype = BMW_SHELL;
+ flushtype = SCE_SELECT_EDGE;
+ mask_edge = BM_ELEM_SELECT;
+ break;
+ case BM_FACE:
+ itertype = BM_FACES_OF_MESH;
+ walktype = BMW_ISLAND;
+ flushtype = SCE_SELECT_FACE;
+ mask_face = BM_ELEM_SELECT;
+ break;
}
/* Walker restrictions uses BMO flags, not header flags,
* so transfer BM_ELEM_SELECT from HFlags onto a BMO flag layer. */
BMO_push(bm, NULL);
- BM_ITER(ele, &iter, bm, itertype, NULL) {
+ BM_ITER(ele, &iter, bm, itertype, NULL)
+ {
if (BM_elem_flag_test(ele, BM_ELEM_SELECT)) {
/* BMESH_TODO, don't use 'BM_ELEM_SELECT' here, its a HFLAG only! */
BMO_elem_flag_enable(bm, (BMElemF *)ele, BM_ELEM_SELECT);
@@ -2095,15 +2097,15 @@ static void deselect_nth_active(BMEditMesh *em, BMVert **r_eve, BMEdge **r_eed,
if (ese) {
switch (ese->htype) {
- case BM_VERT:
- *r_eve = (BMVert *)ese->ele;
- return;
- case BM_EDGE:
- *r_eed = (BMEdge *)ese->ele;
- return;
- case BM_FACE:
- *r_efa = (BMFace *)ese->ele;
- return;
+ case BM_VERT:
+ *r_eve = (BMVert *)ese->ele;
+ return;
+ case BM_EDGE:
+ *r_eed = (BMEdge *)ese->ele;
+ return;
+ case BM_FACE:
+ *r_efa = (BMFace *)ese->ele;
+ return;
}
}
@@ -2171,7 +2173,7 @@ static int edbm_select_nth_exec(bContext *C, wmOperator *op)
}
DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2189,7 +2191,7 @@ void MESH_OT_select_nth(wmOperatorType *ot)
ot->poll = ED_operator_editmesh;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_int(ot->srna, "nth", 2, 2, 100, "Nth Selection", "", 1, INT_MAX);
RNA_def_int(ot->srna, "offset", 0, 0, 100, "Offset", "", 0, INT_MAX);
@@ -2249,7 +2251,7 @@ static int edbm_select_sharp_edges_exec(bContext *C, wmOperator *op)
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2266,7 +2268,7 @@ void MESH_OT_edges_select_sharp(wmOperatorType *ot)
ot->poll = ED_operator_editmesh;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
RNA_def_float(ot->srna, "sharpness", 1.0f, 0.01f, FLT_MAX, "sharpness", "", 1.0f, 180.0f);
@@ -2330,7 +2332,7 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
BLI_array_free(stack);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2347,7 +2349,7 @@ void MESH_OT_faces_select_linked_flat(wmOperatorType *ot)
ot->poll = ED_operator_editmesh;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
RNA_def_float(ot->srna, "sharpness", 1.0f, 0.01f, FLT_MAX, "sharpness", "", 1.0f, 180.0f);
@@ -2382,7 +2384,7 @@ static int edbm_select_non_manifold_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2399,7 +2401,7 @@ void MESH_OT_select_non_manifold(wmOperatorType *ot)
ot->poll = ED_operator_editmesh;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int edbm_select_random_exec(bContext *C, wmOperator *op)
@@ -2442,7 +2444,7 @@ static int edbm_select_random_exec(bContext *C, wmOperator *op)
EDBM_selectmode_flush(em);
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2459,7 +2461,7 @@ void MESH_OT_select_random(wmOperatorType *ot)
ot->poll = ED_operator_editmesh;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f,
@@ -2498,7 +2500,7 @@ static int edbm_select_next_loop_exec(bContext *C, wmOperator *UNUSED(op))
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -2514,7 +2516,7 @@ void MESH_OT_select_next_loop(wmOperatorType *ot)
ot->poll = ED_operator_editmesh;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -2565,7 +2567,7 @@ static int edbm_region_to_loop_exec(bContext *C, wmOperator *UNUSED(op))
EDBM_selectmode_to_scene(C);
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2581,7 +2583,7 @@ void MESH_OT_region_to_loop(wmOperatorType *ot)
ot->poll = ED_operator_editmesh;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int loop_find_region(BMEditMesh *em, BMLoop *l, int flag,
@@ -2747,7 +2749,7 @@ static int edbm_loop_to_region_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2762,7 +2764,7 @@ void MESH_OT_loop_to_region(wmOperatorType *ot)
ot->poll = ED_operator_editmesh;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "select_bigger", 0, "Select Bigger", "Select bigger regions instead of smaller ones");
}