Changeset View
Changeset View
Standalone View
Standalone View
source/blender/bmesh/intern/bmesh_interp.h
| Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
| * | * | ||||
| * Walks around the faces of \a e and interpolates | * Walks around the faces of \a e and interpolates | ||||
| * the loop data between two sources. | * the loop data between two sources. | ||||
| */ | */ | ||||
| void BM_data_interp_face_vert_edge( | void BM_data_interp_face_vert_edge( | ||||
| BMesh *bm, const BMVert *v_src_1, const BMVert *v_src_2, BMVert *v, BMEdge *e, float fac); | BMesh *bm, const BMVert *v_src_1, const BMVert *v_src_2, BMVert *v, BMEdge *e, float fac); | ||||
| void BM_data_layer_add(BMesh *bm, CustomData *data, int type); | void BM_data_layer_add(BMesh *bm, CustomData *data, int type); | ||||
| void BM_data_layer_add_named(BMesh *bm, CustomData *data, int type, const char *name); | void BM_data_layer_add_named(BMesh *bm, CustomData *data, int type, const char *name); | ||||
| void BM_data_layer_ensure_named(BMesh *bm, CustomData *data, int type, const char *name); | |||||
| void BM_data_layer_free(BMesh *bm, CustomData *data, int type); | void BM_data_layer_free(BMesh *bm, CustomData *data, int type); | ||||
HooglyBoogly: For now, I think it's better to avoid generalizing the "dependent layer" idea. This could stay… | |||||
Done Inline ActionsBut what would be a logical place to define this function then? Or maybe just give it another name so it's more clear it';s for uvs? To do the whole rigmarole of looking up the parent layer name, generating the sublayer name and adding the layer if needed on all callsites would be quite a hassle... Baardaap: But what would be a logical place to define this function then? Or maybe just give it another… | |||||
Done Inline ActionsYeah, just another name that's more clearly for UVs would be nice I think. HooglyBoogly: Yeah, just another name that's more clearly for UVs would be nice I think. | |||||
| /** Ensure the dependent boolean layers exist for all face corner #CD_PROP_FLOAT2 layers. */ | |||||
| void BM_uv_map_ensure_select_and_pin_attrs(BMesh *bm); | |||||
| void BM_uv_map_ensure_vert_select_attr(BMesh *bm, const char *uv_map_name); | |||||
| void BM_uv_map_ensure_edge_select_attr(BMesh *bm, const char *uv_map_name); | |||||
| void BM_uv_map_ensure_pin_attr(BMesh *bm, const char *uv_map_name); | |||||
Done Inline ActionsPrefer shorter names BM_uv_map_ensure_vert_select_attr, BM_uv_map_ensure_select_and_pin_attrs ... etc. campbellbarton: Prefer shorter names `BM_uv_map_ensure_vert_select_attr`… | |||||
Done Inline ActionsI don't really agree, but will change. Baardaap: I don't really agree, but will change. | |||||
| /** | /** | ||||
| * Remove a named custom data layer, if it existed. Return true if the layer was removed. | * Remove a named custom data layer, if it existed. Return true if the layer was removed. | ||||
| */ | */ | ||||
| bool BM_data_layer_free_named(BMesh *bm, CustomData *data, const char *name); | bool BM_data_layer_free_named(BMesh *bm, CustomData *data, const char *name); | ||||
| void BM_data_layer_free_n(BMesh *bm, CustomData *data, int type, int n); | void BM_data_layer_free_n(BMesh *bm, CustomData *data, int type, int n); | ||||
| void BM_data_layer_copy(BMesh *bm, CustomData *data, int type, int src_n, int dst_n); | void BM_data_layer_copy(BMesh *bm, CustomData *data, int type, int src_n, int dst_n); | ||||
| float BM_elem_float_data_get(CustomData *cd, void *element, int type); | float BM_elem_float_data_get(CustomData *cd, void *element, int type); | ||||
| ▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines | |||||
For now, I think it's better to avoid generalizing the "dependent layer" idea. This could stay specific to UVs. It's relatively simple to generalize in the future if we wanted.