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


  • General
    • Lounge/General chat
    • Education
    • Jobs
  • 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 329 results

  1. i have this geo and i want to apply random textures from a folder hierarchy. i friend of mine helped with some python code, so now i can select a folder randomly and then get the first image of the sequence with a little tweaking i managed to plug it in a quickshade and converting the file numbers to $F4 or $F3. so it should read the sequence BUT!! although i have the iterations attribute of the foreach meta node as a seed for the python script, the same image applies to all primitives. What is missing? Side question: why are the uvs rotating? any tip much appreciated, houdini forums are bit dry right now random_sequences.hip untitled.bgeo
  2. Hi all, I'm trying to make a IK/FK seamless transition. Theres anyone who have done such a thing in houdini that can point me into right direction? My first instinct was to create 3 bones chains. One to bind, other to FK and the last for IK. Since I'm comming from Maya that was my first aproach. Lately I get that I can do all with just one chain of bones and control with a blend when is IK or FK. But I'm lacking os seamless transation. What is the best path to do so? Still 3 chains? One chain is enouph but use python to copy the values? Thank you for the orientation
  3. Hi Houdini friends, I'm having a pretty weird issue right now and was wondering if this is something that someone else has encountered before: When I call a function as a callback to some button on an HDA/ shelf script, the result is different from when I directly call it in the python shell of an opened Houdini session / directly in a hython shell. More specifically, when called as a callback, it hangs; while when called from hython it went through as expected; The function involves some general wrapping code, that execute some houdini specific code, and it seems that any call from the hou module would hang when ran as callback. Does anyone have similar issues before / knows more about what might be different when something is executed as parm callback vs. directly from hython? Thanks soooooo much in advance!
  4. Handling array in Vex

    Hi, In Python, we can create a "quick array" with conditions in a single line: a1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] a2 = [0, 2, 4, 6, 8] a3 = [i for i in a1 if i not in a2] >>>> a3 == [1, 3, 5, 7, 9] In vex, I know how to do it the long way: int a1[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; int a2[] = [0, 2, 4, 6, 8]; int a3; foreach( int i; a1 ){ if( find(a2, i) >= 0 ){ append(a3, i); } } >>>> a3 == [1, 3, 5, 7, 9] Is there a faster way to do this kind of things, maybe like in Python? Thanks!
  5. Hi, How do I find the name of a node to pass into the 'createNode()' function? I'm following a tutorial, and in it he writes: .createNode(“ifd”) to create a mantra node. But I can't figure out where I find this. I've printed the node using the ‘.asCode()’ function, but I'm not really sure what I'm looking for. Thanks a lot
  6. Iterate in subnet python

    Hey, I have subnet in obj with few geometry nodes inside. I need iterate all geo nodes and find all nulls inside each geo node. How can I make this with python? All I have been trying gave me all null nodes in obj context , but I need only from this subnet. Thanks!
  7. Hi all, I'm writing a little python script to change some geometry values and it's working only if I declare the parameter name. hou.node("../subnet1/").parm("L_ear_shape01") But since I've about 20 custom parameters (could be more), to be passed to a function, the current parameter should be returned as soon as I change it's value, either by sliding the slider or roll the mouse button over it's text field. If there is anything like this it would be great: hou.node("../subnet1/").parm( #CURRENTLY_MANIPULATED_PARAMETER# ) I tried the following code at the very top of the script, but it returned None once. hou.evaluatingParm Is there away to get which parameter is being manipulated?
  8. Hello everyone, I made this tutorial to show a workflow to setup passes for rendering using python. The same can be achieved by the Takes, but I find using python for the task can be quite useful in some cases
  9. Load QT UI from HDA extra file

    Hi everyone, I wonder if someone has already succeed to load a .ui file made with qtdesigner, but the particular case is that .ui file is inside a HDA in Extra Files. I've tried with opdef but it seems to be not working. the command I used was QUILoader().load(path.ui) (and it's working if the .ui file is on disk) Thanks to all
  10. Geodesics in Heat

    Hi everyone! I've made an illustration video-tutorial about the Heat Method application to point clouds by Keenan Crane et al, Yang Liu et al and others.
  11. Hi, Can the Network Editor View be 'placed' without zoom on a node (home) ? I tried the setCursorPosition but not worked. Any Idea ? THX! G
  12. Hi, I'm playing around with limiting transform handles on nulls to act as a rigging control surface. I found on these forums a cool hscript snippet that allows this: clamp(cubic(),min,max). Does anyone know the python equivalent? The python clamp doesn't seem to accept a cubic() as a parameter. Also, does anyone know of another method of allowing for manual transform handle input that feeds into an expression? (HScript or Python). I can't wrap my head around why cubic() works! Cheers Dan
  13. there are 2 nodes, and can we remotely execute a python script by another node, especially def too? For instance, there is a python_target null node. If I click its execute button, it writes C in result as I expect. Then I want to do same thing by a code of another python_remote_control null node. After succeeding controlling remotely, I also like to execute setA() remotely, too. Is that possible?
  14. Hi, I am studying python to set a parameter of string (cachePath) by script. After executing the code, ideally it pastes original, "`chs("resouceA")`_`chs("resouceB")`", instead of expanded result "G:/Projects/RnD_000_001/geo_element " So far, I am thinking two methods: A a = r(\"\`chs(\"resouceA\")\`_\`chs(\"resouceB\")\` ") # this way is too many back splash and so confusing B resA = hou.node('.').parm('resourceA').unexpandedString() resA = hou.node('.').parm('resourceB').unexpandedString() a = resA + resB # this way is ok, but when there are 5-10 parmeters, it would be too much work. Do we have a simplest way or special command?? Ideally something like this: a = unexpandedExpression("`chs("resouceA")`_`chs("resouceB")` ") Thanks
  15. 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!
  16. 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
  17. 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?
  18. 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.
  19. 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
  20. 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.
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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