Jump to content

Stalkerx777

Members
  • Content count

    383
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    11

Stalkerx777 last won the day on July 11

Stalkerx777 had the most liked content!

Community Reputation

116 Excellent

About Stalkerx777

Contact Methods

  • Skype
    alexx_houdini

Personal Information

  • Name
    Alex Rusev
  • Location
    Vancouver, Canada

Recent Profile Visitors

8,898 profile views
  1. Here are a few things to know: First, you should never use hdefereval.executeInMainThreadWithResult from the main thread, obviously, it'll always lock the session. Now, what's going on with user's Thread instances is a little bit odd from a viewpoint of a regular Python interpreter. When you join(), you tell other threads (main thread, in our case) to lock and wait. This seems to work fine with Houdini, until you start making calls to Houdini API from your thread, (hou.expandString() in your case) For this reason, there's a hdefereval.executeDeferred(callback) method exists, which doesn't block, but if you need to get something back from your callback, you'd have to take care of this yourself, there are many ways to do this, for example using Queues. This is common producer-consumer pattern. Hope this helps.
  2. Sorry, unfortunately, my Mac is so outdated it'll take a lot of work to bring it in shape, so can't promise if I ever be able to compile for Mac.
  3. I've compiled it for H17.5 for windows: https://github.com/alexxbb/pathdeformer/releases/tag/h17.5
  4. Iterate in subnet python

    import toolutils toolutils.findAllChildNodesOfType(hou.node('/obj/geo1'), "null", dorecurse=True)
  5. Load QT UI from HDA extra file

    I dunno guys, just tried it on a different computer and it also works. Both are Linux machines though. In general, you want to generate Python code from your ui files. See this: https://doc.qt.io/qtforpython/tutorials/basictutorial/uifiles.html Houdini ships with pyside2-uic though I couldn't find the wrapper script for it, you can call it directly like so: hython $HFS/python/lib/python2.7/site-packages-ui-forced/PySide2/scripts/uic.py dialog.ui -o dialog.py
  6. Load QT UI from HDA extra file

    Check out the attached file Cheers, Alex emedded_qt_ui.hdanc
  7. Houdini 4D

    This guy is a legend His other videos are great too.
  8. Can we execute python def by another node remotely?

    Nothing is impossible, but this is not a common way of working with Python in Houdini. For geometry manipulation use Python SOP, for sharing your Python code, put it a module, hou.session, or into HDA's Python module. See the docs To achieve exactly what you want: In your python_remote_control: code = hou.node('../target_python').evalParm('code') exec compile(code, "inline", "exec"), globals(), locals() setA() setB()
  9. HDA - Import Python Module from extra files

    Just copy paste your code into a PythonModule, why do you need complicate things with embedding a pyc file? Using pyc files has some benefits, but only in certain rare circumstances. If your intent is to hide the source code...well.. is it really worth it? pyc files can be easily disassembled. If you want to confuse users so they couldn't figure out your algorithm you could use a python code obfuscator like this one: https://liftoff.github.io/pyminifier/
  10. python panel pyside2 dropevent

    Yes, unfortunately, d&d in Python panels is very buggy. over the course of several years, I've seen all sorts of issues including this. First, make sure in your dragEnterEvent you store the mime data somewhere and then the next time you enter the widget, check if such data exists and reject the event if it does. See if it works for you, you might need to do the same trick with the dropEvent
  11. Do you mean the parameter panel? Didn't hou.Node.setSelected(True, True) work for you?
  12. Stretch UI

    Because in your .ui file you have the width and height attributes are fixed values.?
  13. H17 Introduced a new Python API for the viewport (Python states), this is a way to go if you need viewport interaction. If you want to catch an event in the whole Houdini app, then the trick I posted above should work, however, keep in mind, it must run in the main thread. Pretty much every place from which you can start Python code in Houdini will put it in the main thread, EXCEPT the Python shell - it runs in its own thread.
  14. I've done something similar recently. You've picked the right way - by implementing an HScript command. The UI part is much simpler to implement with Qt though.
  15. Detecting incomplete node definitions in python

    Try to get a definition instance (node.type().definition()) and call some methods of it. I'm pretty sure you'll get an exception somewhere and so try-except would be your answer. As for auto detect, see 456.py startup file, where you could iterate over all node types and check their definitions (see hou.hda.loadedFiles() example in the docs).
×