
Hiding all shape nodes, input and output history from the channel box can reduce animator errors because they only see the channels they’re supposed to be animating.
The attribute isHistoricallyInteresting or short ihi lets us do exactly that. By default it’s usually set to 1 or 2 depending if the node is interesting to all users or just TDs. If we set it to 0 the node is hidden from the channel box. Maya has it set to 0 by default for a few nodes (e.g. GroupParts, GroupId) that are less interesting to manipulate.
I usually run a script that loops over all nodes and hides their history before I publish a rig.
from maya import cmds
def setIsHistoricallyInteresting(value=0):
'''
Set isHistoricallyInteresting attribute for all nodes in scene.
The historicallyInteresting attribute is 0 on nodes which are only interesting to programmers.
1 for the TDs, 2 for the users.
@param value Set ihi to 0: off, 1:on, 2:also on
setIsHistoricallyInteresting(value=0) # hide history from channelbox
setIsHistoricallyInteresting(value=2) # show history (a bit more than Maya's default)
'''
# get all dependency nodes
cmds.select(r=True, allDependencyNodes=True)
allNodes = cmds.ls(sl=True)
# get all shapes
allNodes.extend(cmds.ls(shapes=True))
failed = []
for node in allNodes:
plug = '{}.ihi'.format(node)
if cmds.objExists(plug):
try:
cmds.setAttr(plug, value)
except:
failed.append(node)
if failed:
print("Skipped the following nodes {}".format(failed))
If you have any questions or comments please do get in touch on Twitter

Comments are closed.