Selecting with the API

This section illustrates how to use the Maya API to select and query items in the scene.

For selection in Viewport 2.0, see Porting Selection from Legacy Default Viewport to Viewport 2.0.