The plug-in is designed to rename and customize Open Reality main menu. Supplement the menu item you can call Python scripts.

Description

To rename a Open Reality menu item, use the “Title” property in a configuration file. To do this you need to edit the file * MACHINE NAME *. menuman.txt, in my case it’s the bin / config / NEILL.menuman.txt. A have attached this file to this article as an example.

[MainMenu]

Title = & My menu; replace OpenReality with …

For compatibility with Moby 7.5 I had to use keyboard shotcuts to call Python scripts from the keyboard, so the setup process requires a series of actions.

1) First, define the list of scripts in the file ActionScript.txt, which is in the bin / config / scripts / directory.

[ScriptFiles]
Script1 = NewCamera.py
Script2 =
Script3 =
Script4 =
Script5 =
Script6 =
Script7 =
Script8 =
Script9 =
Script10 =
Script11 =
Script12 =
2) Next, define keyboard shotcuts above script in a file of using layout. For example, I use Maya keyboard layout and I’m editing Maya.txt in bin / config / keyboard

action.global.script1 = {SHFT:F1*DN}

action.global.script2 = {SHFT:F2*DN}

action.global.script3 = {SHFT:F3*DN}

action.global.script4 = {SHFT:F4*DN}

action.global.script5 = {SHFT:F5*DN}

action.global.script6 = {SHFT:F6*DN}

action.global.script7 = {SHFT:F7*DN}

action.global.script8 = {SHFT:F8*DN}

action.global.script9 = {SHFT:F9*DN}

action.global.script10 = {SHFT:F10*DN}

action.global.script11 = {SHFT:F11*DN}

action.global.script12 = {SHFT:F12*DN}

Keyboard is enough to determine once and for assigning scripts combination with F1 through F12.

3) Next step is to giving names for each script for a menu. To do this we need to edit the file * MACHINE NAME *. menuman.txt, in my case the bin / config / NEILL.menuman.txt

[Python]

Python Item Name 0 = New Camera

Python Item Name 1 =

Python Item Name 2 =

Python Item Name 3 =

Python Item Name 4 =

Python Item Name 5 =

Python Item Name 6 =

Python Item Name 7 =

Python Item Name 8 =

Python Item Name 9 =

Python Item Name 10 =

Python Item Name 11 =

In this file, you specify a name for the menu items, where each item will cause the corresponding keyboard shortcut from F1 to F12.

Now when you run MotionBuilder should appear in the menu.

Download

My config file – NEILL.menuman

MotionBuilder 7.5 ext.2 (32 bit) – menuman75

MotionBuilder 2009 (32 bit) – menuman2009

MoBu Menu manager
Tagged on:     

6 thoughts on “MoBu Menu manager

  • Wednesday March 2nd, 2011 at 03:17 PM
    Permalink

    Hi Neil,

    Thank you very much for this very good script.

    I have some trouble using it on Mobu 2009: Only the first item seems to work. In other words, clicking on other items than Python Item Name 0 never calls the related script.

    Do you also have the pb on your side or is it a local pb?

    Thanks a lot

  • Wednesday March 2nd, 2011 at 04:27 PM
    Permalink

    Hi Werwack,

    I’ll try to find this plugin on my machine and make a test with script calls. Are you a programmer ?

    > Do you also have the pb on your side or is it a local pb?
    Sorry, what do you mean by “pb” ?

  • Wednesday March 2nd, 2011 at 08:25 PM
    Permalink

    I program, but I am not familiar with MoBu API. Setup of the menuman files is not a problem though, if that’s your question. I am used to develop user scripts (mainly in maxscript).

    Playing with the text files, I noticed menu item indices ([Python] section) are starting at 0 and script files ([ScriptFiles]) at 1. Could it be part of the strange behavior?

    Pb means ‘problem’, shortcut I use quite often 😉

  • Wednesday March 2nd, 2011 at 09:26 PM
    Permalink

    I have tryed a plug, everything works properly. So I guess It’s your local pb (using your shortcut) :)

    I’ll try to explaine in more details

    1 – first of all, I have found my folder where MoBu stores config files. My path is – c:\Users\\AppData\Local\Autodesk\MB2009\config

    2 – I’m using “Maya” keyboard configuration, so I have opened Keyboard\Maya.txt and made changes to this file like in my post above

    3 – Then I have added some more scripts into the Scripts\ActionScript.txt
    For example – Script2 = Tree.py

    4 – Next step, I have added new line into the menuman configuration, for me it’s a NEILL-PC.menuman.txt file and a line
    Python Item Name 1 = Tree Example

    5 – Now everything is ready to start MoBu. It’s easy to check my adjustments, script is binded to shortkey shift+F2, so press this key to test.

    Hope that will help, please keep me updated on if it works.

  • Wednesday March 2nd, 2011 at 11:30 PM
    Permalink

    Yesss, it works :)

    Thanks a lot!

    In fact I had only the first keyboard shortcut set and I didn’t have a deeper lot at it because, as you mentionned at the top of the article, “For compatibility with Moby 7.5 I had to use keyboard shotcuts to call Python scripts from the keyboard, so the setup process requires a series of actions.”

    Well, it seems that I mis interpreted this and I thought keyboard shortcut were not mandatory.

    So everything is ok. Very nice plugin 😉

  • Wednesday March 2nd, 2011 at 11:34 PM
    Permalink

    You’re welcome!

Leave a Reply

Your email address will not be published. Required fields are marked *