Jump to content

Stalkerx777

Members+
  • Content count

    339
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Stalkerx777

  1. Import Hou error

    http://www.sidefx.com/docs/houdini/hom/rpc.html Note: hrpc module lives in $HH/python2.7libs and it depends on some other rpc bits which are somewhere in $HFS/python/lib/site-packages
  2. pyqt5 on houdini

    Starting from version 16 Houdini has been switched to Qt5, which means it ships with the libraries so you don't need to use system's ones. from hutil.Qt import QtCore, QtGui, QtWidgets
  3. Happy 10th Birthday Od[force]

    Congrats! And thanks for such an amazing resource.
  4. How to set up pycharm for hou on win10

    There are some complexities with Qt bindings at present. There are Python2 and Python3 branches, and PySide, PySide2, PyQt4, PyQt5 bindings. Back then when only Python2 and Qt4 existed, everything was simple: you either go with PySide or PyQt4. Now it's more complicated UNLESS you compile the bindings yourself. So If you want PySide2 for Python2 on windows you have to compile it yourself. Same for PyQt5. We are pretty stuck with Python2 for at least until 2020 (see http://www.vfxplatform.com/) Another quick solution is to install Python3 and PyQt5 (pip3 install pyqt5), and then use houtil.Qt wrapper: from hutil.Qt import QtWidgets, QtCore But why do we need to install Python3 and PyQt5 then? Well, just to be able to use PyCharm features! In PyCharm type this: from hutil.Qt import QtWidgets, QtCore if False: from PyQt5 import QtWidgets, QtCore You trick PyCharm to use PyQt5 libraries for autocompletion. It's a very quick and not so reliable solution because PyQt5 and PySide2 are different, as well as Python2 and Python3 Note that you can use https://github.com/mottosso/Qt.py (hutil.Qt is basically the same) which abstracts the bindings problem and your code will use whatever library is available at that time. But you won't have PyCharm completion which is sad. So the take away is: for serious development with PyCharm + Houdini, you want to compile PySide2 bindings. P.S. quite a long post Maybe someone finds it useful. I'm a long time PyCharm user and still haven't found the working solution for Houdini and Qt development that works on all platforms.
  5. How to set up pycharm for hou on win10

    PySide2 libraries are located in ....Houdini 16.0.705\python27\lib\site-packages-ui-forced ... something like that, don't remember exact folder name.
  6. 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
  7. Simplify Keyframes Script?

    HScript chrefit command
  8. Cumulative edits in HDA

    Yes, see Geometry Data parameter type and a new Stash SOP
  9. 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
  10. Set Parent node as current node

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

    Do not use break keyword inside the if statement and you'll get an infinite loop.
  12. 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
  13. Index of class on empty string

    Not clear what are you trying to do. Post your code example here so I could help.
  14. 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)
  15. 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.
  16. 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.
  17. 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)
  18. changing a parameter on everynode in my scene

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

    No matter where you run python code from, you're using Houdini's embedded Python interpreter.
  20. 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.
  21. 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)
  22. 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()
  23. 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.
  24. 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.
  25. A Geometry Object For Each File On Disk

    Why not using s@instancefile attribute?
×