Jump to content

Search the Community

Showing results for tags 'scripting'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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 34 results

  1. Hi, Is there a chance for example to get a picked position of a connection item ( where the pointer is picked its line ) ? I would place a node where it's picked.. I think the paste tool does similar when you pick a position at the Network Editor before paste. THX! G
  2. How can I bring the open-source SeExpr into Houdini? https://www.disneyanimation.com/technology/seexpr.html
  3. Hi, Can houdini pythyon can solve this: I have an object (rop network in obj) when is deleted I want to run a py script. Thanks in advance ! Sz
  4. Hi, In a Filecache node I would like to add an other Rendering button after the factory default button. Can it be somehow ? G
  5. Descriptive Parameter to Node

    Hi, I found a very useful thing in docs but seems like not working for me unfortunately. Can anyone help ? I tried to add a descriptive parm to a node ( the same as a digital asset has ): node.setUserData("descriptiveparm", "parm") THX! G
  6. Hi, In Houdini Python (or hscript ) can we simply extract a given subnet content ? THX! G
  7. Hi, Can scripting can solve a node refreshing ( script run when the node exist ) in a specific time intervall. I mean for example a progress note is refreshed. I found some advanced usage of Network Editor with event but the timer event was not given by examples. Did anyone know use it ? THX! G
  8. Hi, Does Houdini give the possibility to add a progress bar to a user defined property page? Does it need Pyside? If needed a panel can be mixed with PySide elements too ? If anyone has idea, it's welcome ! THX! G
  9. Hi, Can anyone knows how to get a node object ( or parent node ) which parameters a parameter pane shows ? Thanks, G
  10. Hello guys, I have some problems with PyQt in Houdini. The problems are: 1. How to get rid of the white border around the window? 2. The logo/image does not load. How to fix it? Thanks ------------ Qt Designer GUI preview GUI Problems 1. How to get rid of the white border around the window? 2. The logo/image does not load. How to fix it?
  11. Hi, I would call a python subprocess (ffmpeg) which creates mov file from jpeg sequence from flipbooks. In Windows 7 it works well but in Windows 10 it makes Houdini Freeze. I tested it with older version of ffmpegs but none. Any idea, experiance of someone ? THX! G
  12. The Artist's Guide to Technical Direction in Houdini - Volume 0: Hscript Back in 2005 I got my start as an intern at Side Effects Software Inc. Over the past decade of using Houdini, I've worked around the world in the film (Starz Animation, Dr. D, Digital Domain) and games (The Coalition, BioWare, EA Motive) industries. In this time, I've had the pleasure of working with many artists who were new to Houdini and sharing some of the insight I've gained. While most people are pretty excited to get their hands on the flashier parts of the software such as FLIP and Pyro, I think that Houdini's greatest strength comes from it's sheer flexibility. And that flexibility is something that only opens up the deeper you delve into how things work. What I like most about Houdini is discovering new ways of doing things. One complaint I've heard time and again, is that after following a tutorial, new artists are often left with something that looks pretty but with little understanding of how anything actually works. I'm always hearing complaints about how steep the learning curve is with Houdini. I'm seeking to help fix that with 7 hours of new training material that focus specifically on HScript scripting in Houdini. This course I've designed for artists who are either lacking a technical background, or who may have experience in other packages but want to understand Houdini better. We'll avoid creating pretty things in this series. Instead, I want to keep a sharp focus on how things work. That means learning about procedural networks, variables and attributes, functions, and for-each loops. Most importantly, I address how to self-learn Houdini. My hope is that this course will build a solid foundation for you to get the most of any future training you pursue and help you to understand how to get the most out of your Houdini networks. If you'd like to become more adept at scripting in Houdini, please consider signing up for my course: https://mixtrn.com/course/the-artists-guide-to-technical-direction-in-houdini-hscript/ Have a Great Day!
  13. Array Function VEX

    Hi there, I'm playing around with creating some custom VEX functions and came across something a bit odd that I just can't seem to get working. If I want to create a custom function that returns an array, say a vector array I will need to declare the return type at the beginning, according to the docs the following should work // A function which returns an array of vectors vector[] rgb_array() { ... }; However if I run this in a wrangle I get a syntax error on line1. Is this a bug? Or am I declaring my function type incorrectly? Thanks in advance m
  14. Hey guys, I was wondering if anybody is familiar with using the hou.node.setDeleteScript() method. In the docs, the language arg is set to Python: setDeleteScript(script_text, language=hou.scriptLanguage.Python) But when running the following code, I get an error n = hou.node('/obj/geo1') cmd = 'x = 5; print x' n.setDeleteScript(cmd) OperationFailed: The attempted operation failed. Python is not yet supported in deletion scripts. Just passing an empty string gives the same error. When trying to set the language flag to Hscript with n.setDeleteScript('setenv x = "hello"', language=hou.scriptLanguage.Hscript) It raises another error TypeError: setDeleteScript() got an unexpected keyword argument 'language' Is there something I'm missing? I would normally create an HDA and use the built in 'On Deleted' call and run my code there, but for this particular case I'm unable to use an HDA. I was able to find this function all the way back in the Houdini 12 docs. Is it still not usable? Thanks!
  15. Switch Radio Button in Python

    Hi, Is there a way to switch between radio buttons in python and how ? Thx!! G
  16. Hey guys I have a python library that does not work well in the Houdini python environment. However, it works fine in my system environment. Is there a way to run a .py file from disk from a python node? If yes, can it be made to use the system environment? Thanks!
  17. hou.hipFile.save problems - need help

    Hi Everyone, Hope you are all well. We have not been using houdini long. We are long time soft users and we are testing out software to move too and see the strengths of them. Houdini is our first choice for the sheer scope of it, so we have started looking at this first. Anyways, explaination of the problem below. I am trying to script a "simple" saving function through a HDA via Python (I dont know if this is a correct way of doing it, so please If I am going in the wrong direction, shout) it will create a few folders based on some parameters in the HDA interface and save the file with the name specified. I am setting environment variables through this and using that to generate the path for the file save and also will hopefully re-use the Environment variables later for ROP output ETC for the scene. I am running into an error with what I believe is to do with the hou.hipFile.save function. I have not been coding for very long either so please bare with me if my Termanology is off also. I have attached some code snippets. I am basically trying to save the files to a structured job folder system. something like below. $JOB/scene/[WORKCATAGORY]/[SHOTFOLDER]/SHOTNAME.hipnc I have defined some functions in the Python Module in the HDA, and these are being called by the callback script on each parameter. It is really weird, It has worked once or twice. But then I try to save again and it does not work again. I did some debugging and the Error that houdini generates, it definately works when I take out the SHOTFOLDER in the string for the path to save to. If my file path is just saved in the WORKCATAGORY section it saves. My defined functions (sorry code is messy) def shotName(parm): hou.putenv("SHOTNAME", parm) test = parm print test def folderName(parm): fname = "NN_" + parm hou.putenv("FOLDERNAME", fname) test = fname print test def workCatagory(node, parm): a = hou.parm(parm.path()).eval() labelName = hou.parm(parm.path()).menuLabels()[a] testA = parm hou.putenv("WORKCATAGORY", labelName) print labelName def customSave(): #Pull in Enviroment Variables work = hou.getenv("WORKCATAGORY") shot = hou.getenv("SHOTNAME") folder = hou.getenv("FOLDERNAME") # Houdini save path FULL savePath = "$JOB/scene/" + work + "/" + folder + "/" + shot + ".hipnc" # Houdini save path with a job catagory but not job name folder #savePath = "$JOB/scene/" + work + "/" + shot + ".hipnc" exSavePath = hou.expandString(savePath) exSavePath = exSavePath.replace('//', '/') #hou.putenv("SAVEPATH", exSavePath ) hou.hipFile.save(exSavePath, False) print exSavePath the error it generates is Traceback (most recent call last): File "<stdin>", line 1, in <module> File "opdef:/Object/Northforge3_testa?PythonModule", line 40, in customSave File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.600/houdini/python2.7libs\houpythonportion.py", line 1287, in decorator return func(*args, **kwargs) File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.600/houdini/python2.7libs\hou.py", line 28330, in save return _hou.hipFile_save(*args, **kwargs) OperationFailed: The attempted operation failed. Error creating file: W:/Work/Development/D00026_Houdini_test/3.3d/D00026_Houdini_test_HOUDINI/scene/rend/NN_test/test.hipnc working enviroment is. Windows 10 Houdini Apprentice 16.0 saving to a NAS drive I hope some of that makes sense. Cheers
  18. 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
  19. Hello I want to ask one quick question. How to store all primitive number in array using VEX. I am writing int nearpts[] = nearpoints(@OpInput1, point(1,"P",0), 20); to store points in array. Now i want to store prim num. I connected grid on 1st input and one centre point on 2nd input to use this one. If you have other way to store points tell me that also. Thank you
  20. Temporary variables in VEX Help

    Hi I'm new to this wrangle node programming, I've been busting my head over why this doesn't work for three days, it's so simple therefor i must be missing out on some general vex concepts. If anyone can please point me in the right direction that would be greatly appritiated. I have a bunch of points on a grid and their moving up and down via noise. I am trying to set up a point attribute that has a value of 1 when a point if moving up (positivly in the Y axis) and a value of 0 when a point is moving down (negativly in the Y axis). This attribute is called Direction, I'm computing the logic on temporary VEX variables and then writing them out to the attributes. Here's how it looks like : // 0 is going down, 1 is going up, -1 means the point has no direction // on the first frame they have no direction so the points just take their current heights so they can use them for comparison on the second and every other frame int temporary_Direction; float temporary_Previous_Frame_Height; if(@Frame == 1) { temporary_Direction = -1; temporary_Previous_Frame_Height = @P.y; } else { temporary_Direction = @Direction; // ------------> this is where the problem is (this is here so that the temporary variable get's the value of the currently proccesing point every frame) temporary_Previous_Frame_Height = @P.y; if(temporary_Direction == -1) // If the point has no direction { if(temporary_Previous_Frame_Height < v@P.y) // If it's going up { temporary_Direction = 1; temporary_Previous_Frame_Height = v@P.y; } if(temporary_Previous_Frame_Height > v@P.y) // If it's going down { temporary_Direction = 0; temporary_Previous_Frame_Height = v@P.y; } } } // Out_Values i@Direction = temporary_Direction; f@Previous_Frame_Height = temporary_Previous_Frame_Height; // Out_Values The problem here seems to be when I declare "temporary_Direction = @Direction", for some reason on the second frame when I read @Direction the value wich is given to temporary_Direction is 0 instead of -1 wich was given to every @Direction on the first frame. Temporary_Previous_Frame_Height updates just fine but temporary_Direction doesnt. Also writing "if(temporary_Direction == -1)" doesnt seem to work either. Is my thought process even slightly right here, what am i doing wrong, are temporary variables created in vex something that exist globally and in order to use them per point we need to read each point's values or are temporary variables something that exist for every point. Also why do i have to give values to all attributes every single frame or else they will reset to 0 (hense the Out_Values section). //////////////////////////// Update Thank you everyone for replying. I've tried out the time shift sop and it work's fine now( I dont even need the Previous_Frame_Height attribute anymore). I've updated the main post with the original hip file and the one with the time shift sop. Learning about the time shift sop is great, but i would still like to improve my thought process on writing code. It would be greatly appritiated if someone can take a look at the original hip file and possibly shed some light on the problem. I've added notes inside the original hip file for clarity. Any help would be appritiated Thanks in advance Original.hip Time-Shift SOP.hip
  21. How to write for loop in vex

    Hello guys, I know how for loop works in c++ but i am not able to write in vex .Can anyone explain me how to write for loop with simple point and color example . Thank you
  22. How to use nearpoint in vex

    Hi guys, I need to ask one quick question. How to use nearpoint expression in vex . Thanks in advance
  23. Getting point neighbor in Python

    Hello dear community, I am currently trying to setup a city generator as part of my bachelors thesis. For a basic street layout, I am using a voronoi sop on a plane and fuse these points. It would be a big ease to be able to find the neighbors of a point (not vertices) and get their position. I did some workaround by creating a dictionary with position vectors and counting the positions that match, so I can at least count the neighbors. Does anybody know a trick or a function to do this in pythin? I know there is a VEX function that does that, however I don't know VEX pretty much and I am having trouble understanding their usage, although I read the docs. Any kind of help would be much appreciated. Best regards, Nicolas
  24. Hello dear community, I am just writing a little Python sop that can Unwrap a polycurve like a uvtexture node does on a nurbs curve with [Arc Length Spline] setup. My question is, what is the attribute name of the uv coordinate? I tried uv and uv[1] as its shown on the spreadsheet. Does anybody know the answer? Best wishes, Nicolas
  25. Hey all, The team at Psyop just open sourced their ID matte toolset called cryptomatte. I started working there a couple months ago. we are looking from some contributors for Mantra implementation for the project! anybody interest? https://github.com/Psyop/Cryptomatte Have look and if your interest hit up the team, we are eager to make this apart of mantra Cheers!
×