Jump to content

Stalkerx777

Members+
  • Content count

    348
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by Stalkerx777

  1. HDK 16.5 How to generate *.proto.h

    CMake generates this .proto file at build time. This recently introduced feature allows you (optionally) decouple parameter interface code from the main code. Again, it's not required to do it that way, unless you have special intentions like supporting compiled blocks feature for example or adding a "verb" (see docs) to your plugin. Now, if you absolutely necessary to use SCons, AND you have a code which uses this new paradigm (like SOP_Star.C) take a look at CMakeLists.txt file, you'll see houdini_generate_proto_headers function, which lives in toolkit/cmake/HoudiniConfig.cmake file. Implement it in your SCons script if you want. Cheers.
  2. Houdini 17 Wishlist

    https://www.youtube.com/watch?v=JHjm-zfP6sM ... Display Options -> Apply Operation To All Split Views ... Select objects, enter the rotate tool, right click on the manipulator in the viewport -> Global Control ... Path Tool. Although it's very clumsy. ... Help->Example Files->Python Panel Examples->Viewport Color Editor.
  3. Using eventCallback is not the right way, the right way would be submitting a bug report since your code is totally fine and should work.
  4. Batch opening and saving *.obj files

    geo = hou.pwd().geometry() for f in random_file_list: geo.loadFromFile(f)
  5. GPattern plugin

    Ok, this was a nice learning project, a lot of things can be improved, but i'm done with it and i'll share the source code, as i promised. Hope this will be useful for learning purpose. Happy New Year! YouTube Source code
  6. GPattern plugin

    If you're talking about the procedural shader, it should be available within the SHOP context (or the new material context?). Try the SOP version for start. Compile the plugin. The latest compiled version available by the link above is for H16.0. Put the file in here: ~/Library/Preferences/houdini/X.X/dso/ Open the Terminal (http://www.sidefx.com/docs/houdini/basics/config_env.html) Set env variable HOUDINI_DSO_ERROR=2 and run Houdini. If there is a problem with loading the plugin you'll get the message printed out. Cheers.
  7. Creating HDA node in python "very" slow

    It's pretty uncommon task to create a node inside thousands of other nodes. The issue easily might be nothing to do with your Python code or HDA itself but simply the Houdini bottleneck. What I would try: Profile your code with cProfile. This might give you an idea what takes time. Performance monitor doesn't help you in this case. You might be querying some Houdini parameter or geometry which makes Houdini cook it. Run your script in Hython instead. Try to do this in Hscript, although it's very unlikely you see any difference. Ask SideFx for support if you have a commercial license. Go crazy and write it in HDK
  8. Debugging in Houdini from PyDev Eclipse

    Vice versa. You attach the debugger to a running process. But as I said before, Houdini is not a process you want Python debugger attach to. Python interpreter is running inside Houdini process so the only option you have for real debugging is using a remote debugger. Maybe someone here could share if they have such experience, I haven't been able to set it up in Houdini.
  9. Debugging in Houdini from PyDev Eclipse

    Debugging and communicating with an application via a port is completely different things. You can do a socket to socket communication in Houdini via openport command or use Houdini's hrpyc Python server. For debugging, since you're running PyDev you should be able to use PyDev remote python debugger. I've had a few attempts to make it work but no luck.
  10. Houdini Universal Unique ID (UUID)?

    It's a coincidence that I'm working on the tools that require unique node identifiers. Unluckily Houdini doesn't provide us with a persistent UID which would be saved in a Hip file, only in the duration of the session, which is kinda useless in my opinion. Despite the fact that I don't like Maya, there is a unique ID attached to each Maya node and this guarantees that knowing the UID you can always retrieve the node. So in Houdini you can't rely on the node names since they inconsistent. What I ended up with is that I'm generating a UID by myself for every node I'm creating in the script. import hashlib, time def generate_uid(node): hash = hashlib.md5() hash.update(node.path() + str(time.time())) node.setUserData('uid', hash.hexdigest()[:10]) # To get the value: node.userData.get('uid') And there you go, you have a UID system in Houdini.
  11. 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
  12. 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
  13. Happy 10th Birthday Od[force]

    Congrats! And thanks for such an amazing resource.
  14. 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.
  15. 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.
  16. 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
  17. Simplify Keyframes Script?

    HScript chrefit command
  18. Cumulative edits in HDA

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

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

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

    Not clear what are you trying to do. Post your code example here so I could help.
  24. 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)
  25. 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.
×