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()