JSON is a very commonly used data format so you will come across it at some point. In this video I show you how to get that data into houdini and manipulate your project geometry with it. In addition to this video there is an advanced version of this where I take a look at a more complex json file to extract its data and do funny stuff with it.

CREATED BY

DAVID KAHL

David is a Software Developer and VFX Artist based in Germany. Houdini has allowed him to combine his experience in 3D and scripting, taking both to new heights. He has a passion for sharing his knowledge and tries to do his very best to make a difference in the community.

More from David Kahl

COMMENTS

  • lishizhen 2 years, 9 months ago  | 

    Excuse me, my code is as follow:
    import json
    import hou
    node = hou.pwd()
    geo = node.geometry()
    ......
    but, it shows an error:
    Traceback (most recent call last):
    File "<console>", line 1, in <module>
    AttributeError: 'Node' object has no attribute 'geometry'

    How can I resolve it? Thank you very much!

    • Tyler Britton2 2 years, 3 months ago  | 

      geo.addAttribute(hou.attribType.TYPE, "id", 0)

    • Handy 1 year, 1 month ago  | 

      通常应该在Python节点里使用如上代码,如果是在其他地方,比如Python Shell中,node应该指向一个节点的实例,hou.pwd()返回的是当前执行脚本的节点,如果不是在节点上运行,则返回None,因此下面的代码会报错

  • aquaskylinegtr 2 months, 1 week ago  | 

    why just why, what kind tutorial is this?
    i rarely do comment. but this?

    text editor and inside houdini have different line code. no wonder i get error!

    is it good for learning. but still-

Please log in to leave a comment.