def toLocators(bakeOnOnes=False, space='world', spaceInt=None, constrainSource=False):
'''
Creates locators, and bakes their position to selection.
Creates connections to the source objects, so they can
be found later to bake back.
'''
if spaceInt and 0 <= spaceInt <= 2:
space = ['world', 'camera', 'last'][spaceInt]
sel = mc.ls(sl=True)
parent = None
if space == 'camera':
parent = utl.getCurrentCamera()
elif space == 'last':
parent = sel[-1]
sel = sel[:-1]
mc.select(sel)
matchBakeLocators(parent=parent, bakeOnOnes=bakeOnOnes, constrainSource=constrainSource)
评论列表
文章目录