top of page
  • Writer's pictureKenny Lammers

Houdini 18 - Intro to Python - Writing to JSON Files

Howdy Guys! In this video I wanted to walk through the basics of writing to JSON files from your HDAs in Houdini. This is the next step in saving out data in a more complex format. JSON is a very popular format and python supports it natively. It also helps out when having to save out organized data, very crucial to pipelines.

JSON stands for JavaScript Object Notation and its great because the data is stored in a more structured way. Making it easier to read large amounts of data in a more object oriented way.

Enjoy the video!



def write_parms(kwargs):
    import json
    parent = kwargs['node']
    parms = parent.parmsInFolder(['My_Folder'])
    data = {}
    data['parms'] = []
    for parm in parms:
        if != 'export_parms'
            name =
            value = str(parm.eval())
                'name' : name,
                'value': value
     with open('path to some file', 'w') as outfile:
        json.dump(data, outfile, indent=4)

So Hopefully this helps you out! Let me know what cha think!




397 views0 comments


bottom of page