Skip to content

Commit

Permalink
Merge pull request #54 from BigRoy/enhancement/ayon_load_asset_lop_fo…
Browse files Browse the repository at this point in the history
…lder_name

Load Asset LOP: Easy access to set primitive path to the folder name
  • Loading branch information
BigRoy authored Jul 30, 2024
2 parents f44a054 + b78ebb8 commit c6004f0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: Tue Jul 30 12:57:14 2024

Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
parmtag { "script_callback" "hou.phm().on_representation_parms_changed(kwargs['node'])" }
parmtag { "script_callback_language" "python" }
}
parm {
name "folder_name"
label "Folder Name"
type label
default { "`strsplit(chs(\"folder_path\"), \"/\", -1)`" }
}
parm {
name "product_name"
label "Product"
Expand Down Expand Up @@ -129,6 +135,7 @@
name "primpath1"
label "Primitive Root"
type string
joinnext
default { "`chs(\"folder_path\")`/$OS" }
menureplace {
[ "opmenu -l -a reference_character primpath1" ]
Expand All @@ -139,6 +146,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"
Expand Down

0 comments on commit c6004f0

Please sign in to comment.