Skip to content

Instantly share code, notes, and snippets.

@Dogydogsun
Last active May 20, 2022 20:58
Show Gist options
  • Save Dogydogsun/37dff871d0ffa5c7c5ffc0d44adcd2fe to your computer and use it in GitHub Desktop.
Save Dogydogsun/37dff871d0ffa5c7c5ffc0d44adcd2fe to your computer and use it in GitHub Desktop.
A short Maya script for transferring selected object transforms to their offset matrixes.
for sel in cmds.ls(sl=True):
getMatrix=cmds.xform(sel, query=True, matrix=True, worldSpace=True)
cmds.xform(ro=(0,0,0), t=(0,0,0), s=(1,1,1))
cmds.setAttr(sel + ".offsetParentMatrix", getMatrix, type="matrix")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment