26 face_selection.
foreach_index([&](
const int i) {
data.slice(faces[i].drop_front(1)).reverse(); },
38 T *
data =
static_cast<T *
>(
58 const int a = face[j + 1];
59 const int b = face.
last(j);
60 std::swap(corner_verts[a], corner_verts[
b]);
61 std::swap(corner_edges[a - 1], corner_edges[
b]);
75 for (
const int corner : faces[i]) {
93 if (
ELEM(iter.
name,
".corner_vert",
".corner_edge")) {
98 flip_corner_data(faces, selection, attribute.span.typed<T>());
103 mesh.tag_face_winding_changed();
CustomData interface, see also DNA_customdata_types.h.
constexpr int64_t last(const int64_t n=0) const
constexpr int64_t size() const
constexpr IndexRange()=default
constexpr MutableSpan()=default
void foreach_attribute(const FunctionRef< void(const AttributeIter &)> fn) const
std::optional< AttrStorageType > storage_type
GSpanAttributeWriter lookup_for_write_span(StringRef name)
void foreach_index(Fn &&fn, Mode mode=exec_mode::serial) const
void to_static_type(const CPPType &cpp_type, Fn &&fn)
static void flip_corner_data(const OffsetIndices< int > faces, const IndexMask &face_selection, MutableSpan< T > data)
static void flip_custom_data_type(const OffsetIndices< int > faces, CustomData &corner_data, const IndexMask &face_selection, const eCustomDataType data_type)
void mesh_flip_faces(Mesh &mesh, const IndexMask &selection)
constexpr ParallelGrainSize grain_size(int grain_size)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
int CustomData_number_of_layers(const CustomData *data, eCustomDataType type)
void * CustomData_get_layer_n_for_write(CustomData *data, eCustomDataType type, int n, int totelem)
int CustomData_sizeof(eCustomDataType type)
BMesh const char void * data
void BKE_mesh_mdisp_flip(MDisps *md, bool use_loop_mdisp_flip)
void * CustomData_get_layer_for_write(CustomData *data, eCustomDataType type, int totelem)