Jump to content

Search the Community

Showing results for tags 'python'.



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 340 results

  1. Hi, i checked all older threads but i still dont find a way to link houdinis python to my anaconda python environment in the houdini.env file I tried LD_PRELOAD ="/Users/userX/anaconda2/lib;&" LD_LIBRARY_PATH PATH didnt find the (in one thread mentioned) libpython2.7.so either using python 2.7.16 on mac os Thank you for your help!
  2. Hi Houdini friends, It seems that the flipbook lockfile name changed from 17.0 to 17.5? The hostname was using the one without the domain in 17.5, e.g. it is now .flipbook_lock.<hostname_with_out_domain>-<session_name> Is there a way / an env variable that is stored for this? trying to get it from socket.gethostname() or platform.node() would all produce the full host name with domain, and there seems to be only "HOSTNAME" in env related to this, which is also the full host name with domain. I could try to see if this lock file exists by wildcarding the domain, but just wanted to make sure that there might be a better way to know this for sure? Thanks so much in advance! - Viola
  3. Hi everyone, I hope someone can help me. I have a rather length piece of code set up in python that works great in 16.5. However I'd like to make the switch to 17.5 The error's I'm getting are: Error Python error: Traceback (most recent call last): File "", line 221, in File "", line 191, in newyarn File "", line 179, in poly2polys File "", line 122, in strands TypeError: slice indices must be integers or None or have an __index__ method Are these easy to fix changes, or has there been a big change between versions?
  4. Hi all, I recently found this Toolset on Github allowing realtime input & record of input from a leapmotion controller. https://github.com/arqtiq/HouLEAP Unfortunately I'm having a little trouble getting it to run properly. In the readme it explains to 'simply copy the content of the **/houdini16.x** folder to your houdini home/hsite folder.' So my question is, where would be the correct place to place the python scripts that the tool provides? (I'm not entirely sure what the 'hsite' folder is referring to?) Houdini see's the OTL's however i return the attached error in, what i assume, is the python scripting. Or perhaps I need to define LEAP in the .env file? Any tips much appreciated EDIT: The error is reported from the example .hip contained in the Github repository linked in my post. Also This was run in H 17.5.258.
  5. Start Orientation Picking

    Hi everyone, is there a way to get this command in python? Start Orientation Picking, i was searching in all documentation, here is nothing about it. Maybe at least somehow to recreate this function, anyway what i need is to create an object and immediately place it on any surface or point. Would be awesome to scale it and rotate it on the same time without release LMB, but i know is fantastic. i was trying to use selectOrientedPositions, thought maybe it will give me the normal of the polygon which i picked in matrix, but no, its just matrix between this new created points would be ideal to have such tool, so im trying to make it, or similar one i actually made some similar some time ago but its fake and not so good, i used some tricky stuff to make, not correct one =) and its using the input geometry, not so useful when you have a lot of geometry and want to create on geo level these objects here is this tool if you interested in https://drive.google.com/file/d/1VabGmzkV_afqQdAteFuXwlEMVL2HMIwB/view
  6. Hello guys, I'm trying to create two different parameter folders on a node. These two folders would be created by two different python nodes with the hou.FolderParmTemplate() method. Unfortunately when I try to achieve this, the second folder created doesn't get its name set properly. It sort of automatically takes an incremented name of the first folder created, even though it has a distinct name set in the hou.FolderParmTemplate() method. Any idea as to why this is happening and how to resolve it? I've attached a file, a simple setup of what i'm trying to do. There are three nodes : a null on which i'm trying to create two separate folders and the two python nodes that generate the different folders. If you run both of their codes and then go in the Parameter interface of the null, you'll see the second file hasn't been properly named. Many Thanks.
  7. Hi, I have a problem, I export a csv table from matlab (I tried single and double) and then import it in houdini but after the importation data are changed as you can see in attachment the real maximum is 4.3392 and is located at the first row, after importation the max is 999099 and is located at the row 485 :/ Someone knows what happend ? I have attached the table Thanks Alex BubblesDensity_debug.csv
  8. Hello, I hope somebody can help me out as I have run into a problem when linking ramps via script that I have been unable to solve for more than a week now. What I would like to achieve is exactly the same effect that using "Copy Parameter" / "Paste Relative References" does when doing this from the user interface. I tried both python and hscript. The problem is that once the ramps are linked, when I add new control points to the parent, the child gets the control points but doesn't get the positions (ramp#pos) and values (ramp#value). In python I simply tried to set one float ramp parm to the other like this: hou.parm("/obj/node_B/ramp_B").set(hou.parm("/obj/node_A/ramp_A")) This seemed like the most simple and straightforward way of doing this but it failed so I reported it to the SideFX guys and they confirmed that python is not feature-complete for linking ramps with the .set() command - first they logged it as Bug #97192 then it was reconsidered to be an RFE with the same ID. After this SideFX suggested to use hscript opmultiparm which I proceeded to do but the ramp linking failed this time too. I am fairly confident using python but not so much with hscript so I am hoping it's my inability to use hscript properly this time rather than another bug - this is what I did: opmultiparm /obj/node_B/ 'ramp_B#pos' '/obj/node_A/ramp_A#pos' 'ramp_B#value' '/obj/node_A/ramp_A#value' 'ramp_B#interp' '/obj/node_A/ramp_A#interp' What I noticed in the "Edit Parameters" interface is if I manually type in the path to link the ramps then it does work the same as "Copy Parameter" / "Paste Relative References" - see below. I wonder if this field is exposed to python or hscript somewhere and maybe I should try to set this? Other than the above I also used both opscript and .asCode() after setting up the ramps links manually to see if it gives me the proper code and even if I run the code I get back from these the ramp linking still fails. Has anybody ever found a reliable solution for linking ramps in script? Anybody got any ideas where to go from here?:) EDIT: I found the solution on the SideFX forum by user jsmack in this post: https://www.sidefx.com/forum/topic/59899
  9. Hi, Can it be possible ? If I have an invisible parameter but I would like to see its keys on the timeline. Just a kind of visual purpose. A similar thing like a DOP cached frames. THX! G
  10. Hello, I am trying to set the path of the current scene viewport via a button press from a hda. I know these python docs below are the key, but I can't seem to tie the relevant python functions together. https://www.sidefx.com/docs/houdini/hom/hou/PaneTab.html https://www.sidefx.com/docs/houdini/hom/hou/PathBasedPaneTab.html https://www.sidefx.com/docs/houdini/hom/hou/SceneViewer.html https://www.sidefx.com/docs/houdini/hom/hou/GeometryViewport.html Any help would be great. Thanks, -Ben
  11. Can I force the scene view to 'homeToSelection' ? I found the hou.GeometryViewport class but how can I get it in h16.5 ? THX!! G
  12. Any python wizards? Confused about the various python installs both in OSX and Linux. When I do a python -V in terminal OSX I see Python 2.7.16. Yet in the Houdini Python shell I see Python 2.7.15 (default, Dec 12 2018, 14:09:37) > Where exactly is the location for the default Python install for Houdini in both OSX and Linux? And how can I change this?
  13. Python, Get current node

    Using python, how can I get my current node. Not the selected node, but the node that I'm currently in. In my search I keep coming across hou.pwd(), but that always just returns / whenever I try it. I figured out how to get the parent of a selected node, but that doesn't work if you don't have anything selected. Thanks for any help!
  14. Hi, Can I force Houdini UI to update selected object property page ( Or refresh all Houdini UI ). ( I change the selection in a python scipt ) Thanks !! G
  15. what are scriptargs?

    in hython I don't know what are scriptargs. I found reference to kwargs, but scriptags remain enigma
  16. Hello, everyone! I want to change the height of the tube by collecting the data from arduino. I refer to this tutorial, but it seems that I still have some problem with it. The screenshot are posted below. Can anyone help me with it? The error message shows like this : Error: Unable to evaluate expression ( Traceback (most recent call last): File "<stdin>", line 2, in expression File "opdef:/Object/gwPlatform?PythonModule", line 18, in getHeight File "opdef:/Object/gwPlatform?PythonModule", line 8, in updateValues AttributeError: 'module' object has no attribute 'ser' (/obj/gwPlatform1/tube1/tube1/height)).
  17. Python Audio Import...

    After a request from @srletak I post my python audio import HDA here. This is the original post this was used for: Multiple qualifiers apply: - This was my first python script and I somehow do not really agree with this funny language so far (was raised on C...) so it's really hacked together without me knowing what I do. - I didn't know where to put the library I used for import so I copied the relevant part into the script directly. - This is the library: https://github.com/mgeier/python-audio/blob/master/audio-files/audio-files-with-wave.ipynb - I only wanted to load 24Bit, 48KHz, Stereo Wave files, so that's the only thing it deals with - one small sample .wav is included. - I didn't understand how to make python read a spare parameter so you have to go into the code of the HDA and set the path to the audio file manually (I marked the line in the script). - Since geometry generation with python turned out to be abysmally slow, I removed the code for that and only import the points and some file info (see the detail attributes). - There is one group for the left channel to help separate left and right. The included .hip file does nothing but load the HDA. You can then go into the code (rightclick the node -> Type Properties -> Code) and enter the (absolute) path to where you put the audio file. This gives you every sample of the wave file as a point in space for further mangling. I'm sure a real Python wiz can do a much better job, so if you improve the script, feel free to post it here or do with it whatever you want. This was created in Houdini Core 16.5. Cheers, Tom AudioImport.zip
  18. Hi, I am trying to get a list of all the extensions that file sop can read/write, for example: bgeo.sc, vdb, abc, etc - with python. Is there a way to load them all into an array without writing it manually one by one? Thanks
  19. I'm with Houdini 17.5 and when I import a usd/usda file, I can go through the menu , and select the usd/usda file I would like to open in the Choose Geometry dialog. My question is how can I import through a Python script, to do the same thing and not to bother the UI operations? The original post and updates are here: https://www.sidefx.com/forum/topic/65721/?page=1#post-281454 and put it here too to try to get more help. Any help is welcome!
  20. Hello, guys! Recently, I'm trying to do a project that needs to connect houdini with arduino. I want to use the data I got from ultrasonic sensor from arduino to change the height of a tube in houdini. But it seems that there are some problems of the connection, Anyone can give me some advice? This is the error message that I got from the software: Error: Unable to evaluate expression ( Traceback (most recent call last): File "<stdin>", line 2, in expression File "opdef:/Object/gwPlatform?PythonModule", line 15, in getHeight File "opdef:/Object/gwPlatform?PythonModule", line 3, in updateValues AttributeError: 'module' object has no attribute 'updateFrame' (/obj/gwPlatform1/tube1/tube1/height)) And here are some screenshots of my project.
  21. Hello, I am able to select visible geometry manually, or even make a script to toggle the option to select geometry manually. But I'm wondering if there is a way to automatically select visible geometry only via a script? I have been unable to figure it out but it would be awesome if possible (may not be possible though?). Thanks! Ant
  22. Groupselection inside HDA

    Hey there! Im developing some HDA´s for my Bachelor Project! My actual Problem is about the Action Button for a Prim Group Selection. Right now im running the standart Action Button script below: import soputils kwargs['geometrytype'] = (hou.geometryType.Primitives,) kwargs['inputindex'] = 0 soputils.selectGroupParm(kwargs) But, of course it does refer to the Node above the Subnet. My question is: How can i refer to the Node above the Selction Node inside the Subnet ? Is it a Python Callback Script or is it something below the Action Button ? Thank you very much Max
  23. Hey there! Im developing some HDA´s for my Bachelor Project! My actual Problem is about the Action Button for a Prim Group Selection. Right now im running the standart Action Button script below: import soputils kwargs['geometrytype'] = (hou.geometryType.Primitives,) kwargs['inputindex'] = 0 soputils.selectGroupParm(kwargs) But, of course it does refer to the Node above the Subnet. My question is: How can i refer to the Node above the Selction Node inside the Subnet ? Is it a Python Callback Script or is it something below the Action Button ? Thank you very much Max
  24. I have a render.cmd file with a list of hip files to render: mread P:/PROJECTS/NSI/PROD/3D/scenes/RENDER/000/SHOT_010/RND_E000_S010_001.hiplc render -f 1 2 -V /out/RENDER mread P:/PROJECTS/NSI/PROD/3D/scenes/RENDER/000/SHOT_020/RND_E000_S020_001.hiplc render -f 1 2 -V /out/RENDER If I open hcmd.exe and run: hscript render.cmd I get all my shots rendered. The issue is that I can't get it working with Python, currently able only run Command Line Tools import subprocess cmdTools = '"C:/Program Files/Side Effects Software/Houdini 17.0.459/bin/hcmd.exe"' subprocess.call(cmdTools) but have no idea how to execute <hscript render.cmd> later...
  25. Hi Guys I have a fairly high res flip sim (by student standards, about 3 gig per frame) and I needed to cache it out as a .sim to utilise checkpoints I need to read this simulation in using playback simulation on the dopnet and a dop IO node with the flip presets in order to pull in the velocity fields for a whitewater sim, however when I do this the computer gets stuck on the first frame I load in. My only current solution is to go through every frame, unticking and reticking the playback simulation button which would take me 2 minutes of load time per frame for 432 frames. An alternative I've considered is the Houdini python module however I am not familiar with this and don't know if the required functions exist. Please could someone with more knowledge on this tell me if this is possible in the python module or whether there is an alternate solution such as a way to pull velocity fields from a .sim cache Thanks George
×