diff --git a/client/ayon_houdini/api/workfile_template_builder.py b/client/ayon_houdini/api/workfile_template_builder.py index 7b99260033..d28f200ac2 100644 --- a/client/ayon_houdini/api/workfile_template_builder.py +++ b/client/ayon_houdini/api/workfile_template_builder.py @@ -198,21 +198,21 @@ def create_placeholder(self, placeholder_data): imprint(placeholder_node, placeholder_data) def collect_scene_placeholders(self): - # Read the cache + # Read the cache by identifier placeholder_nodes = self.builder.get_shared_populate_data( - "placeholder_nodes" + self.identifier ) if placeholder_nodes is None: - placeholder_nodes = {} + placeholder_nodes = [] nodes = lsattr("plugin_identifier", self.identifier) for node in nodes: - placeholder_nodes[node.path()] = node + placeholder_nodes.append(node) - # Set the cache + # Set the cache by identifier self.builder.set_shared_populate_data( - "placeholder_nodes", placeholder_nodes + self.identifier, placeholder_nodes ) return placeholder_nodes diff --git a/client/ayon_houdini/plugins/workfile_build/create_placeholder.py b/client/ayon_houdini/plugins/workfile_build/create_placeholder.py index 48242742de..ddbfa3362d 100644 --- a/client/ayon_houdini/plugins/workfile_build/create_placeholder.py +++ b/client/ayon_houdini/plugins/workfile_build/create_placeholder.py @@ -44,16 +44,12 @@ def get_placeholder_node_name(self, placeholder_data): def collect_placeholders(self): output = [] - scene_placeholders = self.collect_scene_placeholders() - for node_name, node in scene_placeholders.items(): - plugin_identifier = node.evalParm("plugin_identifier") - if plugin_identifier != self.identifier: - continue + create_placeholders = self.collect_scene_placeholders() + for node in create_placeholders: placeholder_data = read(node) - output.append( - CreatePlaceholderItem(node_name, placeholder_data, self) + CreatePlaceholderItem(node.path(), placeholder_data, self) ) return output