Editing Objects

 
 
 

Some MEL commands can take an edit flag that allows you to make changes to the attributes of an object. The edit flag is used in conjunction with other flags specifying which attributes to change.

To edit objects with Maya commands

  1. Select the polygonal cube
  2. Edit the height of the cube by typing the following in the Script Editor:
    polyCube -edit -height 3;
    

    This is equivalent to changing attribute values within the Attribute Editor in the Maya interface.

  3. Edit the radius of the sphere named test_Sphere by typing the following in the Script Editor:
    polySphere -edit -radius 1 test_Sphere;
    

    Commands can operate on objects other than what is currently selected by specifying an object name as an argument. The name must be the last argument in the command.

  4. Select the cube and the sphere simultaneously by holding down shift and clicking the sphere.
  5. Delete the objects by typing the following in the Script Editor
    delete;
    
    NoteA list of all flags available for a specific command can be displayed in the Script Editor by typing help command;. For example, help sphere; provides a list of flags for the sphere command.

    For a full list of MEL or Python commands and flags, select one of the following from the menu bar:

    • Help > MEL Command Reference
    • Help > Python Command Reference

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License