Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/lib_override.c
| Show First 20 Lines • Show All 1,679 Lines • ▼ Show 20 Lines | if (local_key != NULL && tmp_key != NULL) { | ||||
| tmp_key->from = tmp_id; | tmp_key->from = tmp_id; | ||||
| } | } | ||||
| /* Again, horribly inn-efficient in our case, we need something off-Main | /* Again, horribly inn-efficient in our case, we need something off-Main | ||||
| * (aka more generic nolib copy/free stuff)! */ | * (aka more generic nolib copy/free stuff)! */ | ||||
| /* XXX And crashing in complex cases (e.g. because depsgraph uses same data...). */ | /* XXX And crashing in complex cases (e.g. because depsgraph uses same data...). */ | ||||
| BKE_id_free_ex(bmain, tmp_id, LIB_ID_FREE_NO_UI_USER, true); | BKE_id_free_ex(bmain, tmp_id, LIB_ID_FREE_NO_UI_USER, true); | ||||
| if (GS(local->name) == ID_AR) { | |||||
| /* Funtime again, thanks to bone pointers in pose data of objects. We keep same ID addresses, | |||||
brecht: Add missing space, "ppose" spelling. | |||||
| * but internal data has changed for sure, so we need to invalidate posebones caches. */ | |||||
| LISTBASE_FOREACH (Object *, ob, &bmain->objects) { | |||||
| if (ob->pose != NULL && ob->data == local) { | |||||
| BLI_assert(ob->type == OB_ARMATURE); | |||||
| ob->pose->flag |= POSE_RECALC; | |||||
| /* We need to clear pose bone pointers immediately, some code may access those before pose | |||||
Done Inline ActionsI don't think clearing the pointers hurts, I'm not sure this comment is accurate after rBab2dbafd8. brecht: I don't think clearing the pointers hurts, I'm not sure this comment is accurate after… | |||||
Done Inline ActionsEeeh, this is copy/paste from same code in id remap code... Indeed needs to be updated there I think. mont29: Eeeh, this is copy/paste from same code in id remap code... Indeed needs to be updated there I… | |||||
| * is actually recomputed, which can lead to segfault. */ | |||||
| BKE_pose_clear_pointers(ob->pose); | |||||
| } | |||||
| } | |||||
| } | |||||
| if (local->override_library->storage) { | if (local->override_library->storage) { | ||||
| /* We know this datablock is not used anywhere besides local->override->storage. */ | /* We know this datablock is not used anywhere besides local->override->storage. */ | ||||
| /* XXX For until we get fully shadow copies, we still need to ensure storage releases | /* XXX For until we get fully shadow copies, we still need to ensure storage releases | ||||
| * its usage of any ID pointers it may have. */ | * its usage of any ID pointers it may have. */ | ||||
| BKE_id_free_ex(bmain, local->override_library->storage, LIB_ID_FREE_NO_UI_USER, true); | BKE_id_free_ex(bmain, local->override_library->storage, LIB_ID_FREE_NO_UI_USER, true); | ||||
| local->override_library->storage = NULL; | local->override_library->storage = NULL; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines | |||||
Add missing space, "ppose" spelling.