Skip to content

Instantly share code, notes, and snippets.

@nrtkbb
Last active August 29, 2015 14:15
Show Gist options
  • Save nrtkbb/fe2a0a5c8b8c7e4501db to your computer and use it in GitHub Desktop.
Save nrtkbb/fe2a0a5c8b8c7e4501db to your computer and use it in GitHub Desktop.
[Maya] NurbsCurveを選択して実行するとCV0の位置にピボットを移動するやつ
import pymel.core as pm
for trans in pm.ls(sl=True):
shape = trans.getShape()
if not type(shape) == pm.nodetypes.NurbsCurve:
print ('{} is not NurbsCurve. skipped.'.format(shapw.longName()))
continue
trans.setPivots(shape.getCV(0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment