From 7e6185748befce60272240841ca7b94880aa7d6d Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 24 Dec 2024 14:22:34 +0100 Subject: [PATCH] Add todo --- client/ayon_harmony/api/plugin.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client/ayon_harmony/api/plugin.py b/client/ayon_harmony/api/plugin.py index a7d6912..7986475 100644 --- a/client/ayon_harmony/api/plugin.py +++ b/client/ayon_harmony/api/plugin.py @@ -22,6 +22,18 @@ def cache_instance_data(shared_data): Dict[str, Any]: Shared data. """ + + # TODO: We should find a time and place to 'clean up' orphaned data + # of nodes that do not actually exist in the scene anymore. + # Consider this pseudocode based on the legacy creators: + # if remove_orphaned: + # node_name = key.split("/")[-1] + # located_node = harmony.find_node_by_name(node_name, 'WRITE') + # if not located_node: + # print("Removing orphaned instance {}".format(key)) + # harmony.remove(key) + # continue + if shared_data.get("harmony_cached_instance_data") is None: cache = dict() cache_legacy = dict()