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.
Announcement
Collapse
No announcement yet.
Disconnect multiple material connections:
Collapse
X
-
Just select all the shaders and break the opacity connections via the Channel Box.. Or use a small script snippet like this (Python):
Code: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])
Last edited by Dan Andersen; 16-11-2018, 04:00 AM.
-
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.Last edited by Dan Andersen; 16-11-2018, 05:20 AM.
Comment
Comment