Search - User list
Full Version: Find the nodes that causes huge .hip file size?
Root » Technical Discussion » Find the nodes that causes huge .hip file size?
olivierth
Hi!

My .hip files went from 40mb to 275mb. I'm guessing I added an HDA at that had a huge amount of nodes. Is there an easy ways to find the node/nodes inflating my .hip file size?
FedorK_FX
Not that I know of, but look for the usual suspects like Attribute/Group Paint, frozen nodes, Stash SOPs etc. I did file an RFE about a year ago for some kind of scene analyzer tool like that, but no luck so far.
Italimpex Productions
Hello. Go to Windows > Python Shell, paste this code, and press Enter to run it. You will get 3 types of outputs based on what is bloating your scene: LOCKED (for locked nodes), STASH (for stashed nodes), and HEAVY PARM (for text fields holding a massive amount of raw data over 0.5MB).

def find_bloat():
    for n in hou.node("/").allSubChildren():
        if hasattr(n, "isHardLocked") and n.isHardLocked():
            print(f"[LOCKED] {n.path()}")
        if n.type().name() == "stash":
            print(f"[STASH] {n.path()}")
        for p in n.parms():
            try:
                val = p.eval()
                if isinstance(val, str) and len(val) > 500000:
                    print(f"[HEAVY PARM] {n.path()}.{p.name()} ({len(val)/1024/1024:.1f}MB)")
            except:
                pass

find_bloat()

I hope that helps!
olivierth
oh, super, I'll test it out. Thank you!
johnmather
Be aware that the script above doesn't actually check the size of specific nodes - it just looks at the types as potential sources of large data. It can give you an idea of what might be taking up space, but it's still up to you to confirm.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.