diff --git a/client/ayon_houdini/plugins/create/create_alembic_camera.py b/client/ayon_houdini/plugins/create/create_alembic_camera.py index 4a92e24671..5593452d77 100644 --- a/client/ayon_houdini/plugins/create/create_alembic_camera.py +++ b/client/ayon_houdini/plugins/create/create_alembic_camera.py @@ -17,7 +17,6 @@ class CreateAlembicCamera(plugin.HoudiniCreator): def create(self, product_name, instance_data, pre_create_data): import hou - instance_data.pop("active", None) instance_data.update({"node_type": "alembic"}) instance = super(CreateAlembicCamera, self).create( diff --git a/client/ayon_houdini/plugins/create/create_arnold_ass.py b/client/ayon_houdini/plugins/create/create_arnold_ass.py index 4f5fb5833e..ec7ba508e0 100644 --- a/client/ayon_houdini/plugins/create/create_arnold_ass.py +++ b/client/ayon_houdini/plugins/create/create_arnold_ass.py @@ -20,7 +20,6 @@ class CreateArnoldAss(plugin.HoudiniCreator): def create(self, product_name, instance_data, pre_create_data): import hou - instance_data.pop("active", None) instance_data.update({"node_type": "arnold"}) creator_attributes = instance_data.setdefault( "creator_attributes", dict()) diff --git a/client/ayon_houdini/plugins/create/create_arnold_rop.py b/client/ayon_houdini/plugins/create/create_arnold_rop.py index 43875ccbd6..daf7741750 100644 --- a/client/ayon_houdini/plugins/create/create_arnold_rop.py +++ b/client/ayon_houdini/plugins/create/create_arnold_rop.py @@ -26,7 +26,6 @@ def create(self, product_name, instance_data, pre_create_data): creator_attributes[key] = pre_create_data[key] # Remove the active, we are checking the bypass flag of the nodes - instance_data.pop("active", None) instance_data.update({"node_type": "arnold"}) # Add chunk size attribute diff --git a/client/ayon_houdini/plugins/create/create_bgeo.py b/client/ayon_houdini/plugins/create/create_bgeo.py index 93cf0e0998..474aa2f827 100644 --- a/client/ayon_houdini/plugins/create/create_bgeo.py +++ b/client/ayon_houdini/plugins/create/create_bgeo.py @@ -15,8 +15,6 @@ class CreateBGEO(plugin.HoudiniCreator): def create(self, product_name, instance_data, pre_create_data): - instance_data.pop("active", None) - instance_data.update({"node_type": "geometry"}) creator_attributes = instance_data.setdefault( "creator_attributes", dict()) diff --git a/client/ayon_houdini/plugins/create/create_composite.py b/client/ayon_houdini/plugins/create/create_composite.py index 8c0ee8a099..50fcab5875 100644 --- a/client/ayon_houdini/plugins/create/create_composite.py +++ b/client/ayon_houdini/plugins/create/create_composite.py @@ -19,7 +19,6 @@ class CreateCompositeSequence(plugin.HoudiniCreator): def create(self, product_name, instance_data, pre_create_data): import hou # noqa - instance_data.pop("active", None) instance_data.update({"node_type": "comp"}) instance = super(CreateCompositeSequence, self).create( diff --git a/client/ayon_houdini/plugins/create/create_hda.py b/client/ayon_houdini/plugins/create/create_hda.py index ed2fd980e7..7613735f7b 100644 --- a/client/ayon_houdini/plugins/create/create_hda.py +++ b/client/ayon_houdini/plugins/create/create_hda.py @@ -250,14 +250,6 @@ def create_instance_node( return hda_node - def create(self, product_name, instance_data, pre_create_data): - instance_data.pop("active", None) - - return super(CreateHDA, self).create( - product_name, - instance_data, - pre_create_data) - def get_network_categories(self): # Houdini allows creating sub-network nodes inside # these categories. diff --git a/client/ayon_houdini/plugins/create/create_karma_rop.py b/client/ayon_houdini/plugins/create/create_karma_rop.py index 693e6295e2..d4cb3f11b0 100644 --- a/client/ayon_houdini/plugins/create/create_karma_rop.py +++ b/client/ayon_houdini/plugins/create/create_karma_rop.py @@ -24,7 +24,6 @@ def create(self, product_name, instance_data, pre_create_data): if key in pre_create_data: creator_attributes[key] = pre_create_data[key] - instance_data.pop("active", None) instance_data.update({"node_type": "karma"}) # Add chunk size attribute instance_data["chunkSize"] = 10 diff --git a/client/ayon_houdini/plugins/create/create_mantra_rop.py b/client/ayon_houdini/plugins/create/create_mantra_rop.py index ce1c96f8b2..56b3aafdd5 100644 --- a/client/ayon_houdini/plugins/create/create_mantra_rop.py +++ b/client/ayon_houdini/plugins/create/create_mantra_rop.py @@ -23,7 +23,6 @@ def create(self, product_name, instance_data, pre_create_data): if key in pre_create_data: creator_attributes[key] = pre_create_data[key] - instance_data.pop("active", None) instance_data.update({"node_type": "ifd"}) # Add chunk size attribute instance_data["chunkSize"] = 10 diff --git a/client/ayon_houdini/plugins/create/create_model.py b/client/ayon_houdini/plugins/create/create_model.py index ed6b2096c5..ef1c5741d4 100644 --- a/client/ayon_houdini/plugins/create/create_model.py +++ b/client/ayon_houdini/plugins/create/create_model.py @@ -17,7 +17,6 @@ import hou - class CreateModel(plugin.HoudiniCreator): """Create Model""" identifier = "io.openpype.creators.houdini.model" @@ -26,7 +25,6 @@ class CreateModel(plugin.HoudiniCreator): icon = "cube" def create(self, product_name, instance_data, pre_create_data): - instance_data.pop("active", None) instance_data.update({"node_type": "alembic"}) creator_attributes = instance_data.setdefault( "creator_attributes", dict()) diff --git a/client/ayon_houdini/plugins/create/create_pointcache.py b/client/ayon_houdini/plugins/create/create_pointcache.py index 6a63659053..06d7aaa4ec 100644 --- a/client/ayon_houdini/plugins/create/create_pointcache.py +++ b/client/ayon_houdini/plugins/create/create_pointcache.py @@ -15,7 +15,6 @@ class CreatePointCache(plugin.HoudiniCreator): icon = "gears" def create(self, product_name, instance_data, pre_create_data): - instance_data.pop("active", None) instance_data.update({"node_type": "alembic"}) creator_attributes = instance_data.setdefault( "creator_attributes", dict()) diff --git a/client/ayon_houdini/plugins/create/create_redshift_proxy.py b/client/ayon_houdini/plugins/create/create_redshift_proxy.py index 0e3eb03ddd..d9bfe6cdd2 100644 --- a/client/ayon_houdini/plugins/create/create_redshift_proxy.py +++ b/client/ayon_houdini/plugins/create/create_redshift_proxy.py @@ -14,9 +14,6 @@ class CreateRedshiftProxy(plugin.HoudiniCreator): def create(self, product_name, instance_data, pre_create_data): - # Remove the active, we are checking the bypass flag of the nodes - instance_data.pop("active", None) - # Redshift provides a `Redshift_Proxy_Output` node type which shows # a limited set of parameters by default and is set to extract a # Redshift Proxy. However when "imprinting" extra parameters needed diff --git a/client/ayon_houdini/plugins/create/create_redshift_rop.py b/client/ayon_houdini/plugins/create/create_redshift_rop.py index d63e584692..2cf7818a22 100644 --- a/client/ayon_houdini/plugins/create/create_redshift_rop.py +++ b/client/ayon_houdini/plugins/create/create_redshift_rop.py @@ -28,7 +28,6 @@ def create(self, product_name, instance_data, pre_create_data): if key in pre_create_data: creator_attributes[key] = pre_create_data[key] - instance_data.pop("active", None) instance_data.update({"node_type": "Redshift_ROP"}) # Add chunk size attribute instance_data["chunkSize"] = 10 diff --git a/client/ayon_houdini/plugins/create/create_review.py b/client/ayon_houdini/plugins/create/create_review.py index b27264f400..71620caa65 100644 --- a/client/ayon_houdini/plugins/create/create_review.py +++ b/client/ayon_houdini/plugins/create/create_review.py @@ -27,7 +27,6 @@ def apply_settings(self, project_settings): def create(self, product_name, instance_data, pre_create_data): - instance_data.pop("active", None) instance_data.update({"node_type": "opengl"}) instance_data["imageFormat"] = pre_create_data.get("imageFormat") instance_data["keepImages"] = pre_create_data.get("keepImages") diff --git a/client/ayon_houdini/plugins/create/create_usd.py b/client/ayon_houdini/plugins/create/create_usd.py index b6c0aa8895..585ba667de 100644 --- a/client/ayon_houdini/plugins/create/create_usd.py +++ b/client/ayon_houdini/plugins/create/create_usd.py @@ -16,7 +16,6 @@ class CreateUSD(plugin.HoudiniCreator): def create(self, product_name, instance_data, pre_create_data): - instance_data.pop("active", None) instance_data.update({"node_type": "usd"}) instance = super(CreateUSD, self).create( diff --git a/client/ayon_houdini/plugins/create/create_usd_look.py b/client/ayon_houdini/plugins/create/create_usd_look.py index 58a7aa77be..93aa486abb 100644 --- a/client/ayon_houdini/plugins/create/create_usd_look.py +++ b/client/ayon_houdini/plugins/create/create_usd_look.py @@ -19,7 +19,6 @@ class CreateUSDLook(plugin.HoudiniCreator): def create(self, product_name, instance_data, pre_create_data): - instance_data.pop("active", None) instance_data.update({"node_type": "usd"}) instance = super(CreateUSDLook, self).create( diff --git a/client/ayon_houdini/plugins/create/create_usdrender.py b/client/ayon_houdini/plugins/create/create_usdrender.py index 9c7bc0fd3e..262971e529 100644 --- a/client/ayon_houdini/plugins/create/create_usdrender.py +++ b/client/ayon_houdini/plugins/create/create_usdrender.py @@ -46,8 +46,6 @@ def create(self, product_name, instance_data, pre_create_data): # TODO: Support creation in /stage if wanted by user # pre_create_data["parent"] = "/stage" - # Remove the active, we are checking the bypass flag of the nodes - instance_data.pop("active", None) instance_data.update({"node_type": "usdrender"}) # Override default value for the Export Chunk Size because if the diff --git a/client/ayon_houdini/plugins/create/create_vbd_cache.py b/client/ayon_houdini/plugins/create/create_vbd_cache.py index e8c0920ec8..804865860e 100644 --- a/client/ayon_houdini/plugins/create/create_vbd_cache.py +++ b/client/ayon_houdini/plugins/create/create_vbd_cache.py @@ -17,7 +17,6 @@ class CreateVDBCache(plugin.HoudiniCreator): def create(self, product_name, instance_data, pre_create_data): import hou - instance_data.pop("active", None) instance_data.update({"node_type": "geometry"}) creator_attributes = instance_data.setdefault( "creator_attributes", dict()) diff --git a/client/ayon_houdini/plugins/create/create_vray_rop.py b/client/ayon_houdini/plugins/create/create_vray_rop.py index d15ee23825..67b439f5e5 100644 --- a/client/ayon_houdini/plugins/create/create_vray_rop.py +++ b/client/ayon_houdini/plugins/create/create_vray_rop.py @@ -27,7 +27,6 @@ def create(self, product_name, instance_data, pre_create_data): if key in pre_create_data: creator_attributes[key] = pre_create_data[key] - instance_data.pop("active", None) instance_data.update({"node_type": "vray_renderer"}) # Add chunk size attribute instance_data["chunkSize"] = 10 diff --git a/client/ayon_houdini/plugins/publish/collect_active_state.py b/client/ayon_houdini/plugins/publish/collect_active_state.py deleted file mode 100644 index e09a347e9f..0000000000 --- a/client/ayon_houdini/plugins/publish/collect_active_state.py +++ /dev/null @@ -1,42 +0,0 @@ -import hou - -import pyblish.api -from ayon_houdini.api import plugin - - -class CollectInstanceActiveState(plugin.HoudiniInstancePlugin): - """Collect default active state for instance from its node bypass state. - - This is done at the very end of the CollectorOrder so that any required - collecting of data iterating over instances (with InstancePlugin) will - actually collect the data for when the user enables the state in the UI. - Otherwise potentially required data might have skipped collecting. - - """ - - order = pyblish.api.CollectorOrder + 0.299 - families = ["*"] - label = "Instance Active State" - - def process(self, instance): - - # Must have node to check for bypass state - if len(instance) == 0: - return - - # Check bypass state and reverse - active = True - node = hou.node(instance.data.get("instance_node")) - if hasattr(node, "isBypassed"): - active = not node.isBypassed() - - # Set instance active state - instance.data.update( - { - "active": active, - # temporarily translation of `active` to `publish` till - # issue has been resolved: - # https://github.com/pyblish/pyblish-base/issues/307 - "publish": active, - } - ) diff --git a/create_package.py b/create_package.py index 7f9a1909f9..fad0c44e1d 100644 --- a/create_package.py +++ b/create_package.py @@ -132,10 +132,7 @@ def safe_copy_file(src_path: str, dst_path: str): return dst_dir: str = os.path.dirname(dst_path) - try: - os.makedirs(dst_dir) - except Exception: - pass + os.makedirs(dst_dir, exist_ok=True) shutil.copy2(src_path, dst_path) @@ -355,6 +352,8 @@ def copy_addon_package( # Copy server content for src_file, dst_subpath in files_mapping: dst_path: str = os.path.join(addon_output_dir, dst_subpath) + dst_dir: str = os.path.dirname(dst_path) + os.makedirs(dst_dir, exist_ok=True) if isinstance(src_file, io.BytesIO): with open(dst_path, "wb") as stream: stream.write(src_file.getvalue())