Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_mesh.c
| Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Generic CustomData Layer Functions | /** \name Generic CustomData Layer Functions | ||||
| * \{ */ | * \{ */ | ||||
| static void rna_cd_layer_name_set(CustomData *cdata, CustomDataLayer *cdl, const char *value) | static void rna_cd_layer_name_set(CustomData *cdata, CustomDataLayer *cdl, const char *value) | ||||
| { | { | ||||
| BLI_strncpy_utf8(cdl->name, value, sizeof(cdl->name)); | CustomData_set_layer_name_index(cdata, cdl - cdata->layers, value); | ||||
| CustomData_set_layer_unique_name(cdata, cdl - cdata->layers); | |||||
| } | } | ||||
| /* avoid using where possible!, ideally the type is known */ | /* avoid using where possible!, ideally the type is known */ | ||||
| static CustomData *rna_cd_from_layer(PointerRNA *ptr, CustomDataLayer *cdl) | static CustomData *rna_cd_from_layer(PointerRNA *ptr, CustomDataLayer *cdl) | ||||
| { | { | ||||
| /* find out where we come from by */ | /* find out where we come from by */ | ||||
| Mesh *me = (Mesh *)ptr->owner_id; | Mesh *me = (Mesh *)ptr->owner_id; | ||||
| CustomData *cd; | CustomData *cd; | ||||
| ▲ Show 20 Lines • Show All 3,488 Lines • Show Last 20 Lines | |||||