diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-02-02 13:55:04 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-02-03 12:02:20 +0300 |
commit | c80411ce3b14a6b9d2181eb8c8c921932ed2709d (patch) | |
tree | 2d16e45850d7370375bba9f9b8961bf2b282eb13 /source/blender/depsgraph/intern/eval | |
parent | c379223053e7187e71ff031bb61938edaa3959af (diff) |
Despgraph: Remove asserts from object modifier backup
The modifiers are mapped between original and evaluated objects based on
their session IDs. The pointer to original modifier is no longer needed
for the backup: it remained from the initial implementation which was
rewritten at some point.
This is a preparation for removal of the pointer to original modifier.
Diffstat (limited to 'source/blender/depsgraph/intern/eval')
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_object.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_object.cc b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_object.cc index 1081528ece1..17369f723ec 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_object.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_object.cc @@ -71,7 +71,6 @@ void ObjectRuntimeBackup::backup_modifier_runtime_data(Object *object) const SessionUUID &session_uuid = modifier_data->session_uuid; BLI_assert(BLI_session_uuid_is_generated(&session_uuid)); - BLI_assert(modifier_data->orig_modifier_data != nullptr); modifier_runtime_data.add(session_uuid, ModifierDataBackup(modifier_data)); modifier_data->runtime = nullptr; } @@ -150,8 +149,9 @@ void ObjectRuntimeBackup::restore_to_object(Object *object) void ObjectRuntimeBackup::restore_modifier_runtime_data(Object *object) { LISTBASE_FOREACH (ModifierData *, modifier_data, &object->modifiers) { - BLI_assert(modifier_data->orig_modifier_data != nullptr); const SessionUUID &session_uuid = modifier_data->session_uuid; + BLI_assert(BLI_session_uuid_is_generated(&session_uuid)); + optional<ModifierDataBackup> backup = modifier_runtime_data.pop_try(session_uuid); if (backup.has_value()) { modifier_data->runtime = backup->runtime; |