Jump to content

Search the Community

Showing results for tags 'hython'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Lounge/General chat
    • Education
    • Jobs
    • Marketplace
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering
    • Compositing
    • Games
    • Tools (HDA's etc.)
  • Coders Corner
    • HDK : Houdini Development Kit
    • Scripting
    • Shaders
  • Art and Challenges
    • Finished Work
    • Work in Progress
    • VFX Challenge
    • Effects Challenge Archive
  • Systems and Other Applications
    • Other 3d Packages
    • Operating Systems
    • Hardware
    • Pipeline
  • od|force
    • Feedback, Suggestions, Bugs

Product Groups

There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 11 results

  1. Hello evryone, I am looking for a hython command in order to list all the Operators Type Libraries as "Current HIP File", "FallBack hda definitions" or "Scanned Asset Library Directories" ... Thanks for your attention. Best regards Mathieu
  2. Hi all (happy new year), I was wondering if anyone knows how to set the thread count in houdini via hython. I didn't immediately see anything in the docs.
  3. Hi there, I'm importing the hou module into a custom python script and I would like to have multiple scenes opened at the same time. This is how it is implemented: import sys from importlib import reload sys.path.append(HOUDINI_PATH) try: import hou except ImportError: print('houdini.py: There was a problem loading the hou module') box_hip = hou.hipFile box_scene = box_hip.load(path/to/box_scene.hipnc) print(box_hip.name()) # ==> box_scene.hipnc CORRECT reload(hou) sphere_hip = hou.hipFile sphere_scene = sphere_hip.load(path/to/sphere_scene.hipnc) print(sphere_hip.name()) # ==> sphere_scene.hipnc CORRECT # Let's print the name of box_hip again print(box_hip.name()) # ==> sphere_scene.hipnc WRONG As you can see, even though I've reloaded the hou module, it's still using the same hou instance for both hip files and therefore always returning the data of the latest loaded scene. Is there a way to have different instances of the hou module so I can load and work on multiple different hip files in the same script? I've also tried to assign hou to different variables with no luck. Any help would be highly appreciated, thanks in advance!
  4. Does anyone know the hython command to run a TOP Network node? >>> hou.node("/obj/topnet__wedges").cook() I tried the line above in a Houdini Python shell. It did not error, but it did not do anything.
  5. in hython I don't know what are scriptargs. I found reference to kwargs, but scriptags remain enigma
  6. Hi, I'm a bit of a newb learning houdini (ex-XSI vet) and I'm trying to create a script to do a viewport capture on a few machines to speed up the process but unfortunately I hit a roadblock when I try to run the process through hython >>> desktop = hou.ui.curDesktop() Traceback (most recent call last): File "<console>", line 1, in <module> AttributeError: 'module' object has no attribute 'ui' Basically I can't get the attribute "ui" needed to launch the viewport capture when running a hython session, but it works fine on a interactive session though. Any ideias to overcome this obstacle? Is it a limitation on the hython session? Any tricks ? Or alternatively is it possible to call an interactive session to do the viewport capture passing some arguments (needed for the script to split up the viewport capture on more than 1 machine)?? Cheers Nuno
  7. Hello I'm trying to make a little script that would check which frame was the last one rendered and then would continue the rendering process if necessary. It's a Windows machine The easiest way I could think of doing it was simply using the subprocess module to call the hrender script with the proper arguments, but I having some trouble The relevant code is def main(): last_known_frame = get_last_frame(RENDER_DIR) if last_known_frame is not None: hrender_command = "hrender -e -f {} {} -d {} {}.hip".format(last_known_frame, END_FRAME, OUTPUT_DRIVER, PROJECT_NAME) os.chdir("V:\Programs\Side Effects Software\Houdini 15.5.607\\bin") subprocess.call([hrender_command], shell=True) However, I get a "hrender -e -f... is not a recognized as an internet command..." I tried using subprocess.call(["hrender", hrender_command], shell=True), with the proper path to the HIP file, but then it calls it like they were two different arguments, which isn't the case So three questions Is what I'm doing possible? What am I doing wrong? Is there a better way? Regarding the second question, I superficially searched how to use HOM on a generic script but apparently you need to assign PATH variables and such on Windows, it looks like a mess I would prefer to avoid if possible Thank you
  8. Hello, what I would like to do is very simple, just for an exercise. I would like to run Houdini from a Python script using the hou module. What I am trying to get working is something like: import sys import subprocess sys.path.append('/opt/hfs15.0.244.16/houdini/python2.7libs') import hou hou.hipFile.load(file_name='/home/ramon/hello.hipnc') sf_geo = hou.node('/obj').createNode('geo') But I get no UI. I could do subprocess.Popen(['houdinifx', '/path/to/hipfile.hpnc']) but it creates deatached from the python script. Maybe should I create it first through shell (subprocess.Popen) and then load it using hou.hipFile? and start playing with it inside the python script? I would like to have a self-contained example. Just a python file that the user just runs like python script.py no more. Thanks and sorry for the stupid question. EDIT: I think I found out what I was looking for... haha... now i can compile vfls using Popen subprocesses and import them afterwards and doing everything in a self-contained file. cool. import sys import subprocess sys.path.append('/opt/hfs15.0.244.16/houdini/python2.7libs') import hou hou.hipFile.save(file_name='/home/ramon/hello.hipnc') hou.hipFile.load(file_name='/home/ramon/hello.hipnc') sf_geo = hou.node('/obj').createNode('geo') hou.hipFile.save(file_name='/home/ramon/hello.hipnc') subprocess.Popen(['houdinifx', '/home/ramon/hello.hipnc'])
  9. Hi! Is there a way to catch Mantra error in python script? I want to implement something like this: hou.hipFile.load(hipPath) try: hou.node("/out/mantra").render((1, 1, 1)) except error: #launch manta again or something else... hou.hipFile.clear() print "Frame " + str(1) + " was rendered"
  10. Hi, At work, we have commercial licenses of Houdini (H9) [network license] I want to learn more about the pipeline features in H14 so I installed the apprentice version. Houdini and Mantra works fine with the local license but hython (from the command line, not the Python shell within Houdini) complains that there is no license. Does hython defaults to network license (hence picking up older H9) rather than honor $HFS/houdini/Licensing.opt unless told to do so specifically via some hython specific environment variable ? Cheers
  11. Hey guys I've been exploring hython in-depth and I'm wondering if there is a way to capture the render statistics of a file and write it to a file. At the moment my only solution is running something like: hython myscript.py > mylog.txt However, I want to write the file from within the script and not redirect the output of the command from the shell. In my script I'm just doing something like this: import hou rop = hou.node("/out/mantra1") rop.render() # I need the output of this function Any help appreciated thank you guys!
  • Create New...