Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BLI_alloca.h"
#include "BLI_math.h"
#include "BKE_attribute.h"
#include "BKE_customdata.h"
#include "BKE_object.h"
#include "bmesh.h"
#include "intern/bmesh_operators_private.h"
Go to the source code of this file.
Macros | |
#define | ELE_NEW 1 |
#define | SEL_FLAG 1 |
#define | SEL_ORIG 2 |
utility bmesh operators, e.g. transform, translate, rotate, scale, etc.
Definition in file bmo_utils.c.
#define ELE_NEW 1 |
Definition at line 27 of file bmo_utils.c.
#define SEL_FLAG 1 |
Definition at line 147 of file bmo_utils.c.
#define SEL_ORIG 2 |
Definition at line 148 of file bmo_utils.c.
|
static |
Definition at line 659 of file bmo_utils.c.
References BM_ELEM_CD_GET_VOID_P, BM_ITER_ELEM_INDEX, BM_LOOPS_OF_FACE, CD_PROP_COLOR, col, l, BMFace::len, and size().
Referenced by bmo_reverse_colors_exec().
Definition at line 524 of file bmo_utils.c.
References BLI_array_alloca, BM_ELEM_CD_GET_VOID_P, BM_ITER_ELEM_INDEX, BM_LOOPS_OF_FACE, copy_v2_v2(), float(), l, BMFace::len, and MLoopUV::uv.
Referenced by bmo_reverse_uvs_exec().
void bmo_create_vert_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 29 of file bmo_utils.c.
References bm, BM_CREATE_NOP, BM_VERT, BM_vert_create(), BMO_slot_buffer_from_enabled_flag(), BMO_slot_vec_get(), BMO_vert_flag_enable, ELE_NEW, NULL, BMOperator::slots_in, and BMOperator::slots_out.
|
static |
Definition at line 150 of file bmo_utils.c.
References bm, BM_FACE_FIRST_LOOP, BMO_edge_flag_set, BMO_face_flag_set, BMO_vert_flag_set, BMLoop::e, BMLoop::next, oflag, and BMLoop::v.
Referenced by bmo_region_extend_expand().
|
static |
Definition at line 560 of file bmo_utils.c.
References ATTR_DOMAIN_CORNER, ATTR_DOMAIN_MASK_COLOR, BKE_id_attribute_copy_domains_temp(), BKE_id_attribute_domain(), BKE_id_attribute_from_index(), bm, CD_MASK_COLOR_ALL, CustomData_get_layer_index(), Mesh::id, ID_ME, CustomData::layers, BMesh::ldata, NULL, CustomDataLayer::offset, CustomDataLayer::type, and BMesh::vdata.
Referenced by bmo_reverse_colors_exec(), and bmo_rotate_colors_exec().
|
static |
Definition at line 263 of file bmo_utils.c.
References bm, BM_edge_is_wire(), BM_EDGES_OF_VERT, BM_FACE, BM_FACES_OF_EDGE, BM_FACES_OF_VERT, BM_ITER_ELEM, BM_LOOPS_OF_FACE, BM_VERT, BMO_edge_flag_enable, BMO_edge_flag_test, BMO_face_flag_enable, BMO_face_flag_test, BMO_ITER, BMO_vert_flag_enable, BMLoop::e, e, l, SEL_FLAG, SEL_ORIG, BMOperator::slots_in, BMLoop::v, and v.
Referenced by bmo_region_extend_exec().
void bmo_region_extend_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 362 of file bmo_utils.c.
References bm, BM_ALL_NOLOOP, bmo_region_extend_contract(), bmo_region_extend_expand(), BMO_slot_bool_get(), BMO_slot_buffer_flag_enable(), BMO_slot_buffer_from_enabled_flag(), SEL_FLAG, SEL_ORIG, BMOperator::slots_in, and BMOperator::slots_out.
|
static |
Definition at line 163 of file bmo_utils.c.
References bm, BM_edge_is_wire(), BM_edge_other_vert(), BM_EDGES_OF_VERT, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_FACE, BM_FACES_OF_EDGE, BM_FACES_OF_VERT, BM_ITER_ELEM, BM_LOOPS_OF_FACE, BM_VERT, BMO_edge_flag_enable, BMO_edge_flag_test, BMO_face_flag_enable, bmo_face_flag_set_flush(), BMO_face_flag_test, BMO_ITER, BMO_vert_flag_enable, BMLoop::e, e, l, SEL_FLAG, SEL_ORIG, BMOperator::slots_in, BMLoop::v, and v.
Referenced by bmo_region_extend_exec().
void bmo_reverse_colors_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 688 of file bmo_utils.c.
References bm, BM_FACE, bm_face_reverse_colors(), BMO_ERROR_CANCEL, BMO_error_raise(), bmo_get_loop_color_ref(), BMO_ITER, BMO_slot_int_get(), and BMOperator::slots_in.
void bmo_reverse_faces_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 135 of file bmo_utils.c.
References bm, BM_FACE, BM_face_normal_flip_ex(), BMO_ITER, BMO_slot_bool_get(), CD_MDISPS, CustomData_get_offset(), BMesh::ldata, and BMOperator::slots_in.
void bmo_reverse_uvs_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 544 of file bmo_utils.c.
References bm, BM_FACE, bm_face_reverse_uvs(), BMO_ITER, CD_MLOOPUV, CustomData_get_offset(), BMesh::ldata, and BMOperator::slots_in.
void bmo_rotate_colors_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 584 of file bmo_utils.c.
References bm, BM_ELEM_CD_GET_VOID_P, BM_FACE, BM_ITER_ELEM, BM_LOOPS_OF_FACE, BMO_ERROR_CANCEL, BMO_error_raise(), bmo_get_loop_color_ref(), BMO_ITER, BMO_slot_bool_get(), BMO_slot_int_get(), CD_PROP_COLOR, size(), and BMOperator::slots_in.
void bmo_rotate_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 114 of file bmo_utils.c.
References bm, BMO_op_callf(), BMO_slot_mat4_get(), BMO_slot_vec_get(), center, BMOperator::flag, BMOperator::slots_in, and transform_pivot_set_m4().
void bmo_rotate_uvs_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 458 of file bmo_utils.c.
References bm, BM_ELEM_CD_GET_VOID_P, BM_FACE, BM_ITER_ELEM, BM_LOOPS_OF_FACE, BMO_ITER, BMO_slot_bool_get(), CD_MLOOPUV, copy_v2_v2(), CustomData_get_offset(), BMesh::ldata, BMOperator::slots_in, and MLoopUV::uv.
void bmo_scale_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 91 of file bmo_utils.c.
References bm, BMO_op_callf(), BMO_slot_vec_get(), BMOperator::flag, BMOperator::slots_in, and unit_m3().
void bmo_smooth_vert_exec | ( | BMesh * | UNUSEDbm, |
BMOperator * | op | ||
) |
Definition at line 380 of file bmo_utils.c.
References add_v3_v3v3(), BM_edge_other_vert(), BM_EDGES_OF_VERT, BM_ITER_ELEM, BM_VERT, BMO_ITER, BMO_slot_bool_get(), BMO_slot_buffer_len(), BMO_slot_float_get(), BMVert::co, copy_v3_v3(), KDL::cos(), e, fabsf, float(), interp_v3_v3v3(), MEM_freeN, MEM_mallocN, mul_v3_fl(), BMOperator::slots_in, v, and zero_v3().
void bmo_transform_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 39 of file bmo_utils.c.
References bm, BM_ELEM_CD_GET_VOID_P, BM_VERT, BMO_ITER, BMO_slot_bool_get(), BMO_slot_mat4_get(), CD_SHAPEKEY, BMVert::co, CustomData_get_offset(), CustomData_number_of_layers(), float(), invert_m4_m4(), is_zero_m4(), mul_m4_series, mul_m4_v3(), BMOperator::slots_in, v, and BMesh::vdata.
void bmo_translate_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 70 of file bmo_utils.c.
References bm, BMO_op_callf(), BMO_slot_vec_get(), copy_v3_v3(), BMOperator::flag, BMOperator::slots_in, and unit_m4().