Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


  • Content count

  • Joined

  • Last visited

  • Days Won


Stalkerx777 last won the day on February 16 2016

Stalkerx777 had the most liked content!

Community Reputation

73 Excellent


About Stalkerx777

  • Rank
  • Birthday 03/02/1984

Contact Methods

  • Skype

Personal Information

  • Name
    Alex Rusev
  • Location
    Vancouver, Canada

Recent Profile Visitors

6,403 profile views
  1. No matter where you run python code from, you're using Houdini's embedded Python interpreter.
  2. If you want your JS UI run outside of Houdini, the way to go is a client/server REST approach. You have to write server side code to run in Houdini. Similar, you can write standalone server app running outside of Houdini and communicate with Houdini via hrpyc. One more interesting approach I used in the past is using QtWebKit based widget to render HTML inside Houdini and using Qt Signals/Slots to fire events from JS callbacks. Works good, but only if you have access to JS source code, or write your own with this integration purpose in mind.
  3. Just pass you geometry as an argument to your function. In HDA: def modify_geo(geo): geo.addAttribute(...) return geo In Python SOP: module = hou.nodeType("Sop/MyHDA").hdaModule() geo = module.modify_geo(geo)
  4. Exactly. This is, in general, a good practice to define all your shared Python code in a top level HDA, and use it anywhere you need, like that: module = hou.nodeType("Sop/MyHDA").hdaModule() module.my_func()
  5. Python SOPs shouldn't contain code which intended to be called outside, Houdini cooks SOPs when it's needed. Define your functions in HDA's PythonModule and call them from there, even from within Python SOPs inside, if you wish so.
  6. It's been awhile since I did instancing in Houdini last time, but it was working back then. Maybe there something else you have to toggle on.
  7. Why not using s@instancefile attribute?
  8. Haven't looked at it awhile, maybe it became possible to code your own handles nowadays, but I highly doubt about that.
  9. There is no copy/paste event, which is lame, I RFE that a while ago, but you can workaround this with OnNameChanged event. Print the kwargs args and see the difference between duplicating a node and just renaming, it's a little bit tricky though. I don't have a code with me now.
  10. Make sure the path is writeable Do not concatenate path strings manually, use os.path.join Maybe Houdini has a hard time writing to NAS drive. A quick workaround: save to a temp file, and then copy the file with Python (shutil module)
  11. 1. I've tried many times, but couldn't make it work. Need to ask SESI support how to use ACTION_ICONBUTTON gadget. 2. Yes: # Find the dialog by name ui = huilib.findDialog('test') if ui: # If found you can show(), hide(), and close() it ui.close() will close and delete the dialog ui = TestDialog(name='test', title='Test UI') ui.show()
  12. That is a long-standing "bug", if you didn't put import hou in hou.session module, it will work until first error (any python exception), once you get an error, hou module gets lost for some reason. So, just always do import hou.
  13. If you open Display Properties you can find there Visible objects field (Optimize Tab). The script above just puts the selected object names into this field with a help of Hscript function. If you want to hide primitives you have to play with visibility sop, there is no way to do that other than in sop context.
  14. Isolate Selection I wrote this many many years ago, still works Can put it on a hotkey or new radial menu. It's a toggle. When nothing is selected - it shows everything. import os def isolate(): sel = hou.selectedNodes() if not sel: sel_string = "*" else: sel_string = " ".join([n.name() for n in sel]) try: if hou.os.environ['CUR_ISOLATE'] == sel_string: sel_string = "*" except: pass hou.hscript('viewdisplay -G "%s" `run("viewls -n")`' % sel_string) os.environ['CUR_ISOLATE'] = sel_string