I have imported some models and converted the materials using “vraytuner” but there is a weird opacity connection on all of them. Is there a way to disconnect all the opacity connections on a large number of materials at once? There isn’t a selection in the attribute spread sheet to do it.
Just select all the shaders and break the opacity connections via the Channel Box.. Or use a small script snippet like this (Python):
import pymel.core
def disconnectAttrs(attrList, defaultColor):
for shd in pm.selected():
for attrName in attrList:
if shd.hasAttr(attrName):
if not shd.attr(attrName).isConnected():
continue
try:
shd.attr(attrName).disconnect()
shd.attr(attrName).set(defaultColor)
except Exception as e:
print(e)
disconnectAttrs(['opacity', 'opacityMap'], [1,1,1])
You can’t just select them all and in the channel box disconnect them…only one by one you can.
thank you.
Breaking connections on multiple nodes seems to work fine here (Maya 2016), but only as long as all the selected nodes are of the same type. The script takes care of that limitation.