Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6039 from ynput/bugfix/add_missing_houdini_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mkolar authored Dec 12, 2023
2 parents 72c666b + 39a00e1 commit dc84899
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 37 deletions.
10 changes: 2 additions & 8 deletions openpype/hosts/houdini/plugins/publish/collect_chunk_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,20 @@ 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 [
NumberDef("chunkSize",
minimum=1,
maximum=999999,
decimals=0,
default=cls.chunkSize,
default=cls.chunk_size,
label="Frame Per Task")

]
12 changes: 9 additions & 3 deletions openpype/settings/defaults/project_settings/houdini.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
"Main"
]
},
"CreateMantraIFD": {
"enabled": true,
"default_variants": [
"Main"
]
},
"CreateMantraROP": {
"enabled": true,
"default_variants": [
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
"key": "CreateKarmaROP",
"label": "Create Karma ROP"
},
{
"key": "CreateMantraIFD",
"label": "Create Mantra IFD"
},
{
"key": "CreateMantraROP",
"label": "Create Mantra ROP"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand Down
7 changes: 7 additions & 0 deletions server_addon/houdini/server/settings/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -114,6 +117,10 @@ class CreatePluginsModel(BaseSettingsModel):
"enabled": True,
"default_variants": ["Main"]
},
"CreateMantraIFD": {
"enabled": True,
"default_variants": ["Main"]
},
"CreateMantraROP": {
"enabled": True,
"default_variants": ["Main"]
Expand Down
17 changes: 17 additions & 0 deletions server_addon/houdini/server/settings/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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.",
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion server_addon/houdini/server/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.9"
__version__ = "0.2.10"

0 comments on commit dc84899

Please sign in to comment.