Hide Shapes from Channel Box

2,844 views
Skip to first unread message

Dilen Shah

unread,
Feb 24, 2015, 5:37:23 AM2/24/15
to python_in...@googlegroups.com
Hey guys,

I have my controls on the rig, which has a few shapes under it, is there a way in python to hide specific shapes from channel box?

I looked into cmds.channelBox but couldn't find much.

Thanks in advance.

D.

Marcus Ottosson

unread,
Feb 24, 2015, 6:10:46 AM2/24/15
to python_in...@googlegroups.com

The channel box respects the isHistoricallyInteresting attribute.

# Hide from outliner
cmds.setAttr("myNode.isHistoricallyInteresting", 0)

I can’t remember exactly what the various enums represent, but it’s something along the lines of.

0: Interesting to no one
1: Interesting to TDs
2: Interesting to Artists

And the UI then reflects this accordingly; i.e. not visualising them in the channel box but still returning them as a result of listHistory etc.

Best,
Marcus​

Marcus Ottosson

unread,
Feb 24, 2015, 6:40:46 AM2/24/15
to python_in...@googlegroups.com
Sorry, it says "Hide from outliner" but I meant channel box. This will not hide them from he outliner.
--
Marcus Ottosson
konstr...@gmail.com


Dilen Shah

unread,
Feb 24, 2015, 10:14:06 AM2/24/15
to python_in...@googlegroups.com
Hey Marcus,

That works perfectly exactly what I needed, I can do this with inputs and outputs also so that's great too, but I have to do it individually for inputs, is there a way for all inputs and outputs in one go I can hide them in channel box?

Thank you.

D.

Marcus Ottosson

unread,
Feb 24, 2015, 10:23:53 AM2/24/15
to python_in...@googlegroups.com

Sorry, not sure I’m understanding you. This will hide a specific node from the channel box. It the node is connected to the output of a particular node, or input shouldn’t make much difference.

What I typically do is just look through a selection of nodes and set their attribute accordingly.

from maya import cmds
for node in cmds.ls(sl=True):
    cmds.setAttr(node + ".ihi", 0)

That way you can graph it, in say the hypershade, select it and hide it that way. The hypershade will then also make it apparent which nodes are part of a output or input.​

Dilen Shah

unread,
Feb 24, 2015, 10:28:09 AM2/24/15
to python_in...@googlegroups.com
Sorry if I was not clear, well when I do it on the node it works fine individually.

Is there a way where all inputs and outputs are hidden automatically rather than on selection?

D.

Cesar Saez

unread,
Feb 24, 2015, 9:28:16 PM2/24/15
to python_in...@googlegroups.com
This is great, thanks Marcus! :)


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOB9dc%2BDaEVRXtJAEmVWXcx5faGVtPjNqqUtY9qyCBw5KA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Raju buddha

unread,
Mar 14, 2015, 1:46:53 AM3/14/15
to python_in...@googlegroups.com
Hi.
it is great to know node.ihi attribute, as pre this we can all inputs and outputs at once. example make a poly sphere set it shape node's ihi to 0, it stops all inputs, outputs visibility in channel box. 

Thanks,
Rajubuddha. 

liud...@gmail.com

unread,
Jul 29, 2019, 3:25:05 PM7/29/19
to Python Programming for Autodesk Maya
Op dinsdag 24 februari 2015 12:10:46 UTC+1 schreef Marcus Ottosson:
What is the difference between 1 and 2? with 0 the node is not visible but with 1 and 2 it's visible.
Is there some debug setting in maya so you can switch maya between td and artist?

Matteo Di Lena

unread,
Jun 15, 2022, 5:39:48 AM6/15/22
to Python Programming for Autodesk Maya
Hey all,

reviving this old thread as there doesn't seem to be a clear answer about 0, 1, 2 anywhere. From what I see it should be:

```
0: Interesting to no one
1: Interesting to Channel Box only
2: Interesting to Channel Box and Attribute Editor
```

Hope it helps!

Matteo
Reply all
Reply to author
Forward
0 new messages