From dd92fe1e4ee9a195b85d7aa6b4234fba2829dec4 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 1 Feb 2022 21:38:33 +0100 Subject: [PATCH] Use .ass extension as default (and add settings to choose for .ass.gz) --- .../plugins/create/create_arnold_ass.py | 6 +++- .../defaults/project_settings/houdini.json | 5 +++ .../schemas/schema_houdini_create.json | 35 +++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/houdini/plugins/create/create_arnold_ass.py b/openpype/hosts/houdini/plugins/create/create_arnold_ass.py index a87136c442..2af9a71cdd 100644 --- a/openpype/hosts/houdini/plugins/create/create_arnold_ass.py +++ b/openpype/hosts/houdini/plugins/create/create_arnold_ass.py @@ -9,6 +9,9 @@ class CreateArnoldAss(houdini.Creator): icon = "magic" defaults = ["Main"] + # Default extension: `.ass` or `.ass.gz` + ext = ".ass" + def __init__(self, *args, **kwargs): super(CreateArnoldAss, self).__init__(*args, **kwargs) @@ -29,12 +32,13 @@ class CreateArnoldAss(houdini.Creator): parm_template_group.hideFolder("Properties", True) node.setParmTemplateGroup(parm_template_group) + filepath = '$HIP/pyblish/`chs("subset")`.$F4{}'.format(self.ext) parms = { # Render frame range "trange": 1, # Arnold ROP settings - "ar_ass_file": '$HIP/pyblish/`chs("subset")`.$F4.ass.gz', + "ar_ass_file": filepath, "ar_ass_export_enable": 1 } node.setParms(parms) diff --git a/openpype/settings/defaults/project_settings/houdini.json b/openpype/settings/defaults/project_settings/houdini.json index 809c732d6f..911bf82d9b 100644 --- a/openpype/settings/defaults/project_settings/houdini.json +++ b/openpype/settings/defaults/project_settings/houdini.json @@ -1,5 +1,10 @@ { "create": { + "CreateArnoldAss": { + "enabled": true, + "defaults": [], + "ext": ".ass" + }, "CreateAlembicCamera": { "enabled": true, "defaults": [] 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 72b8032d4b..83e0cf789a 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 @@ -4,6 +4,41 @@ "key": "create", "label": "Creator plugins", "children": [ + { + "type": "dict", + "collapsible": true, + "key": "CreateArnoldAss", + "label": "Create Arnold Ass", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "list", + "key": "defaults", + "label": "Default Subsets", + "object_type": "text" + }, + { + "type": "enum", + "key": "ext", + "label": "Default Output Format (extension)", + "multiselection": false, + "enum_items": [ + { + ".ass": ".ass" + }, + { + ".ass.gz": ".ass.gz (gzipped)" + } + ] + } + ] + + }, { "type": "schema_template", "name": "template_create_plugin",