LibOverride: Fix (unreported) assert when creating overrides of linked overrides.
We do not want to copy exiting overrides data from linked ID when creating its local override (be it either a template, or because linked ID is itself an override of another lib data). Note that this was not a very serious issue, would just cause some memory leak since override data is re-created on newly copied local data anyway. These use cases have been very little tested so far, but both complex production pipeline and future restrictive workflow will make them fairly common...
This commit is contained in:
parent
c9e054c5de
commit
3bd892a74c
|
@ -196,7 +196,10 @@ void BKE_lib_override_library_free(struct IDOverrideLibrary **override, const bo
|
|||
|
||||
static ID *lib_override_library_create_from(Main *bmain, ID *reference_id)
|
||||
{
|
||||
ID *local_id = BKE_id_copy(bmain, reference_id);
|
||||
/* Note: We do not want to copy possible override data from reference here (whether it is an
|
||||
* override template, or aleady an override of some other ref data). */
|
||||
ID *local_id = BKE_id_copy_ex(
|
||||
bmain, reference_id, NULL, LIB_ID_COPY_DEFAULT | LIB_ID_COPY_NO_LIB_OVERRIDE);
|
||||
|
||||
if (local_id == NULL) {
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue