Blender  V2.93
bmo_wireframe.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
23 #include "DNA_material_types.h"
24 
25 #include "BLI_sys_types.h"
26 #include "BLI_utildefines.h"
27 
28 #include "bmesh.h"
29 
30 #include "tools/bmesh_wireframe.h"
31 
32 #include "intern/bmesh_operators_private.h" /* own include */
33 
35 {
36  const float offset = BMO_slot_float_get(op->slots_in, "thickness");
37  const float offset_fac = BMO_slot_float_get(op->slots_in, "offset");
38  const bool use_replace = BMO_slot_bool_get(op->slots_in, "use_replace");
39  const bool use_boundary = BMO_slot_bool_get(op->slots_in, "use_boundary");
40  const bool use_even_offset = BMO_slot_bool_get(op->slots_in, "use_even_offset");
41  const bool use_relative_offset = BMO_slot_bool_get(op->slots_in, "use_relative_offset");
42  const bool use_crease = BMO_slot_bool_get(op->slots_in, "use_crease");
43  const float crease_weight = BMO_slot_float_get(op->slots_in, "crease_weight");
44 
47 
49  offset,
50  offset_fac,
51  0.0f,
52  use_replace,
53  use_boundary,
54  use_even_offset,
55  use_relative_offset,
56  use_crease,
57  crease_weight,
58  /* dummy vgroup */
59  -1,
60  false,
61  0,
62  MAXMAT,
63  true);
64 
66 }
#define MAXMAT
@ BM_FACE
Definition: bmesh_class.h:386
@ BM_EDGE
Definition: bmesh_class.h:384
@ BM_ELEM_TAG
Definition: bmesh_class.h:484
ATTR_WARN_UNUSED_RESULT BMesh * bm
void BM_mesh_elem_hflag_disable_all(BMesh *bm, const char htype, const char hflag, const bool respecthide)
void BMO_slot_buffer_hflag_enable(BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const char hflag, const bool do_flush)
BMO_FLAG_BUFFER.
void BMO_slot_buffer_from_enabled_hflag(BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const char hflag)
float BMO_slot_float_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
bool BMO_slot_bool_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
void BM_mesh_wireframe(BMesh *bm, const float offset, const float offset_fac, const float offset_fac_vg, const bool use_replace, const bool use_boundary, const bool use_even_offset, const bool use_relative_offset, const bool use_crease, const float crease_weight, const int defgrp_index, const bool defgrp_invert, const short mat_offset, const short mat_max, const bool use_tag)
void bmo_wireframe_exec(BMesh *bm, BMOperator *op)
Definition: bmo_wireframe.c:34
struct BMOpSlot slots_out[BMO_OP_MAX_SLOTS]
struct BMOpSlot slots_in[BMO_OP_MAX_SLOTS]