Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Stalkerx777 last won the day on October 23 2019

Stalkerx777 had the most liked content!

Community Reputation

138 Excellent

About Stalkerx777

Contact Methods

  • Skype

Personal Information

  • Name
    Alex Rusev
  • Location
    Vancouver, Canada

Recent Profile Visitors

9,416 profile views
  1. Right, as Tomas said a parameter expression might work for you, if not, then what you can do is in your onInputChanged handler of your hda, you would register a callback on the node's inputs. (Simplified, untested) def _callback(): pass for inp in hda_node.inputs(): inp.addEventCallback([hou.nodeEventType.NameChanged], _callback) You will need to take care of removing the callback if it's there already before adding a new one.
  2. To be honest, you've chosen the wrong place to ask basic C++ questions. 1. Look closer and you'll find the definition in the C file. 2. What do you expect it to return and why? This is your plugin entry point, Houdini calls it to register your new operator. P.S. Learning C++ via HDK is a very wrong strategy imo.
  3. map uniform pattern on a geometry

    https://www.sidefx.com/tutorials/making-procedural-patterns-tutorial-houdini-cinema4d/ https://github.com/alexxbb/gpattern
  4. Executing hda python script every frame

    Rather than pushing the values to a parameter on a camera from your HDA, consider setting a Python expression on vcomment something like: hou.nodeType('your_hda_type').hdaModule().get_comment() It's not always possible to set it up this way, depending on your requirements, but it's for sure always better to pull values rather than push to parameters. At least you won't have problems with locked nodes and it doesn't change the scene state.
  5. onCopy event in hda

    def is_copy_paste_event(kwargs): if not kwargs['node'].name().startswith('original') and not kwargs['old_name'].startswith('original'): original_node = kwargs['node'].parent().node('original0_of_%s' % kwargs['old_name']) return True if original_node else False Use this in an OnNameChanged event handler
  6. Drag and drop QtWidget data to a parameter

    The docs in that example say: This example demonstrates specifically how to enable dragging items from other parts in Houdini and dropping them into the Python Panel interface. So dragging anything to your custom widget makes sense, because you can handle different cases in your code, but dropping an arbitrary data from Qt into a Houdini's node parameter is undefined, to my knowledge. Native Houdini UI doesn't know how to handle this interaction. Interestingly that you're getting "something" working, I guess Houdini tries its best to read the mime data as text, but it's limited to what it can do.
  7. Drag and drop QtWidget data to a parameter

    Need more information, What kind of "parameter" are you talking about? A Houdini parameter, a QWidget? What is so "weird" in that text? What and whereto are you dragging exactly?
  8. Async Python message listening

    I assume you're using Python 3 build of Houdini-18? Not only it's not official yet but it's far from stable first of all. Second, if you look at the Discord API docs, it says that client.run() is blocking, meaning it's spawning an event loop that blocks the interpreter which runs on the main thread where the Houdini UI runs too. You need to run your Discord client code on a separate thread. It's a big topic and far beyond the scope of Houdini. From a random google page: from threading import Thread import asyncio def start_loop(loop): asyncio.set_event_loop(loop) loop.run_forever() new_loop = asyncio.new_event_loop() t = Thread(target=start_loop, args=(new_loop,)) t.start()
  9. Python - how to faster export points and prims?

    As I've already said, if your Browser client is going to display the geometry(Three.js right?) it probably expects geometry in one of the supported common file formats. You can't do any better job at exporting those formats out of Houdini, geometry.saveToFile() is probably the most performant way you can get. Since geometry.saveToFile() is one call away from the bare c++ implementation, writing the same in c++ doesn't yield you any performance benefits. Now, you mentioned JSON. If your goal is performance - forget about JSON. If export takes 15 sec as on the image, the JSON is gonna be enormous and overkill for the network. If you want to make an experiment, try this: geometry.saveToFile("foobar.geo") - "geo" format is nothing more than a plain JSON. If I were building a system like this with minimal latency, I would go with something like this: 1. Run a Python RPC server in Hython, which would take requests from the main API server. This removes the need to spawn a new Hython process per request. 2. In Hython, geometry.saveToFile() to a fast SSD disk 3. The server reads it back and sends it as payload. Hope it helps
  10. Python - how to faster export points and prims?

    Does your server expect a common, ready to use file formats like obj or fbx? If so, then you should delegate the writing to Houdini. You can't do it any better yourself. If you sending a custom data format then yes, you have to write a custom exporter and Python might not be your best friend for this. In the case of obj, collada or fbx you can save the geo with Python (hou.Geometry.saveToFile), read and back and send as binary. The downside is it uses the filesystem as an intermediate step. If you want to avoid this step, you could write an HDK extension for Python which would convert the geometry in memory and return you a binary blob, which you then send to the server.
  11. Python - how to faster export points and prims?

    If you don't need to massage the geometry data in a special way before you feed it to Three.js, just pick one of the file formats Three.js can read, like obj, fbx, collada... Those and some other Houdini can export. Are there other reasons you have to do this with Python from Houdini?
  12. Import Automate with String replace

    For the frame number use $F3, where 3 is padding
  13. switch takes and render

    Usually, ROPs in Houdini have a take parameter, see if Redshift ROP has one and set your take on the ROP in your for loop rather then setting it globally in the scene. Cheers.
  14. Updating the viewport with python to see change in parameters

    As Mark said above, the GeometryViewport.draw() won't update the viewport because your script is running in the main thread and therefore is blocking any updates. What you need to do is to run your script in a separate thread and communicate with Houdini via hdefereval.execute_in_main_thread_with_result(callback) See $HH/python2.7libs/hdefereval.py for more info.
  15. Possible to interact with main menu via script?

    If all you need is just the menu items name, simple read the $HFS/houdini/MainMenuCommon.xml file with Python and you're good to go.