From d269fb1d72f35e3c1cfb99c921d083052b8eb15a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 3 Aug 2022 09:31:05 +0200 Subject: Fix assert failures in the dependency graph Happens after recent changes in the area. The asserts were a bit too strict and were against the way how the ID_RECALC_ALL is handled. So remove them with explanation why things needs to be silent. --- source/blender/depsgraph/intern/depsgraph_tag.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source/blender/depsgraph') diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index d95e871d6c7..c508bee3218 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -227,7 +227,9 @@ void depsgraph_tag_to_component_opcode(const ID *id, case ID_RECALC_PROVISION_29: case ID_RECALC_PROVISION_30: case ID_RECALC_PROVISION_31: - BLI_assert_msg(0, "Should not happen"); + /* Silently ignore. + * The bits might be passed here from ID_RECALC_ALL. This is not a codmistake, but just the + * way how the recalc flags are handled. */ break; } } @@ -757,7 +759,10 @@ const char *DEG_update_tag_as_string(IDRecalcFlag flag) case ID_RECALC_PROVISION_29: case ID_RECALC_PROVISION_30: case ID_RECALC_PROVISION_31: - BLI_assert_msg(0, "Should not happen"); + /* Silently return nullptr, indicating that there is no string representation. + * + * This is needed due to the way how logging for ID_RECALC_ALL works: it iterates over all + * bits and converts then to string. */ return nullptr; } return nullptr; -- cgit v1.2.3