def pivot_driver_attr(node):
'''
Start with supporting pivots driven by remap value nodes, more support in the future as requested.
'''
#rpSrc = mc.listConnections(node+'.rotatePivot', source=True, destination=False, plugs=True)
#if rpSrc and rpSrc[0].endswith('.translate') and mc.getAttr(rpSrc[0], keyable=True):
#return rpSrc[0]
for each in ('rotatePivotX', 'rotatePivotY', 'rotatePivotZ'):
src = mc.listConnections(node+'.'+each, source=True, destination=False)
if not src:
continue
srcType = mc.nodeType(src[0])
if srcType == 'remapValue':
src = mc.listConnections(src[0]+'.inputValue', source=True, destination=False, plugs=True)
if src and mc.getAttr(src[0], keyable=True) and not mc.getAttr(src[0], lock=True):
return src[0]
return None
评论列表
文章目录