58 import maya.cmds
as cmds
61 def createSphereAndAttachCircleNode(*args):
63 cmds.createNode(
"spCircle", name=
"circleNode1")
66 cmds.sphere(name=
"sphere1", radius=1)
70 cmds.connectAttr(
"circleNode1.sineOutput",
"sphere1.translateX")
74 cmds.connectAttr(
"circleNode1.cosineOutput",
"sphere1.translateZ")
78 cmds.connectAttr(
"time1.outTime",
"circleNode1.input")
87 mainWindow = maya.mel.eval(
"global string $gMainWindow;$temp = $gMainWindow" )
92 cmds.menu(
"circleMenu", parent=mainWindow, tearOff=
True, label=
"Circle")
93 cmds.menuItem(
"circleMenuItem1", label=
"Move in circle", command=createSphereAndAttachCircleNode)