import MASH.api as mapi import maya.cmds as cmds #new file cmds.file(force=True, new=True) #move the camera cmds.setAttr('persp.translateX', 25) cmds.setAttr('persp.translateY', 20) cmds.setAttr('persp.translateZ', 20) #create a poly cube pcube = cmds.polyPlane(sx=1, sy=1) cmds.setKeyframe( pcube[0], attribute='rotateX', t=['0sec'], v=-180.0 ) cmds.setKeyframe( pcube[0], attribute='rotateX', t=['0.5sec'], v=0.0 ) #create a new MASH network mashNetwork = mapi.Network() mashNetwork.createNetwork(name="TimeNetwork", geometry="Repro") cmds.setAttr(mashNetwork.distribute + '.arrangement', 6) cmds.setAttr(mashNetwork.distribute + '.gridAmplitudeX', 30) cmds.setAttr(mashNetwork.distribute + '.gridx', 30) cmds.setAttr(mashNetwork.distribute + '.gridz', 6) timeNode = mashNetwork.addNode("MASH_Time") cmds.setAttr(timeNode.name + '.animationEnd', 1000) #one attribute way to turn off looping cmds.setAttr(timeNode.name + '.staggerFrames', 120) cmds.setAttr(timeNode.name + '.timeOffset', -120) reproMesh = cmds.listConnections(mashNetwork.instancer+'.outMesh', d=True, s=False )[0] cmds.flushIdleQueue() cmds.select(clear=True) cmds.select(reproMesh) bendDeformer = cmds.nonLinear( type='bend', curvature=179.5 )[1] #handle cmds.setAttr(bendDeformer + '.rotateX', 90) cmds.setAttr(bendDeformer + '.rotateY', 90) cmds.playbackOptions( animationEndTime='6sec') cmds.playblast(format="qt", viewer=True, p=100 )