<?xml version="1.0" encoding="UTF-8"?>
<mainMenu>
    <menuBar>
        <subMenu id="avalon_menu">
            <label>Avalon</label>
            <subMenu id="avalon_context">
                <labelExpression><![CDATA[
from avalon import api
return "%s - %s" % (api.Session["AVALON_ASSET"], api.Session["AVALON_TASK"])
]]></labelExpression>
                <scriptItem id="avalon_context_switch">
                    <label>Set Context</label>
                    <scriptCode><![CDATA[
from avalon.tools import contextmanager; contextmanager.show()
]]></scriptCode>
                </scriptItem>
            </subMenu>

            <separatorItem/>

            <scriptItem id="avalon_create">
                <label>Create ...</label>
                <scriptCode><![CDATA[
from avalon.tools import creator
creator.show()
]]></scriptCode>
            </scriptItem>

            <scriptItem id="avalon_load">
                <label>Load ...</label>
                <scriptCode><![CDATA[
from avalon.tools import cbloader
cbloader.show(use_context=True)
]]></scriptCode>
            </scriptItem>

            <scriptItem id="avalon_manage">
                <label>Manage ...</label>
                <scriptCode><![CDATA[
from avalon.tools import cbsceneinventory
cbsceneinventory.show()
]]></scriptCode>
            </scriptItem>

            <scriptItem id="publish">
                <label>Publish ...</label>
                <scriptCode><![CDATA[
import hou
from avalon.tools import publish
parent = hou.qt.mainWindow()
publish.show(parent)
                ]]></scriptCode>
            </scriptItem>

            <separatorItem/>

            <scriptItem id="workfiles">
                <label>Work Files</label>
                <scriptCode><![CDATA[
import hou, os
from avalon.tools import workfiles
workfiles.show(os.environ["AVALON_WORKDIR"])
                ]]></scriptCode>
            </scriptItem>

            <separatorItem/>

            <subMenu id="avalon_reload_pipeline">
                <label>System</label>
                <scriptItem>
                    <label>Reload Pipeline (unstable)</label>
                    <scriptCode><![CDATA[
from avalon.houdini import pipeline
pipeline.reload_pipeline()]]></scriptCode>
                </scriptItem>
            </subMenu>
        </subMenu>
    </menuBar>
</mainMenu>
