Fix #110053: Crash on linked animation data with drivers #110795

Merged
Christoph Lendenfeld merged 6 commits from ChrisLend/blender:fix_linked_driver_crash into main 2023-08-18 09:18:02 +02:00

View File

@ -1528,11 +1528,12 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
case MAKE_LINKS_ANIMDATA:
BKE_animdata_copy_id(bmain, (ID *)ob_dst, (ID *)ob_src, 0);
if (ob_dst->data && ob_src->data) {
if (!BKE_id_is_editable(bmain, obdata_id)) {
is_lib = true;
break;
if (BKE_id_is_editable(bmain, obdata_id)) {
BKE_animdata_copy_id(bmain, (ID *)ob_dst->data, (ID *)ob_src->data, 0);
}
else {
is_lib = true;
}
BKE_animdata_copy_id(bmain, (ID *)ob_dst->data, (ID *)ob_src->data, 0);
}
DEG_id_tag_update(&ob_dst->id,
ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);