After working at a few studios that had their own versions of custom swatches, I decided I needed this feature as well. I can't take credit as I had help in figuring it out from several people and basically mimicked a much larger and more robust script but I find this to be the most simplified method out there.
Simply add the code as a shelf tool and assign the c shortcut to it to completely take over node color behavior.
you should get something like the attached image.
from PySide import QtGui, QtCore
selectedNodes = hou.selectedNodes()
if selectedNodes:
nodeColor = selectedNodes.color()
initialColor = QtGui.QColor()
initialColor.setRgbF(*nodeColor.rgb())
c = QtGui.QColorDialog.getColor(initialColor)
else:
c = QtGui.QColorDialog.getColor()
if c.isValid():
for n in selectedNodes:
n.setColor(hou.Color(c.getRgbF()))
Found 1 posts.
Search results Show results as topic list.
Houdini Indie and Apprentice » Custom color swatches in network view
- hkspowers
- 1 posts
- Offline
-
- Quick Links