def get_source_and_targets(*args):
"""
checks current selection, first sel is source, remaining are targets
args:
None
Return:
list (string, list): [0] is the source, [1] is the list of targets
or
None
"""
sel = cmds.ls(sl=True)
if sel and len(sel) > 1:
src = sel[0]
tgts = sel[1:]
return (src, tgts)
else:
cmds.warning("You need to select at least two objects!")
return (None, None)
评论列表
文章目录