Liboverride/Outliner: Fix assert in Hierarchy view.
Not sure why/when that was changed, but drawing code should not assume all items in the hierarchy view tree of the Outliner are liboverrides - it adds e.g. regular local IDs items for the root item of each library hierarchy of linked liboverrides. Reported by @dfelinto & @LukasTonne, thanks.
This commit is contained in:
@@ -1988,11 +1988,14 @@ static void outliner_draw_overrides_restrictbuts(Main *bmain,
|
||||
}
|
||||
|
||||
ID &id = te_id->get_ID();
|
||||
BLI_assert(ID_IS_OVERRIDE_LIBRARY(&id));
|
||||
|
||||
if (ID_IS_LINKED(&id)) {
|
||||
continue;
|
||||
}
|
||||
if (!ID_IS_OVERRIDE_LIBRARY(&id)) {
|
||||
/* Some items may not be liboverrides, e.g. the root item for all linked libraries (see
|
||||
* #TreeDisplayOverrideLibraryHierarchies::build_tree). */
|
||||
continue;
|
||||
}
|
||||
|
||||
const bool is_system_override = BKE_lib_override_library_is_system_defined(bmain, &id);
|
||||
const BIFIconID icon = is_system_override ? ICON_LIBRARY_DATA_OVERRIDE_NONEDITABLE :
|
||||
|
||||
Reference in New Issue
Block a user