From 4f646b517f0182c4d12009801beb53ddd1ed3a85 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Wed, 13 Nov 2024 18:22:59 +0200 Subject: [PATCH] revert changes in collect_chunk_size.py --- .../plugins/publish/collect_chunk_size.py | 46 ++----------------- 1 file changed, 3 insertions(+), 43 deletions(-) diff --git a/client/ayon_houdini/plugins/publish/collect_chunk_size.py b/client/ayon_houdini/plugins/publish/collect_chunk_size.py index 9d057482a2..cd94827ba7 100644 --- a/client/ayon_houdini/plugins/publish/collect_chunk_size.py +++ b/client/ayon_houdini/plugins/publish/collect_chunk_size.py @@ -9,7 +9,7 @@ class CollectChunkSize(plugin.HoudiniInstancePlugin, """Collect chunk size for cache submission to Deadline.""" order = pyblish.api.CollectorOrder + 0.05 - families = ["publish.hou"] + families = ["ass", "pointcache", "vdbcache", "redshiftproxy", "model"] targets = ["local", "remote"] label = "Collect Chunk Size" chunk_size = 999999 @@ -20,52 +20,12 @@ def process(self, instance): instance.data["chunkSize"] = attr_values.get("chunkSize") @classmethod - def get_attr_defs_for_instance(cls, create_context, instance): - # Filtering of instance, if needed, can be customized - if not cls.instance_matches_plugin_families(instance): - return [] - - # Attributes logic - creator_attributes = instance["creator_attributes"] - - visible = creator_attributes.get("farm", False) - + def get_attribute_defs(cls): return [ NumberDef("chunkSize", minimum=1, maximum=999999, decimals=0, default=cls.chunk_size, - label="Frame Per Task", - visible=visible) + label="Frame Per Task") ] - - @classmethod - def register_create_context_callbacks(cls, create_context): - create_context.add_value_changed_callback(cls.on_values_changed) - - @classmethod - def on_values_changed(cls, event): - """Update instance attribute definitions on attribute changes.""" - - # Update attributes if any of the following plug-in attributes - # change: - keys = ["farm"] - - for instance_change in event["changes"]: - instance = instance_change["instance"] - if not cls.instance_matches_plugin_families(instance): - continue - value_changes = instance_change["changes"] - plugin_attribute_changes = ( - value_changes.get("creator_attributes", {}) - .get(cls.__name__, {})) - - if not any(key in plugin_attribute_changes for key in keys): - continue - - # Update the attribute definitions - new_attrs = cls.get_attr_defs_for_instance( - event["create_context"], instance - ) - instance.set_publish_plugin_attr_defs(cls.__name__, new_attrs) \ No newline at end of file