Rotate Tool: Snap to Angles

Sometimes you need a specific angle like 90°. The most common technique is to open up the Channel Box and manually enter the value.

We will take a look at an alternative using the rotate tool (E). Simply press “J” while rotating to toggle “Discrete Rotation”. This feature will force the rotate tool to snap to specific angles.

You can adjust the default behavior in the Tool Settings  (Window > Setting and Preferences > Tool Settings) of the Rotate Tool.

2016-05-21 01_19_12-Autodesk Maya 2016 Extension 2_ untitled_.png

Quick Tip: Duplicate Object Along Curves

You cannot use the “Duplicate” or “Duplicate Special”-tool to duplicate along a curve. We are going to use an animation-tool to get a similar effect.

Step 1

First create your object and the curve.2016-05-06 20_15_26-Autodesk Maya 2016 Extension 2_ untitled_   ---   pCube1.png

Step 2

Before you duplicate your object, you need to decide how many objects you need. Then you can set the Animation Range from Frame 1 to Frame (2* the count of objects that you need.)

Step 3

Select your object and the curve. Now use Constrain > Motion Paths > Attach to Motion Path. When you play the animation you will see that your object moves along the curve.

Step 4

We need to change the keyframe tangents to linear to distribute the objects evenly over the entire curve.  To do this select your object again and open the Graph Editor (Windows > Animation > Graph Editor). Then select both keys and select “Linear Tangents”.

2016-05-06 20_29_23-Graph Editor.png

Step 5

To create all our objects, select the object and “Visualize > Animation Snapshot (options)” In the options you need to set End Frame to your Animation Range Last Frame and the Increment to 2.

Step 6

Delete the original object and curve.

2016-05-06 20_38_03-Autodesk Maya 2016 Extension 2_ untitled_   ---   bezier1....png

End Result

2016-05-06 20_38_42-Autodesk Maya 2016 Extension 2_ untitled_   ---   transform1_2...

While this technique is a little cumbersome, it is very flexible and extensible. For example you could add a scale animation prior to creating the snapshot, or add deformers to modify your object prior to duplicating it.

 

Use Atom as Python Editor for Maya

Atom is a neat text-editor created by Github. Atom can be extended with plugins and somebody already created a useful “atom-maya” plugin that enables you to send your current code to Maya.

Software Needed

Installation

Python

Simply download the installation files and follow the Installation instructions. During the installation of Python enable “Add Python.exe to Path”

Python

Atom

Simply download the installation files and follow the Installation instructions.

  1. Then open Atom
  2. Open the settings panel File > Settings (Ctrl+Comma)
  3. Go to “Install Packages”, search and install “atom-maya”.

2016-05-03 20_03_15-Settings — C__Users_info_Documents_einfuehrung-in-maya — Atom

Maya Configuration

To be able to send Code from Atom to Maya you need to open a command Port. We are going to set up Maya that this Command Port will be opened each time Maya starts.

When Maya starts it looks for a file called “userSetup.py” in the folder “/Users/<user>/Library/Preferences/Autodesk/maya/<version>/scripts“. If it exists it will execute the file.

Step 1

If the “userSetup.py” file does not exist – simply create a new file in Atom and save it as “userSetup.py” in the folder.

Step 2

Then add following lines of code:

Step 3

Restart Maya.

Test

Now that everything is set up, lets test if everything works.

Step 1

Open Maya and Atom.

Step 2

In Atom create a new file “test.py” add following code:

Step 3

Press “Ctrl+Alt+R” to send the code to Maya. If everything went ok, a polyCube was created.

Troubleshooting

“python” is not recognized as an internal or external command. : Run the python installer again and doublecheck if you set “add python.exe to path” (Or just add it manually to the windows system environment.

Script execution error. The plugin does not support python 3 : you can fix that by downloading python 2.

Quick Tip: Round Holes and Extrudes in Poly Objects

Lets take a quick look on how to punch holes in Poly Objects. It is possible to do this using the “Mesh > Booleans > Difference” Tool. However with that method you sometimes get strange results and usually have to clean up your geometry with the Multi-cut Tool. So instead of wasting time with Booleans, let’s just create the hole directly with the “Multi-cut”-Tool.

STEP 1

Use a Cylinder as Reference. Position it where you need your hole.

2016-03-25-09_34_53-Autodesk-Maya-2016_-untitled_-pCylinder2

STEP 2

Switch to a view so that you can see your object and the cylinder and select the object and the Multi-Cut Tool (Quick access Ctrl-RMB Marking menu)

2016-03-25-09_35_21-Marking-Menu

STEP 3

Start in a corner and simply place new vertex points around the cylinder (The points should match up with the cylinder). At this stage there is no need to be exact we’ll fix that later.

You will notice that the tool does not allow you to complete the circle. Simply end the tool at a sensible position on an existing edge. Press Enter to commit your new edges.

2016-03-25-09_35_55-Autodesk-Maya-2016_-untitled_

STEP 4

Again select the Multi-cut Tool. Add the missing edge of the circle and add additional edges to ensure that all faces have four edges.

2016-03-25-09_36_35-Autodesk-Maya-2016_-untitled_

STEP 5

Now we fix the positioning of the vertex points. Using the move tool and “Point snapping” (Press “v” while using the move tool). Only use the move arrow handlers to move the vertex in the same plane.

Alternatively move the cylinder that it matches up 100% identically with your object. Then you can directly snap to the cylinder.

2016-03-25-09_37_38-Autodesk-Maya-2016_-untitled_-pPlane2.vtx12

STEP 6

Delete the Cylinder and add additional edges (Multi-Cut Tool) to ensure that you only have Quads.

2016-03-25-09_38_19-Autodesk-Maya-2016_-untitled_

STEP 7

Extrude your hole, or delete the faces whatever you need.

2016-03-25-09_41_11-Autodesk-Maya-2016_-untitled_