Jump to content

Stalkerx777

Members+
  • Content count

    334
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Stalkerx777

  1. Python issue from 3DBuzz Rigging tutorial

    That's pretty old tutorials and many things have changed since then. To add a spare parameter: ptg = node.parmTemplateGroup() parm = hou.FloatParmTemplate('foo', 1) ptg.addParmTemplate(parm) node.setParmTemplateGroup(ptg) http://www.sidefx.com/docs/houdini/hom/hou/ParmTemplateGroup
  2. Simplify Keyframes Script?

    HScript chrefit command
  3. Cumulative edits in HDA

    Yes, see Geometry Data parameter type and a new Stash SOP
  4. No, nothing you can do about it. OS constantly sends all sorts of events to Houdini application, and since the latter waits while you editing code, Windows assumes that your application experiencing problems
  5. Set Parent node as current node

    @CinnamonMetal Please create a separate topic for all your Python questions, Thanks.
  6. Index of class on empty string

    Do not use break keyword inside the if statement and you'll get an infinite loop.
  7. Index of class on empty string

    while True: btn, nodeName = hou.ui.readInput("what do you want",buttons=('OK',"Cancel"),default_choice=0,title="Name the sphere",close_choice=1) if btn == 0 and nodeName: intro = hou.node("/obj").createNode("geo","geometryA") superGeo = intro.createNode("sphere",nodeName) superGeo.setPosition([2.3,4.5]) superGeo.setParms({"radx":2.3,"radz":4.2,"type":"bezier","rows":54}) fileNode = intro.node("file1") fileNode.destroy() superGeo.setRenderFlag(True) break
  8. Index of class on empty string

    Not clear what are you trying to do. Post your code example here so I could help.
  9. Only load presets in certain conditions

    Hey, You have several options here. Wrap Houdini executable into a launcher script and append a path containing a presets to the HOUDINI_PATH, based on a condition. Wrap Houdini node into an HDA and implement your custom presets in Python. Wait for the next Houdini version, where there is going to be possible to customize node's gear menu with XML (and use <labelExpression> tag to enable/disable menu entries)
  10. Stuck on cooking and HOM fundamental (Python)

    Make sure to turn off "Cache Object Transform" on your targetNode. This should help. If not, use an old good trick with a hidden parameter with expression in it, which will trigger your node to cook.
  11. access menu item

    I don't think you can do this with Python, but you can utilize <labelExpression> XML tag in your menu file. http://www.sidefx.com/docs/houdini/basics/config_menus Cheers.
  12. There is no way to change a number of inputs for built-in nodes. It's only possible for custom operators(digital assets, dso plugins)
  13. changing a parameter on everynode in my scene

    http://www.sidefx.com/docs/houdini/ref/panes/parmsheet
  14. Running python scripts files from python node

    No matter where you run python code from, you're using Houdini's embedded Python interpreter.
  15. How to connect HTML5 / JS UI with Houdini

    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.
  16. 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)
  17. 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()
  18. 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.
  19. A Geometry Object For Each File On Disk

    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.
  20. A Geometry Object For Each File On Disk

    Why not using s@instancefile attribute?
  21. Haven't looked at it awhile, maybe it became possible to code your own handles nowadays, but I highly doubt about that.
  22. Houdini UI Python Library

    Hi, guys! Just wanted to share with you some of my experiments. huilib - is a simple Python wrapper around Houdini's native .ui language. It has been written "just for fun", so no warranty if it works for you, but I think it's pretty usable for a simple UI, in situations, when using PyQt is not an option Maybe someday we'll see something similar from SESI Feel free to use it. https://bitbucket.org/alexxbb/huilib/overview
  23. onCopy event in hda

    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.
  24. hou.hipFile.save problems - need help

    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)
  25. Houdini UI Python Library

    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()
×