""" This module contains: An example of a sphere generating Class """ import maya.cmds as cmds class Spheres(object): xMultiplier = 5 def make(self,numberOfSpheres): """ This method makes numberofSpheres spheres When a sphere is made it moves to current sphere "x" times Spheres.xMultiplier Args: self (Spheres):this is automatically given - it is required for methods of an class - a reference to this instance numberOfSpheres (int) : The number of spheres to make. Returns: Does not return a value. BUT creates Spheres in the current document """ x = 0 while x < numberOfSpheres: cmds.polySphere() cmds.move(x * Spheres.xMultiplier,1,1) x = x + 1 aSphereMaker = Spheres() aSphereMaker.make(3)