JMR Posted November 27, 2018 Share Posted November 27, 2018 I'm learning command-line rendering through Python, but I can't get RopNode to work. When I use hou.RopNode.render() I get "unbound method render() must be called with RopNode instance as first argument (got nothing instead)". When I try to add "mantra1" in the parentheses (the file I want to render is the one open) I get the same error except "got str instance instead" in the parentheses. For all my Googling I haven't found any examples of how to successfully use this. What am I missing? Quote Link to comment Share on other sites More sharing options...
symek Posted November 28, 2018 Share Posted November 28, 2018 HOM, like Python, is strongly object oriented, thus most methods live and operate on objects. hou.RopNode.render() is a prototype of a class method, and similarly to most cases, you can't call it directly. It's meant to be used as follows: ropnode = hou.node("/out/mantra1") ropnode.render() #btw: print(type(ropnode)) <class 'hou.RopNode'> render() is the same method you saw in hou.RopNode, but it's now bounded to the instance of a node of type hou.RopNode ps There are some methods free standing in hou module which don't belong to any objects, but that's different story. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.