PEN
02-11-2008, 03:47 PM
So just wondering if I'm missing anything here and need some input. I have a system already that updates my menus with items so that I can go from one version of max to another and I don't have to worry about over writting the existing menus. Also for clients and productions I set up a system that auto loads menus and adds them to the main menu bar or other menus.
It really isn't all that robust as it is a single script that I need to edit. What I would like is a system that reads from a file the setup that is to be applied.
Here is the format that I'm thinking of using, it is an xml file that will describe what you want it to do.
Any suggestions on what else I might want to consider? Just so you know this is xml that would have to be created by hand and not really ment for a non-programmer or just any old person in a given production.
<menuMan>
<!-- Create a quad menu or add items and menues to an existing quad -->
<quadMenu name="theQuad">
<quad1 name="">
<!-- An action that will call one of several commands. -->
<action type="deleteAll" />
<action type="deleteItem" name="theItemToDelete" />
<!-- This really wouldn't be that good an idea as each time that it is run it will delete the first item. -->
<action type="deleteItem" index="1" />
<menuItem type="macro" name="testName" category="testCategory" position="-1"/>
<menu name="&Tools" position="-1"/>
</quad1>
<quad2 name="" />
<quad3 name="" />
<quad4 name="" />
</quadMenu>
<!-- Create a new menu with an item -->
<menu name="PEN Tools">
<menuItem type="macro" name="testName" category="testCategory" position="-1"/>
</menu>
<!-- Add a menu to the main menu bar -->
<menu name="Main Menu Bar">
<menu name="PEN Tools" position="-1"/>
</menu>
<!-- This will just create a menu system with nested menus and items or update an existing menu system. -->
<menu name="theMenu">
<menuItem type="macro" name="testName" category="testCategory" position="-1"/>
<menuItem type="seperator" position="-1"/>
<menu name="theSubMenu">
<menuItem type="macro" name="testName" category="testCategory" position="-1"/>
<menuItem type="seperator" position="-1"/>
<quadMenu name="theQuad" />
</menu>
</menu>
</menuMan>
It really isn't all that robust as it is a single script that I need to edit. What I would like is a system that reads from a file the setup that is to be applied.
Here is the format that I'm thinking of using, it is an xml file that will describe what you want it to do.
Any suggestions on what else I might want to consider? Just so you know this is xml that would have to be created by hand and not really ment for a non-programmer or just any old person in a given production.
<menuMan>
<!-- Create a quad menu or add items and menues to an existing quad -->
<quadMenu name="theQuad">
<quad1 name="">
<!-- An action that will call one of several commands. -->
<action type="deleteAll" />
<action type="deleteItem" name="theItemToDelete" />
<!-- This really wouldn't be that good an idea as each time that it is run it will delete the first item. -->
<action type="deleteItem" index="1" />
<menuItem type="macro" name="testName" category="testCategory" position="-1"/>
<menu name="&Tools" position="-1"/>
</quad1>
<quad2 name="" />
<quad3 name="" />
<quad4 name="" />
</quadMenu>
<!-- Create a new menu with an item -->
<menu name="PEN Tools">
<menuItem type="macro" name="testName" category="testCategory" position="-1"/>
</menu>
<!-- Add a menu to the main menu bar -->
<menu name="Main Menu Bar">
<menu name="PEN Tools" position="-1"/>
</menu>
<!-- This will just create a menu system with nested menus and items or update an existing menu system. -->
<menu name="theMenu">
<menuItem type="macro" name="testName" category="testCategory" position="-1"/>
<menuItem type="seperator" position="-1"/>
<menu name="theSubMenu">
<menuItem type="macro" name="testName" category="testCategory" position="-1"/>
<menuItem type="seperator" position="-1"/>
<quadMenu name="theQuad" />
</menu>
</menu>
</menuMan>
