How to hide outputs and inputs in maya?

Hey everyone! I’ve got a little question about rigging/coding. Is there a way to hide outputs and inputs from channel box? I found 2 codes how to do it via mel and python but something goes wrong. I mean, these scripts working but doing nothing and that makes me sad.
Can u explain me 2 things, is this actually real to hide inputs/outputs? And if it is, how can i do it?
Thank you for helping!
These two scripts that i found here:

By using MEL:
for ($n in ls -sl) setAttr ($n+".ihi") 0 ;

By using pymel:
for node in pm.ls(sl=True):
pm.setAttr(node + “.ihi”, 0)

Hi @pyRig,

Welcome back - not sure about the .ihi attribute - i’ve hidden stuff in the channel box via these:

In python:

cmds.setAttr("myNode.myAttr", channelBox=False, keyable=False)

In Mel:

setAttr -keyable off -channelBox off "myNode.myAttr";
1 Like

Hello, thank you for helping but this is not what I needed. Your code is hiding attribute so not what I wanted to do.
I meant, I want to hide connections that displays below attrs (outputs/inputs). :frowning:

I’m guessing whether it shows up in construction history? From .ihi - you’re talking about the isHistoricallyInteresting attr on a node - this will hide it from the construction history shown at the bottom of the channel box or in the attribute editor.

|isHistoricallyInteresting ( ihi )|unsigned char|2|output13x13input13x13connectable13x13storable13x13hidden13x13|
| — | — | — | — | — | — | — | — |
|Defines whether a particular node is useful for construction history|

cmds.setAttr("myNode.isHistoricallyInteresting", 0)

https://groups.google.com/forum/#!topic/python_inside_maya/1Ps3uzwqSUQ

From this thread you’d call this on the inputs/outputs of your node.

1 Like

Thank you for helping again! Looks like I sorted it out.
Script is working if I select the first node from a whole hierarchy of connections. But the easiest way that I found is using selection=False (if using the second script that I typed in first message), in that case everything works much better.