# Dialog script for ayon::load_shot::1.0 automatically generated

{
    name	ayon::load_shot::1.0
    script	load_asset::1.0
    label	"AYON Load Shot"

    help {
	""
    }

    inputlabel	1	"Input Stage"
    inputlabel	2	"Input 2"
    inputlabel	3	"Input 3"
    inputlabel	4	"Input 4"

    groupsimple {
        name    "info2"
        label   "Info"
        parmtag { "script_callback" "hou.phm().refresh_available_versions(kwargs['node'])" }
        parmtag { "script_callback_language" "python" }

        parm {
            name    "assetinfo_labelparm"
            label   "Heading"
            type    label
            default { "Choose Product" }
            parmtag { "sidefx::look" "heading" }
        }
        parm {
            name    "project_name"
            label   "Project"
            type    string
            default { "$AYON_PROJECT_NAME" }
            parmtag { "script_action" "from ayon_houdini.api.hda_utils import select_folder_path;select_folder_path(kwargs['node'])" }
            parmtag { "script_action_icon" "BUTTONS_reselect" }
            parmtag { "script_callback" "hou.phm().on_representation_parms_changed(kwargs['node'])" }
            parmtag { "script_callback_language" "python" }
        }
        parm {
            name    "folder_path"
            label   "Folder Path"
            type    string
            default { "$AYON_FOLDER_PATH" }
            parmtag { "script_action" "from ayon_houdini.api.hda_utils import select_folder_path;select_folder_path(kwargs['node'])" }
            parmtag { "script_action_icon" "BUTTONS_reselect" }
            parmtag { "script_callback" "hou.phm().on_representation_parms_changed(kwargs['node'])" }
            parmtag { "script_callback_language" "python" }
        }
        parm {
            name    "product_name"
            label   "Product"
            type    string
            default { "usdShot" }
            parmtag { "script_action" "from ayon_houdini.api.hda_utils import select_product_name;select_product_name(kwargs['node'])" }
            parmtag { "script_action_icon" "BUTTONS_reselect" }
            parmtag { "script_callback" "hou.phm().set_to_latest_version(kwargs['node'])\nhou.phm().on_representation_parms_changed(kwargs['node'])" }
            parmtag { "script_callback_language" "python" }
        }
        parm {
            name    "version"
            label   "Version"
            type    string
            default { "" }
            disablewhen "{ representation_old == \"\" }"
            menureplace {
                [ "versions = hou.phm().get_available_versions(kwargs['node'])" ]
                [ "" ]
                [ "result = []" ]
                [ "for version in versions:" ]
                [ "    result.append(str(version))" ]
                [ "    result.append(f\"v{version:03d}\")" ]
                [ "    " ]
                [ "return result" ]
                language python
            }
            parmtag { "script_callback" "hou.phm().on_representation_parms_changed(kwargs['node'])" }
            parmtag { "script_callback_language" "python" }
        }
        parm {
            name    "representation_name"
            label   "Representation"
            type    string
            default { "usd" }
            parmtag { "script_callback" "hou.phm().on_representation_parms_changed(kwargs['node'])" }
            parmtag { "script_callback_language" "python" }
        }
        parm {
            name    "load_refresh"
            label   "Refresh"
            type    button
            joinnext
            default { "0" }
            help    "Click to refresh and retry applying the product load parameters to load the correct file"
            parmtag { "button_icon" "" }
            parmtag { "script_callback" "hou.phm().on_representation_parms_changed(kwargs['node'])" }
            parmtag { "script_callback_language" "python" }
        }
        parm {
            name    "load_message"
            label   "Message"
            type    label
            default { "" }
            hidewhen "{ load_message == \"\" }"
            parmtag { "sidefx::look" "block" }
        }
        parm {
            name    "sepparm"
            label   "Separator"
            type    separator
            default { "" }
        }
        parm {
            name    "reload"
            label   "Reload Files"
            type    button
            default { "0" }
            parmtag { "autoscope" "0000000000000000" }
            parmtag { "script_callback_language" "python" }
        }
        parm {
            name    "file"
            label   "File"
            type    string
            default { "" }
            parmtag { "script_callback_language" "python" }
        }
        groupcollapsible {
            name    "extra_options"
            label   "Load Options"

            parm {
                name    "mute1"
                label   "Mute Layer"
                type    toggle
                default { "off" }
                parmtag { "autoscope" "0000000000000000" }
                parmtag { "script_callback_language" "python" }
            }
            parm {
                name    "timeoffset1"
                label   "Time Offset (in Frames)"
                type    float
                default { "0" }
                range   { -100 100 }
                parmtag { "autoscope" "0000000000000000" }
                parmtag { "script_callback_language" "python" }
            }
            parm {
                name    "timescale1"
                label   "Time Scale"
                type    float
                default { "1" }
                range   { 0 5 }
                parmtag { "autoscope" "0000000000000000" }
                parmtag { "script_callback_language" "python" }
            }
        }

    }

    groupcollapsible {
        name    "info_display2"
        label   "Info Display"

        parm {
            name    "show_thumbnail"
            label   "Show Entity Thumbnail"
            type    toggle
            joinnext
            default { "0" }
            parmtag { "script_callback" "hou.phm().on_thumbnail_show_changed(kwargs['node'])" }
            parmtag { "script_callback_language" "python" }
        }
        parm {
            name    "thumbnail_size"
            label   "Size"
            type    float
            joinnext
            default { "2" }
            hidewhen "{ show_thumbnail == 0 }"
            range   { 0 10 }
            parmtag { "script_callback" "hou.phm().on_thumbnail_size_changed(kwargs['node'])" }
            parmtag { "script_callback_language" "python" }
        }
        parm {
            name    "thumbnail_cache_dir"
            label   "Thumbnail Cache Dir"
            type    directory
            invisible
            default { "$JOB/.houdini_loader_thumbnails" }
            parmtag { "script_callback_language" "python" }
        }
        parm {
            name    "thumbnail_padding"
            label   "Padding"
            type    float
            invisible
            default { "1" }
            range   { 0 10 }
            parmtag { "script_callback_language" "python" }
        }
        parm {
            name    "thumbnail_offset"
            label   "Offset"
            type    vector2
            size    2
            default { "0" "0.35" }
            hidewhen "{ show_thumbnail == 0 }"
            range   { -1 1 }
            parmtag { "script_callback" "hou.phm().on_thumbnail_size_changed(kwargs['node'])" }
            parmtag { "script_callback_language" "python" }
        }
        parm {
            name    "show_pipeline_parms"
            label   "Show Pipeline Parms"
            type    toggle
            default { "0" }
            parmtag { "script_callback" "hou.phm().on_thumbnail_show_changed(kwargs['node'])" }
            parmtag { "script_callback_language" "python" }
        }
    }

    group {
        name    "ayon_folder0"
        label   "Ayon"
        hidewhen "{ show_pipeline_parms == 0 }"

        parm {
            name    "name"
            label   "Name"
            type    label
            default { "$OS" }
        }
        parm {
            name    "namespace"
            label   "Namespace"
            type    label
            default { "`opfullpath(\".\")`" }
        }
        parm {
            name    "loader"
            label   "Loader"
            type    label
            default { "LOPLoadShotLoader" }
        }
        parm {
            name    "id"
            label   "ID"
            type    label
            default { "pyblish.avalon.container" }
        }
        parm {
            name    "representation"
            label   "Representation ID"
            type    string
            default { "" }
            parmtag { "script_callback" "hou.phm().on_representation_id_changed(kwargs['node'])" }
            parmtag { "script_callback_language" "python" }
        }
        parm {
            name    "version_name"
            label   "Current Version Label"
            type    label
            invisible
            default { "" }
        }
        parm {
            name    "subset_name"
            label   "Subset (backwards compatibility)"
            type    label
            invisible
            default { "`chs(\"product_name\")`" }
        }
    }

}
