def randomizeFloats(*args):
sel = cmds.ls(sl=True)
attrs = getChannels()
minn = cmds.floatFieldGrp(widgets["floatFFG"], q=True, v1=True)
maxx = cmds.floatFieldGrp(widgets["floatFFG"], q=True, v2=True)
rel = cmds.checkBox(widgets["floatCB"], q=True, v=True)
for obj in sel:
for attr in attrs:
if (cmds.attributeQuery(attr, node=obj, exists=True)):
rand = getRandomFloat(minn, maxx)
current = 0.0
if rel:
current = cmds.getAttr("{0}.{1}".format(obj, attr))
newVal = rand + current
cmds.setAttr("{0}.{1}".format(obj, attr), newVal)
评论列表
文章目录