From 97b192b02bd6639d9740da8a17540af804d76f1a Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Mon, 11 Dec 2023 12:50:09 +0200 Subject: [PATCH 1/4] remove redundant code --- .../houdini/plugins/publish/collect_chunk_size.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/openpype/hosts/houdini/plugins/publish/collect_chunk_size.py b/openpype/hosts/houdini/plugins/publish/collect_chunk_size.py index 1c867e930ad..f8cd4089e27 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_chunk_size.py +++ b/openpype/hosts/houdini/plugins/publish/collect_chunk_size.py @@ -14,18 +14,13 @@ class CollectChunkSize(pyblish.api.InstancePlugin, hosts = ["houdini"] targets = ["local", "remote"] label = "Collect Chunk Size" - chunkSize = 999999 + chunk_size = 999999 def process(self, instance): # need to get the chunk size info from the setting attr_values = self.get_attr_values_from_data(instance.data) instance.data["chunkSize"] = attr_values.get("chunkSize") - @classmethod - def apply_settings(cls, project_settings): - project_setting = project_settings["houdini"]["publish"]["CollectChunkSize"] # noqa - cls.chunkSize = project_setting["chunk_size"] - @classmethod def get_attribute_defs(cls): return [ @@ -33,7 +28,6 @@ def get_attribute_defs(cls): minimum=1, maximum=999999, decimals=0, - default=cls.chunkSize, + default=cls.chunk_size, label="Frame Per Task") - ] From 3de0c8ed66c521119d8847df19735fec86bcb143 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Mon, 11 Dec 2023 12:50:47 +0200 Subject: [PATCH 2/4] add missing settings --- .../defaults/project_settings/houdini.json | 12 +++-- .../schemas/schema_houdini_create.json | 4 ++ .../schemas/schema_houdini_publish.json | 50 +++++++++---------- .../houdini/server/settings/create.py | 7 +++ .../houdini/server/settings/publish.py | 17 +++++++ 5 files changed, 62 insertions(+), 28 deletions(-) diff --git a/openpype/settings/defaults/project_settings/houdini.json b/openpype/settings/defaults/project_settings/houdini.json index 0001b23967a..813e7153eac 100644 --- a/openpype/settings/defaults/project_settings/houdini.json +++ b/openpype/settings/defaults/project_settings/houdini.json @@ -62,6 +62,12 @@ "Main" ] }, + "CreateMantraIFD": { + "enabled": true, + "default_variants": [ + "Main" + ] + }, "CreateMantraROP": { "enabled": true, "default_variants": [ @@ -137,14 +143,14 @@ } }, "publish": { + "CollectAssetHandles": { + "use_asset_handles": true + }, "CollectChunkSize": { "enabled": true, "optional": true, "chunk_size": 999999 }, - "CollectAssetHandles": { - "use_asset_handles": true - }, "ValidateContainers": { "enabled": true, "optional": true, diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_houdini_create.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_houdini_create.json index f37738c4ec5..213ec9d04e1 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_houdini_create.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_houdini_create.json @@ -69,6 +69,10 @@ "key": "CreateKarmaROP", "label": "Create Karma ROP" }, + { + "key": "CreateMantraIFD", + "label": "Create Mantra IFD" + }, { "key": "CreateMantraROP", "label": "Create Mantra ROP" diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_houdini_publish.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_houdini_publish.json index 935c2a4c356..aaaf4311b76 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_houdini_publish.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_houdini_publish.json @@ -25,6 +25,31 @@ } ] }, + { + "type": "dict", + "collapsible": true, + "checkbox_key": "enabled", + "key": "CollectChunkSize", + "label": "Collect Chunk Size", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "optional", + "label": "Optional" + }, + { + "type": "number", + "key": "chunk_size", + "label": "Frames Per Task" + } + ] + }, { "type": "label", "label": "Validators" @@ -55,31 +80,6 @@ } ] }, - { - "type": "dict", - "collapsible": true, - "checkbox_key": "enabled", - "key": "CollectChunkSize", - "label": "Collect Chunk Size", - "is_group": true, - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - }, - { - "type": "boolean", - "key": "optional", - "label": "Optional" - }, - { - "type": "number", - "key": "chunk_size", - "label": "Frames Per Task" - } - ] - }, { "type": "dict", "collapsible": true, diff --git a/server_addon/houdini/server/settings/create.py b/server_addon/houdini/server/settings/create.py index e8db917849c..a5ca4d477b4 100644 --- a/server_addon/houdini/server/settings/create.py +++ b/server_addon/houdini/server/settings/create.py @@ -52,6 +52,9 @@ class CreatePluginsModel(BaseSettingsModel): CreateKarmaROP: CreatorModel = Field( default_factory=CreatorModel, title="Create Karma ROP") + CreateMantraIFD: CreatorModel = Field( + default_factory=CreatorModel, + title="Create Mantra IFD") CreateMantraROP: CreatorModel = Field( default_factory=CreatorModel, title="Create Mantra ROP") @@ -114,6 +117,10 @@ class CreatePluginsModel(BaseSettingsModel): "enabled": True, "default_variants": ["Main"] }, + "CreateMantraIFD": { + "enabled": True, + "default_variants": ["Main"] + }, "CreateMantraROP": { "enabled": True, "default_variants": ["Main"] diff --git a/server_addon/houdini/server/settings/publish.py b/server_addon/houdini/server/settings/publish.py index 92a676b0d08..692c7b2fa0d 100644 --- a/server_addon/houdini/server/settings/publish.py +++ b/server_addon/houdini/server/settings/publish.py @@ -13,6 +13,14 @@ class CollectAssetHandlesModel(BaseSettingsModel): title="Use asset handles") +class CollectChunkSizeModel(BaseSettingsModel): + """Collect Chunk Size.""" + enabled: bool = Field(title="Enabled") + optional: bool = Field(title="Optional") + chunk_size: int = Field( + title="Frames Per Task") + + class ValidateWorkfilePathsModel(BaseSettingsModel): enabled: bool = Field(title="Enabled") optional: bool = Field(title="Optional") @@ -38,6 +46,10 @@ class PublishPluginsModel(BaseSettingsModel): title="Collect Asset Handles.", section="Collectors" ) + CollectChunkSize: CollectChunkSizeModel = Field( + default_factory=CollectChunkSizeModel, + title="Collect Chunk Size." + ) ValidateContainers: BasicValidateModel = Field( default_factory=BasicValidateModel, title="Validate Latest Containers.", @@ -63,6 +75,11 @@ class PublishPluginsModel(BaseSettingsModel): "CollectAssetHandles": { "use_asset_handles": True }, + "CollectChunkSize" : { + "enabled": True, + "optional": True, + "chunk_size": 999999 + }, "ValidateContainers": { "enabled": True, "optional": True, From b6291e2b6721d7bfdc63d9eccff6e84c54fa714f Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Mon, 11 Dec 2023 12:51:08 +0200 Subject: [PATCH 3/4] bump houdini addon patch version --- server_addon/houdini/server/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_addon/houdini/server/version.py b/server_addon/houdini/server/version.py index 75cf7831c49..6232f7ab18d 100644 --- a/server_addon/houdini/server/version.py +++ b/server_addon/houdini/server/version.py @@ -1 +1 @@ -__version__ = "0.2.9" +__version__ = "0.2.10" From 69ed6f5d20a685f8cf94f58e9a6c926b23d13262 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Mon, 11 Dec 2023 13:00:32 +0200 Subject: [PATCH 4/4] resolve hound - Remove redundant white space --- server_addon/houdini/server/settings/publish.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_addon/houdini/server/settings/publish.py b/server_addon/houdini/server/settings/publish.py index 692c7b2fa0d..f551b3a2097 100644 --- a/server_addon/houdini/server/settings/publish.py +++ b/server_addon/houdini/server/settings/publish.py @@ -75,7 +75,7 @@ class PublishPluginsModel(BaseSettingsModel): "CollectAssetHandles": { "use_asset_handles": True }, - "CollectChunkSize" : { + "CollectChunkSize": { "enabled": True, "optional": True, "chunk_size": 999999