Jump to content

Search the Community

Showing results for tags 'hou'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Found 12 results

  1. Hey guys, I am trying to store some variables into the session source so I can easily get at it at any time. So far the tests I've been running have been working great, but I am not quiet sure how I can expand on the syntax to allow for variables to control the values set into the source. This is the syntax I've used so far: hou.setSessionModuleSource("variablename = 0") However, as far as I've been able to figure out this will only allow for hard coded values, I am looking to insert the value from a variable instead of a hard coded value, like this: mynum = 3 hou.setSessionModuleSource("variablename = mynum") When I try this in the python shell I get the error back that "name 'mynum' is not defined" (along with some more text, most notably of which I guess is that it says the operation failed). Do you guys have any tips on how I could make this work? Sorry if this is very basic, I've been trying to look around for specific syntax examples but I am having kinda a hard time finding examples of actual syntax for the Houdini specific python commands. Thanks for the read!
  2. import hou import pprint node = hou.node('/obj/geo1/subnet2/TestNode') number = 5 parm_tuple = node.parmTuples()[number] name = [parm.name() for parm in parm_tuple] group = node.parmTemplateGroup() parm_template = group.entriesWithoutFolders()[number] myIndex = group.containingFolderIndices(parm_template) folder = group.entryAtIndices(myIndex) ContFolder = group.containingFolder(parm_template) name = ContFolder.name() label = ContFolder.label() node = hou.node('/obj/geo1/subnet2') group = node.parmTemplateGroup() folder = hou.FolderParmTemplate(name, label) folder.addParmTemplate(parm_template) group.append(folder) node.setParmTemplateGroup(group) I am not a python guy, and I'm stuck and need some help. What I want to do is, I want to make a custom HDA that has a node(ex.Mantra) inside, and I want to copy all the parm(+folders) in the Mantra Node,and paste it in the HDA parameter. Also I want to reference it each. I tried and figured out how to copy the parm and folder,but when I do this to all the parm,it will make a lot of folder with the same name... Is there any good way to do this? I want do it with python. Thanks, Hiro
  3. Dear colleagues, Houdini provides developers with an option to open the File-/Node-Dialog (such as hou.ui.selectFile() and hou.ui.selectNode()). However, in case I call it from the external QWidget, in my case it is PySide2. If I close this PySide2's QWindow, obviously, it causes the Houdini crash, because hou.ui.selectFile() should return a string to the PySide2's QWidget parent. Here is an example: I have a tool on the Shelf, it opens PySide2 QWidget. Imagine there is a button which opens hou.ui.selectFile() or hou.ui.selectNode(). After calling this function, Houdini creates one more subwindow with File-/Node-Dialog respectively. However, if I close QWidget, any of two select functions return a result to non-existed at the moment sub-application. It causes Houdini crash. I am looking for how can I take the reference to this File-/Node Dialog to properly terminate it on closeEvent(self, event), because disabling QWidget's UI, while File-/Node Dialog is open, doesn't seem to be the best solution. One of the possible answers might be: use PySide2's File Dialogs. What seems to be ok for the File-/Path-Dialog, but it might take time to produce custom hou.ui.selectNode(). Thank you in advance!
  4. Hey ODFORCE, Does PyCharm integrate with Houdini well? (Auto-completion, external debugging, unit testing?) Just curious. I did find some blog posts on VS Code set up, but I was curious about Houdini and PyCharm specifically. There was an issue with PySide from an earlier post..? (I'm fairly new to IDE set up, so forgive me if it's obvious) There are plugins for Nuke and Maya for PyCharm. Nothing for Houdini though.
  5. I have added interpreter " C:\Program Files\Side Effects Software\Houdini 16.0.705\python27\python2.7.exe ". Added paths "C:\Program Files\Side Effects Software\Houdini 16.0.705\houdini\python2.7libs " to pycharm. added "C:\Program Files\Side Effects Software\Houdini 16.0.705\houdini\python2.7libs" to system's PATH variable of win10 but when i type in "from PySide2 import QtWidgets " i get the error message in PyCharm : Unresolved reference 'PySide2'
  6. UI Dialog Help

    I imagine this is very simple but I find building ui's with python a bit tricky (compared, for example, to Maya which is very straight forward). I want to create a simple window (or dialog or ui) with several text fields, float fields, int fields etc. I have it working with hou.ui.readMultiInput, but you don't have much control in terms of layout/styling or what data types are allowed/expected. What are the best functions for this kind of thing?
  7. Hello, in Houdini 15 I was using hou.ui.selectFile() dialog to get user's input and I would process it further in python. I used the same function to let user select files or folders, based on the needs of a tool. Now I updated to 16 and the function does not seem to enable user to select a folder, it works only with selecting a file. Does anybody know if there is a way to select a folder in 16? I want to batch process files in a directory and I would like to use file browser dialog to let user set it. In worst case I could use hou.ui.readInput(), and to ask user to enter a path there, but this is super user-unfriendly Thanks, Juraj
  8. Hi everyone, I'm trying to have my Python Module in my HDA place another node right below my asset on creation. So my OnCreation script runs my python module from disk, which has the following code: pos = first_node.position() second_pos = (pos[0], pos[1] - 2) second_node.setPosition(second_pos) This does nothing. The second node is always created near (0, 0) in the network editor. But if i run those lines in the Python shell in Houdini, it works just fine. So that tells me that the OnCreated scripts don't wait for the HDA to actually be placed into the scene before running, despite what the docs say (a problem I've run into before). My solution to this was to use hdefereval to wait to run the code until the event loop was idle. This shows promises of working, but I'm running into issues now. The code I'm trying is: pos = first_node.position() second_pos = (pos[0], pos[1] - 2) hdefereval.executeDeferred("second_node.setPosition(second_pos)") but the problem here is that when it goes to execute the code, the variables no longer exist, and the code fails because "Name 'second_node' is not defined". But I use a custom 123.py script every day that has the exact line hdefereval.executeDeferred("hou.hscript(code)") where "code" is a pre-defined variable, and hdefereval has no problem using that variable when it goes to execute. So I'm not really sure what the problem is here. What is the best way to move a node using Python? (and if you know how to get my hdefereval call to work, that'd be even better!) Thanks, ~Chris
  9. Hi. Guys. I got a huge work to do, there is a fbx file export form max,when i import it to houdini, it include too much parameters on Geo interface form max. So i want delete it all since it was useless. I make a sketch show what i want to do. I just want to remove the ss parameter form interface, not just delete the keyframes or expression. If there was something like hou.parm().destory() modules can do this. Thanks.
  10. 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'])
  11. Hi I want to import .abc cache containing a maya camera into houdini scene, but I can't seem to find the approriate hscript or hou functions. I mean I can do it manually by file --> import--> alembic scene. But How do I automate this in python script ? there is some animation from frame 1-100 in the .abc file. I tried to compile alembic on windows 8.1 because I want to try the SOP_AlembicIn included in the code, I got lots of error when trying to do so. For geometries I know I can create a geo node, and go inside create a alembic node to import .abc file.I think convert this to hscript is pretty straightforward. But for camera .abc file, this doesn't work, while file --> import--> alembic scene seems working, is there a way to code this camera import in python ? or is there another way ? or someone has compiled this for windows ? Thanks.
  12. Hi everybody, Can anybody point me to a way of getting text highlighting of the hou module while using emacs as an external text editor? Thank you!!!
×