Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/volume.cc
| Show First 20 Lines • Show All 553 Lines • ▼ Show 20 Lines | |||||
| static void volume_foreach_id(ID *id, LibraryForeachIDData *data) | static void volume_foreach_id(ID *id, LibraryForeachIDData *data) | ||||
| { | { | ||||
| Volume *volume = (Volume *)id; | Volume *volume = (Volume *)id; | ||||
| for (int i = 0; i < volume->totcol; i++) { | for (int i = 0; i < volume->totcol; i++) { | ||||
| BKE_LIB_FOREACHID_PROCESS(data, volume->mat[i], IDWALK_CB_USER); | BKE_LIB_FOREACHID_PROCESS(data, volume->mat[i], IDWALK_CB_USER); | ||||
| } | } | ||||
| } | } | ||||
| static void volume_foreach_external_file_sequence( | |||||
| Volume *volume, IDTypeForeachExternalFileFunctionCallback function_callback, void *user_data) | |||||
| { | |||||
| } | |||||
| static void volume_foreach_external_file_single( | |||||
| Volume *volume, IDTypeForeachExternalFileFunctionCallback function_callback, void *user_data) | |||||
| { | |||||
| char *file_path = static_cast<char *>(volume->filepath); | |||||
| function_callback((ID *)volume, &file_path, sizeof(volume->filepath), false, user_data); | |||||
| } | |||||
| static void volume_foreach_external_file( | |||||
| ID *id, IDTypeForeachExternalFileFunctionCallback function_callback, void *user_data) | |||||
| { | |||||
| Volume *volume = (Volume *)id; | |||||
| if (volume->packedfile) { | |||||
| return; | |||||
| } | |||||
| if (volume->is_sequence) { | |||||
| volume_foreach_external_file_sequence(volume, function_callback, user_data); | |||||
| } | |||||
| } | |||||
| static void volume_foreach_cache(ID *id, | static void volume_foreach_cache(ID *id, | ||||
| IDTypeForeachCacheFunctionCallback function_callback, | IDTypeForeachCacheFunctionCallback function_callback, | ||||
| void *user_data) | void *user_data) | ||||
| { | { | ||||
| Volume *volume = (Volume *)id; | Volume *volume = (Volume *)id; | ||||
| IDCacheKey key = { | IDCacheKey key = { | ||||
| /* id_session_uuid */ id->session_uuid, | /* id_session_uuid */ id->session_uuid, | ||||
| ▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | IDTypeInfo IDType_ID_VO = { | ||||
| /* flags */ IDTYPE_FLAGS_APPEND_IS_REUSABLE, | /* flags */ IDTYPE_FLAGS_APPEND_IS_REUSABLE, | ||||
| /* init_data */ volume_init_data, | /* init_data */ volume_init_data, | ||||
| /* copy_data */ volume_copy_data, | /* copy_data */ volume_copy_data, | ||||
| /* free_data */ volume_free_data, | /* free_data */ volume_free_data, | ||||
| /* make_local */ nullptr, | /* make_local */ nullptr, | ||||
| /* foreach_id */ volume_foreach_id, | /* foreach_id */ volume_foreach_id, | ||||
| /* foreach_cache */ volume_foreach_cache, | /* foreach_cache */ volume_foreach_cache, | ||||
| /* foreach_external_file */ volume_foreach_external_file, | |||||
| /* owner_get */ nullptr, | /* owner_get */ nullptr, | ||||
| /* blend_write */ volume_blend_write, | /* blend_write */ volume_blend_write, | ||||
| /* blend_read_data */ volume_blend_read_data, | /* blend_read_data */ volume_blend_read_data, | ||||
| /* blend_read_lib */ volume_blend_read_lib, | /* blend_read_lib */ volume_blend_read_lib, | ||||
| /* blend_read_expand */ volume_blend_read_expand, | /* blend_read_expand */ volume_blend_read_expand, | ||||
| /* blend_read_undo_preserve */ nullptr, | /* blend_read_undo_preserve */ nullptr, | ||||
| ▲ Show 20 Lines • Show All 948 Lines • Show Last 20 Lines | |||||