Thursday, March 7, 2013

Moving UVs Tool

Just a simple example to show how to create your own marking menu.
1) In the main application window, open the marking menu editor by select window -- setting/preferences -- marking menu editor.
2) In the marking menus window, click the create marking menu button.
3) In the create marking menu window, the top displays a group of icons representing the different locations in the marking menu. RMB click the icon for the east item and select edit menu item from the context menu.
4) Enter the following lines in the commands input field:
    python("import maya.cmds as cmds");
    python("cmds.polyEditUV(u=1.0, v=0.0)");
5) In the label field, enter the word "Right" and press the save and close button.
6) In the marking menus window, edit the west menu item to have the following command input. Similar to the command created in step 5, this marking menu item will move the currently selected UVs one unit to the left.

    python("import maya.cmds as cmds");
    python("cmds.polyEditUV(u=-1.0, v=0.0)");
7) In the label field, enter the word "Left" and press the save and close button.
8) Keeping the create marking menu window open, create a cube and enter UV editing mode (RMB+east)
9) Open the UV texture editor window (window -- UV texture editor). 
10) Select all the cube's UVs.

11) In the create marking menu window, use the LMB in the test area (lower left) to try out the new marking menu on the cube's UVs.

12) Give this custom marking menu a name and save it.

No comments:

Post a Comment