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-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/bmesh/operators/bmo_beautify.c
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/bmesh/operators/bmo_beautify.c')
-rw-r--r--source/blender/bmesh/operators/bmo_beautify.c71
1 files changed, 36 insertions, 35 deletions
diff --git a/source/blender/bmesh/operators/bmo_beautify.c b/source/blender/bmesh/operators/bmo_beautify.c
index 4efa3d98262..36122e06e9b 100644
--- a/source/blender/bmesh/operators/bmo_beautify.c
+++ b/source/blender/bmesh/operators/bmo_beautify.c
@@ -29,50 +29,51 @@
#include "bmesh_tools.h"
#include "intern/bmesh_operators_private.h"
-#define ELE_NEW 1
-#define FACE_MARK 2
+#define ELE_NEW 1
+#define FACE_MARK 2
void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op)
{
- BMIter iter;
- BMOIter siter;
- BMFace *f;
- BMEdge *e;
- const bool use_restrict_tag = BMO_slot_bool_get(op->slots_in, "use_restrict_tag");
- const short flag = (use_restrict_tag ? VERT_RESTRICT_TAG : 0);
- const short method = (short)BMO_slot_int_get(op->slots_in, "method");
+ BMIter iter;
+ BMOIter siter;
+ BMFace *f;
+ BMEdge *e;
+ const bool use_restrict_tag = BMO_slot_bool_get(op->slots_in, "use_restrict_tag");
+ const short flag = (use_restrict_tag ? VERT_RESTRICT_TAG : 0);
+ const short method = (short)BMO_slot_int_get(op->slots_in, "method");
- BMEdge **edge_array;
- int edge_array_len = 0;
- BMO_ITER (f, &siter, op->slots_in, "faces", BM_FACE) {
- if (f->len == 3) {
- BMO_face_flag_enable(bm, f, FACE_MARK);
- }
- }
+ BMEdge **edge_array;
+ int edge_array_len = 0;
+ BMO_ITER (f, &siter, op->slots_in, "faces", BM_FACE) {
+ if (f->len == 3) {
+ BMO_face_flag_enable(bm, f, FACE_MARK);
+ }
+ }
- BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
- BM_elem_flag_disable(e, BM_ELEM_TAG);
- }
+ BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
+ BM_elem_flag_disable(e, BM_ELEM_TAG);
+ }
- /* will over alloc if some edges can't be rotated */
- edge_array = MEM_mallocN(sizeof(*edge_array) * (size_t)BMO_slot_buffer_count(op->slots_in, "edges"), __func__);
+ /* will over alloc if some edges can't be rotated */
+ edge_array = MEM_mallocN(
+ sizeof(*edge_array) * (size_t)BMO_slot_buffer_count(op->slots_in, "edges"), __func__);
- BMO_ITER (e, &siter, op->slots_in, "edges", BM_EDGE) {
+ BMO_ITER (e, &siter, op->slots_in, "edges", BM_EDGE) {
- /* edge is manifold and can be rotated */
- if (BM_edge_rotate_check(e) &&
- /* faces are tagged */
- BMO_face_flag_test(bm, e->l->f, FACE_MARK) &&
- BMO_face_flag_test(bm, e->l->radial_next->f, FACE_MARK))
- {
- edge_array[edge_array_len] = e;
- edge_array_len++;
- }
- }
+ /* edge is manifold and can be rotated */
+ if (BM_edge_rotate_check(e) &&
+ /* faces are tagged */
+ BMO_face_flag_test(bm, e->l->f, FACE_MARK) &&
+ BMO_face_flag_test(bm, e->l->radial_next->f, FACE_MARK)) {
+ edge_array[edge_array_len] = e;
+ edge_array_len++;
+ }
+ }
- BM_mesh_beautify_fill(bm, edge_array, edge_array_len, flag, method, ELE_NEW, FACE_MARK | ELE_NEW);
+ BM_mesh_beautify_fill(
+ bm, edge_array, edge_array_len, flag, method, ELE_NEW, FACE_MARK | ELE_NEW);
- MEM_freeN(edge_array);
+ MEM_freeN(edge_array);
- BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "geom.out", BM_EDGE | BM_FACE, ELE_NEW);
+ BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "geom.out", BM_EDGE | BM_FACE, ELE_NEW);
}