How to Import the Maya Commands Library

To be able to create and interact with Maya objects you need to import the maya commands:

In the script editor type:

from maya import cmds

Now we can create maya objects:

from maya import cmds

Running the above code will create a cube object.

Lets break down the cmds.polyCube() command:

cmds= From the maya commands library

polyCube= Get the poly cube object

()= Execute the command