Skip to content

Instantly share code, notes, and snippets.

@jhoolmans
Created January 23, 2013 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhoolmans/4604667 to your computer and use it in GitHub Desktop.
Save jhoolmans/4604667 to your computer and use it in GitHub Desktop.
Create cube on joints
import pymel.core as pm
from pymel.core.datatypes import Matrix
for item in pm.ls(sl=True):
cube = pm.polyCube(ch=False)
mat = Matrix(pm.xform(item, m=True, ws=True, q=True))
pm.xform(cube, ws=True, m=mat)
pm.parent(cube, item)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment