Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kampfgnu/9238080 to your computer and use it in GitHub Desktop.
Save kampfgnu/9238080 to your computer and use it in GitHub Desktop.
coords
import maya.cmds as cmds
import maya.mel as mel
mopathCurve=cmds.ls(sl=True)
for pathCurve in mopathCurve:
print cmds.arclen(mopathCurve)
cmds.select(pathCurve+'.cv[*]')
pathCvs=cmds.ls(sl=True, fl=True)
for cv in pathCvs:
muh = cmds.xform(cv,q=1,t=1)
print 'new Vector2(' + str(round(muh[0], 2)) + 'f * sW, ' + str(round(muh[2], 2)) + 'f * sH),'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment