def rebuildCurve(curve="", num=5, keep=False, ch=False, name="", *args):
"""
rebuilds curve (checks validity, min cvs, keep/history, etc)
Args:
curve (string): a valid nurbs curve
num (int): int number of pts
keep (bool): whether to keep original
ch (bool): whether to keep history
name (string): name of new curve (left blank will try to keep orig name)
Returns:
string: the name of the created curves (could be same as original!)
"""
newCurve = ""
if curve:
if isType(curve, "nurbsCurve"):
if not name:
name = curve
if not keep or not ch:
ch = False
if num < 3:
num = 3
newCurve = cmds.rebuildCurve(curve, rebuildType = 0, spans = num, keepRange = 0, replaceOriginal=not keep, name = name, ch=ch)[0]
return newCurve
评论列表
文章目录