November 10, 2010

Modo Gears - Pie Menus and Macros

Read this first

Creating pie menus is extremely simple, but not so simple to whom is not familiar with the Form Editor window, so assimilating scripts into a single shortcuts may becomes tedious.

This is a fast practice guide to pie menus and nested pie menus creation.

To create a pie menu, just select System > Form Editor to recall the floating palette.

In the left upper side, just click on create > new pie template and fill it with the beloved name.

The editor is now showing us our new pie menu with its empty eight command spaces. Don't touch anything for this tutorial or I'll cut your hands out.

Clicking on any empty command, the system let you browse into the single properties.

Yes, a lot of strange fields, but don't worry: there are only two of them really important: Label [the name showed] and Command. Leave everything apart and just write the name and a command.

A single command as tool.set "prim.cube" "on" [this will activete "create cube" on viewport] doesn't need any consideration, just put it in the field. But for an external script we have to put the script file into the default script folder [for mac user, this is the path: username>Library>Application Support>Luxology>Scripts - if you are a Windows user I'm extremely upset for you and the path must be similar]. Now copy and paste in the command line the entire script file name and put behind it the @ character [ex: @EdgeWelder.LXM]. This will tell Modo where it will find the script.

With the first created command, you are able to test your new pie menu with the right-upper button called Preview Form.

Every single command file takes its position into the pie menu by hierarchy. If you drag and drop a command to another position in the hierarchy, it will appear in another position into the pie menu.

Now you can see eight command field under every single pie menu, no more and no less. If you create ten command lines, the last two won't be showed. But, hey, it doesn't mean we find a limit of eight command to a single key, on the contrary it probably doesn't have a limit.

If we want to increase the pie menu capacity, let's take in consideration a nested pie menu!

Ok my friends, let's create another pie menu and drag it into our previous pie menu. That's it! We got now fifteen command field, and every single command field must be a nested pie menu and so on!

Now a second pie menu can be opened directly under the first one

The last action we have to do, is to assign a key to our main pie menu. On behalf of myself, i prefer to map only the left part of the keyboard just to take every command under my left fingers, near the four jolly keys [command, alt, ctrl and shift].
To assign a key, just right click on the pie menu name and choose Assign to Key.

Let's now digit our prefered key [or key combination]. If the keys are already assigned, Modo will tell us if we want to overwrite the previous assignment. I overwrited many default assignment, if you are interested in...

The way I like to assign many command to a single key is to write [or record] a script in an external file and then recall it with the showed command. Nevertheless there is one last way to save a macro: store it in confing file.

I don't like this way because it is not as flexible as an external file [you can change, update and rapidly share an external file], but… hey! Who am I to prevent you to do your own choise? De gustibus non disputandum est…

So, these are the steps to store a macro in config file:

- Record your runtime actions by clicking on System > Record Macro;

- When you have done, click on Record Macro again to stop it;

- Now save in config your new macro clicking on System > Store in config;
- A pop up window will ask your attention. Fill every single field with a name and an accurate description.

Now you [and just YOU - I don't want to be part on this!] have stored your first macro. But... hey! You are missing the command line to recall it in your pie menu!

Yes, the system doesn't actually think you need the command line to recall it [well, it looks like a sort of anarchy, I think…]. To find the command line, you have to do more steps.

Go in the Layout menu voice, choose Palettes and then ckick on Command History. When the pop-up palette will appear, choose Scripts.
You will see a Macros group. Expand it and find your stored macro.

The name and description will help you a lot, so it won't be hard to find it. Select it and, as you can see, there are no command line to copy. To get the code, you must do one more step: right click on it and choose Assign to Key.

That's it! Ready to be copied to your pie menu!

1 comment:

Anonymous said...

i wish you could do a video tutorial on this subject ,its much easier to understand and follow . i love to have these pie menus ,but with written tutorial is kind of hard to get it done. thanks anyway. you are doing a great job.

Related Posts Plugin for WordPress, Blogger...