LibOverride: fix code trying to auto-resync linked overrides.
This is not only potentially extremely expensive, it is also fairly futile, and code is not designed to handle it currently anyway (could easily end up in inifinite loops and other crashes).
This commit is contained in:
parent
ae650b016f
commit
d235f6a48e
|
@ -862,6 +862,7 @@ bool BKE_lib_override_library_resync(
|
|||
Main *bmain, Scene *scene, ViewLayer *view_layer, ID *id_root, const bool do_hierarchy_enforce)
|
||||
{
|
||||
BLI_assert(ID_IS_OVERRIDE_LIBRARY_REAL(id_root));
|
||||
BLI_assert(!ID_IS_LINKED(id_root));
|
||||
|
||||
ID *id_root_reference = id_root->override_library->reference;
|
||||
|
||||
|
@ -1108,7 +1109,7 @@ void BKE_lib_override_library_main_resync(Main *bmain, Scene *scene, ViewLayer *
|
|||
* those used by current existing overrides. */
|
||||
ID *id;
|
||||
FOREACH_MAIN_ID_BEGIN (bmain, id) {
|
||||
if (!ID_IS_OVERRIDE_LIBRARY_REAL(id)) {
|
||||
if (!ID_IS_OVERRIDE_LIBRARY_REAL(id) || ID_IS_LINKED(id)) {
|
||||
continue;
|
||||
}
|
||||
if (id->tag & (LIB_TAG_DOIT | LIB_TAG_MISSING)) {
|
||||
|
@ -1130,7 +1131,7 @@ void BKE_lib_override_library_main_resync(Main *bmain, Scene *scene, ViewLayer *
|
|||
/* Now check existing overrides, those needing resync will be the one either already tagged as
|
||||
* such, or the one using linked data that is now tagged as needing override. */
|
||||
FOREACH_MAIN_ID_BEGIN (bmain, id) {
|
||||
if (!ID_IS_OVERRIDE_LIBRARY_REAL(id)) {
|
||||
if (!ID_IS_OVERRIDE_LIBRARY_REAL(id) || ID_IS_LINKED(id)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1180,6 +1181,10 @@ void BKE_lib_override_library_main_resync(Main *bmain, Scene *scene, ViewLayer *
|
|||
if ((id->tag & LIB_TAG_LIB_OVERRIDE_NEED_RESYNC) == 0) {
|
||||
continue;
|
||||
}
|
||||
BLI_assert(ID_IS_OVERRIDE_LIBRARY_REAL(id));
|
||||
if (ID_IS_LINKED(id)) {
|
||||
continue;
|
||||
}
|
||||
do_continue = true;
|
||||
CLOG_INFO(&LOG, 2, "Resyncing %s...", id->name);
|
||||
const bool success = BKE_lib_override_library_resync(bmain, scene, view_layer, id, false);
|
||||
|
|
Loading…
Reference in New Issue