40 for (fmap =
data->ob->fmaps.first; fmap; fmap = fmap->
next) {
41 if (
data->fm != fmap) {
62 memcpy(outfmap, infmap,
sizeof(
bFaceMap));
75 for (fmap = inbase->
first; fmap; fmap = fmap->
next) {
130 if (cd_fmap_offset != -1) {
140 if (*
map == fmap_nr) {
143 else if (*
map > fmap_nr) {
153 if (
map && *
map == fmap_nr &&
183 for (i = 0; i < me->
totpoly; i++) {
184 if (
map[i] == fmap_nr) {
187 else if (purge &&
map[i] > fmap_nr) {
259 *r_map_len,
sizeof(*fmap_index_map),
"defgroup index map create");
260 bool is_fmap_remap_needed =
false;
263 for (
bFaceMap *fmap_src = ob_src->
fmaps.
first; fmap_src; fmap_src = fmap_src->next, i++) {
265 is_fmap_remap_needed = is_fmap_remap_needed || (fmap_index_map[i] != i);
268 if (!is_fmap_remap_needed) {
270 fmap_index_map =
NULL;
274 return fmap_index_map;
279 if (
map ==
NULL || map_len == 0) {
282 for (
int i = 0; i < fmap_len; i++, fmap++) {
283 *fmap = (*fmap < map_len && *fmap != -1) ?
map[*fmap] : -1;
CustomData interface, see also DNA_customdata_types.h.
bool CustomData_free_layer(struct CustomData *data, int type, int totelem, int index)
bool CustomData_has_layer(const struct CustomData *data, int type)
void * CustomData_get_layer(const struct CustomData *data, int type)
int CustomData_get_offset(const struct CustomData *data, int type)
General operations, lookup, etc. for blender objects.
bool BKE_object_is_in_editmode_vgroup(const struct Object *ob)
bool BKE_object_is_in_editmode(const struct Object *ob)
Functions for dealing with object face-maps.
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_findstringindex(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
bool BLI_uniquename_cb(UniquenameCheckCallback unique_check, void *arg, const char *defname, char delim, char *name, size_t name_len)
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
#define BM_ELEM_CD_GET_VOID_P(ele, offset)
#define BM_elem_flag_test(ele, hflag)
#define BM_ITER_MESH(ele, iter, bm, itype)
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
SocketIndexByIdentifierMap * map
bFaceMap * BKE_object_facemap_add(Object *ob)
int BKE_object_facemap_name_index(Object *ob, const char *name)
void BKE_object_facemap_clear(Object *ob)
bFaceMap * BKE_object_facemap_find_name(Object *ob, const char *name)
bFaceMap * BKE_object_facemap_add_name(Object *ob, const char *name)
void BKE_object_facemap_copy_list(ListBase *outbase, const ListBase *inbase)
static bool fmap_unique_check(void *arg, const char *name)
void BKE_object_facemap_remove(Object *ob, bFaceMap *fmap)
static void fmap_remove_exec(Object *ob, bFaceMap *fmap, const bool is_edit_mode, const bool purge)
static void object_fmap_remove_object_mode(Object *ob, bFaceMap *fmap, bool purge)
void BKE_object_facemap_index_map_apply(int *fmap, int fmap_len, const int *map, int map_len)
int * BKE_object_facemap_index_map_create(Object *ob_src, Object *ob_dst, int *r_map_len)
static bFaceMap * fmap_duplicate(bFaceMap *infmap)
static void object_fmap_remove_edit_mode(Object *ob, bFaceMap *fmap, bool do_selected, bool purge)
void BKE_object_facemap_unique_name(Object *ob, bFaceMap *fmap)
struct BMEditMesh * edit_mesh