Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/curves.cc
| Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void curves_foreach_id(ID *id, LibraryForeachIDData *data) | static void curves_foreach_id(ID *id, LibraryForeachIDData *data) | ||||
| { | { | ||||
| Curves *curves = (Curves *)id; | Curves *curves = (Curves *)id; | ||||
| for (int i = 0; i < curves->totcol; i++) { | for (int i = 0; i < curves->totcol; i++) { | ||||
| BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, curves->mat[i], IDWALK_CB_USER); | BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, curves->mat[i], IDWALK_CB_USER); | ||||
| } | } | ||||
| BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, curves->surface, IDWALK_CB_NOP); | |||||
| } | } | ||||
| static void curves_blend_write(BlendWriter *writer, ID *id, const void *id_address) | static void curves_blend_write(BlendWriter *writer, ID *id, const void *id_address) | ||||
| { | { | ||||
| Curves *curves = (Curves *)id; | Curves *curves = (Curves *)id; | ||||
| CustomDataLayer *players = nullptr, players_buff[CD_TEMP_CHUNK_SIZE]; | CustomDataLayer *players = nullptr, players_buff[CD_TEMP_CHUNK_SIZE]; | ||||
| CustomDataLayer *clayers = nullptr, clayers_buff[CD_TEMP_CHUNK_SIZE]; | CustomDataLayer *clayers = nullptr, clayers_buff[CD_TEMP_CHUNK_SIZE]; | ||||
| ▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void curves_blend_read_lib(BlendLibReader *reader, ID *id) | static void curves_blend_read_lib(BlendLibReader *reader, ID *id) | ||||
| { | { | ||||
| Curves *curves = (Curves *)id; | Curves *curves = (Curves *)id; | ||||
| for (int a = 0; a < curves->totcol; a++) { | for (int a = 0; a < curves->totcol; a++) { | ||||
| BLO_read_id_address(reader, curves->id.lib, &curves->mat[a]); | BLO_read_id_address(reader, curves->id.lib, &curves->mat[a]); | ||||
| } | } | ||||
| BLO_read_id_address(reader, curves->id.lib, &curves->surface); | |||||
| } | } | ||||
| static void curves_blend_read_expand(BlendExpander *expander, ID *id) | static void curves_blend_read_expand(BlendExpander *expander, ID *id) | ||||
| { | { | ||||
| Curves *curves = (Curves *)id; | Curves *curves = (Curves *)id; | ||||
| for (int a = 0; a < curves->totcol; a++) { | for (int a = 0; a < curves->totcol; a++) { | ||||
| BLO_expand(expander, curves->mat[a]); | BLO_expand(expander, curves->mat[a]); | ||||
| } | } | ||||
| BLO_expand(expander, curves->surface); | |||||
| } | } | ||||
| IDTypeInfo IDType_ID_CV = { | IDTypeInfo IDType_ID_CV = { | ||||
| /*id_code */ ID_CV, | /*id_code */ ID_CV, | ||||
| /*id_filter */ FILTER_ID_CV, | /*id_filter */ FILTER_ID_CV, | ||||
| /*main_listbase_index */ INDEX_ID_CV, | /*main_listbase_index */ INDEX_ID_CV, | ||||
| /*struct_size */ sizeof(Curves), | /*struct_size */ sizeof(Curves), | ||||
| /*name */ "Hair Curves", | /*name */ "Hair Curves", | ||||
| ▲ Show 20 Lines • Show All 216 Lines • Show Last 20 Lines | |||||