From e5c3238beadb7d99dedb8f184a18c71a7e2ce4a8 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 29 Jul 2024 15:07:25 +0200 Subject: [PATCH 1/4] Add hidden `folder_name` parm so users can easily reference it without having to split the folder path parm, etc. --- .../ayon_8_8Lop_1lop__import_8_81.0/DialogScript | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript b/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript index dee8fa4c8f..e1644df11b 100644 --- a/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript +++ b/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript @@ -47,6 +47,14 @@ parmtag { "script_callback" "hou.phm().on_representation_parms_changed(kwargs['node'])" } parmtag { "script_callback_language" "python" } } + parm { + name "folder_name" + label "Folder Name" + type string + invisible + default { "`strsplit(chs(\"folder_path\"), \"/\", -1)`" } + parmtag { "script_callback_language" "python" } + } parm { name "product_type" label "Product Type" From 4a2ed657ae5488fe427e1c2fa2b1ce8282c5e947 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 29 Jul 2024 16:35:47 +0200 Subject: [PATCH 2/4] Provide a little Prim Path preset button to give easy access for artists to use "asset build" prim path or scene assembly prim path --- .../ayon_8_8Lop_1lop__import_8_81.0/DialogScript | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript b/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript index e1644df11b..bea53c5a45 100644 --- a/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript +++ b/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript @@ -51,7 +51,6 @@ name "folder_name" label "Folder Name" type string - invisible default { "`strsplit(chs(\"folder_path\"), \"/\", -1)`" } parmtag { "script_callback_language" "python" } } @@ -160,6 +159,7 @@ name "primpath1" label "Primitive Root" type string + joinnext default { "`chs(\"folder_path\")`/$OS" } menureplace { [ "opmenu -l -a reference_character primpath1" ] @@ -170,6 +170,19 @@ parmtag { "script_action_icon" "BUTTONS_reselect" } parmtag { "sidefx::usdpathtype" "prim" } } + parm { + name "primpath_presets" + label "Presets" + type button + nolabel + default { "0" } + menu { + "`chs(\"folder_name\")`" "Folder Name\n (Use for \"Asset Build\" workflow)" + "`chs(\"folder_path\")`/$OS" "Folder Path with Node Name\n (Use for \"Shot\" or \"Scene Assembly\" workflow)" + } + parmtag { "script_callback" "parm = kwargs[\"node\"].parm(\"primpath1\"); parm.revertToDefaults(); parm.set(kwargs[\"script_value0\"])" } + parmtag { "script_callback_language" "python" } + } groupcollapsible { name "extra_options" label "Load Options" From 0eb40773559ead78a07c31168a01827fafd1f448 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 29 Jul 2024 16:47:40 +0200 Subject: [PATCH 3/4] Make folder name parm hidden --- .../startup/otls/ayon_lop_import.hda/INDEX__SECTION | 9 +++++---- .../ayon_8_8Lop_1lop__import_8_81.0/DialogScript | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client/ayon_houdini/startup/otls/ayon_lop_import.hda/INDEX__SECTION b/client/ayon_houdini/startup/otls/ayon_lop_import.hda/INDEX__SECTION index 5b5d5a1340..6d9227f48e 100644 --- a/client/ayon_houdini/startup/otls/ayon_lop_import.hda/INDEX__SECTION +++ b/client/ayon_houdini/startup/otls/ayon_lop_import.hda/INDEX__SECTION @@ -3,11 +3,12 @@ Label: AYON Load Asset Path: oplib:/ayon::Lop/lop_import::1.0?ayon::Lop/lop_import::1.0 Icon: opdef:/ayon::Lop/lop_import::1.0?IconImage Table: Lop -License: -Extra: -User: +License: +Extra: +User: Inputs: 0 to 1 Subnet: true Python: false Empty: false -Modified: Thu Jun 10 16:44:00 2024 +Modified: Mon Jul 29 16:47:13 2024 + diff --git a/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript b/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript index bea53c5a45..bd95d7d945 100644 --- a/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript +++ b/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript @@ -51,6 +51,7 @@ name "folder_name" label "Folder Name" type string + invisible default { "`strsplit(chs(\"folder_path\"), \"/\", -1)`" } parmtag { "script_callback_language" "python" } } From 0c0e4334832aa3f2c5600ac2c5510ba0bc0e590c Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 30 Jul 2024 12:57:54 +0200 Subject: [PATCH 4/4] Make `folder_name` a visible label instead --- .../startup/otls/ayon_lop_import.hda/INDEX__SECTION | 2 +- .../ayon_8_8Lop_1lop__import_8_81.0/DialogScript | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/client/ayon_houdini/startup/otls/ayon_lop_import.hda/INDEX__SECTION b/client/ayon_houdini/startup/otls/ayon_lop_import.hda/INDEX__SECTION index 6d9227f48e..f101cdfeb0 100644 --- a/client/ayon_houdini/startup/otls/ayon_lop_import.hda/INDEX__SECTION +++ b/client/ayon_houdini/startup/otls/ayon_lop_import.hda/INDEX__SECTION @@ -10,5 +10,5 @@ Inputs: 0 to 1 Subnet: true Python: false Empty: false -Modified: Mon Jul 29 16:47:13 2024 +Modified: Tue Jul 30 12:57:14 2024 diff --git a/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript b/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript index 1ce28f8228..c73479e728 100644 --- a/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript +++ b/client/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript @@ -50,10 +50,8 @@ parm { name "folder_name" label "Folder Name" - type string - invisible + type label default { "`strsplit(chs(\"folder_path\"), \"/\", -1)`" } - parmtag { "script_callback_language" "python" } } parm { name "product_name"