From 50856cd888a3ee605792472e496194cc39b98b9b Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Sat, 16 Nov 2024 02:09:05 +0200 Subject: [PATCH 1/2] implement get_publish_families --- client/ayon_houdini/plugins/create/create_bgeo.py | 3 +++ client/ayon_houdini/plugins/create/create_model.py | 3 +++ client/ayon_houdini/plugins/create/create_pointcache.py | 3 +++ 3 files changed, 9 insertions(+) diff --git a/client/ayon_houdini/plugins/create/create_bgeo.py b/client/ayon_houdini/plugins/create/create_bgeo.py index f86c2189c1..be51eda411 100644 --- a/client/ayon_houdini/plugins/create/create_bgeo.py +++ b/client/ayon_houdini/plugins/create/create_bgeo.py @@ -13,6 +13,9 @@ class CreateBGEO(plugin.HoudiniCreator): product_type = "pointcache" icon = "gears" + def get_publish_families(self): + return ["pointcache", "bgeo"] + def create(self, product_name, instance_data, pre_create_data): instance_data.update({"node_type": "geometry"}) diff --git a/client/ayon_houdini/plugins/create/create_model.py b/client/ayon_houdini/plugins/create/create_model.py index ef1c5741d4..92eee306ae 100644 --- a/client/ayon_houdini/plugins/create/create_model.py +++ b/client/ayon_houdini/plugins/create/create_model.py @@ -24,6 +24,9 @@ class CreateModel(plugin.HoudiniCreator): product_type = "model" icon = "cube" + def get_publish_families(self): + return ["model", "abc"] + def create(self, product_name, instance_data, pre_create_data): instance_data.update({"node_type": "alembic"}) creator_attributes = instance_data.setdefault( diff --git a/client/ayon_houdini/plugins/create/create_pointcache.py b/client/ayon_houdini/plugins/create/create_pointcache.py index 06d7aaa4ec..969e2a65e7 100644 --- a/client/ayon_houdini/plugins/create/create_pointcache.py +++ b/client/ayon_houdini/plugins/create/create_pointcache.py @@ -14,6 +14,9 @@ class CreatePointCache(plugin.HoudiniCreator): product_type = "pointcache" icon = "gears" + def get_publish_families(self): + return ["pointcache", "abc"] + def create(self, product_name, instance_data, pre_create_data): instance_data.update({"node_type": "alembic"}) creator_attributes = instance_data.setdefault( From ba73aa0e251d46e40b21b0aa451301f3b02b9989 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Sat, 16 Nov 2024 02:09:42 +0200 Subject: [PATCH 2/2] remove unnecessary collector --- .../plugins/publish/collect_instances_type.py | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 client/ayon_houdini/plugins/publish/collect_instances_type.py diff --git a/client/ayon_houdini/plugins/publish/collect_instances_type.py b/client/ayon_houdini/plugins/publish/collect_instances_type.py deleted file mode 100644 index 75a394a1f9..0000000000 --- a/client/ayon_houdini/plugins/publish/collect_instances_type.py +++ /dev/null @@ -1,24 +0,0 @@ -"""Collector for different types. - -This will add additional families to different instance based on -the creator_identifier parameter. -""" -import pyblish.api -from ayon_houdini.api import plugin - - -class CollectPointcacheType(plugin.HoudiniInstancePlugin): - """Collect data type for different instances.""" - - order = pyblish.api.CollectorOrder - families = ["pointcache", "model"] - label = "Collect instances types" - - def process(self, instance): - if instance.data["creator_identifier"] == "io.openpype.creators.houdini.bgeo": # noqa: E501 - instance.data["families"] += ["bgeo"] - elif instance.data["creator_identifier"] in { - "io.openpype.creators.houdini.pointcache", - "io.openpype.creators.houdini.model" - }: - instance.data["families"] += ["abc"]