Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/lib_id.c
| Show First 20 Lines • Show All 336 Lines • ▼ Show 20 Lines | static int lib_id_expand_local_cb(LibraryIDLinkCallbackData *cb_data) | ||||
| int const cb_flag = cb_data->cb_flag; | int const cb_flag = cb_data->cb_flag; | ||||
| if (cb_flag & IDWALK_CB_LOOPBACK) { | if (cb_flag & IDWALK_CB_LOOPBACK) { | ||||
| /* We should never have anything to do with loopback pointers here. */ | /* We should never have anything to do with loopback pointers here. */ | ||||
| return IDWALK_RET_NOP; | return IDWALK_RET_NOP; | ||||
| } | } | ||||
| if (cb_flag & IDWALK_CB_EMBEDDED) { | if (cb_flag & IDWALK_CB_EMBEDDED) { | ||||
| /* Embedded data-blocks need to be made fully local as well. */ | /* Embedded data-blocks need to be made fully local as well. | ||||
| if (*id_pointer != NULL) { | * Note however that in some cases (when owner ID had to be duplicated instead of being made | ||||
| * local directly), its embedded IDs should also have already been duplicated, and hence be | |||||
| * fully local here already. */ | |||||
| if (*id_pointer != NULL && ID_IS_LINKED(*id_pointer)) { | |||||
| BLI_assert(*id_pointer != id_self); | BLI_assert(*id_pointer != id_self); | ||||
| lib_id_clear_library_data_ex(bmain, *id_pointer); | lib_id_clear_library_data_ex(bmain, *id_pointer); | ||||
| } | } | ||||
| return IDWALK_RET_NOP; | return IDWALK_RET_NOP; | ||||
| } | } | ||||
| /* Can happen that we get un-linkable ID here, e.g. with shape-key referring to itself | /* Can happen that we get un-linkable ID here, e.g. with shape-key referring to itself | ||||
| ▲ Show 20 Lines • Show All 1,974 Lines • Show Last 20 Lines | |||||