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

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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!
  6. Hi! Cant find information about how to create empty folder with python inside digital asset parameters. I have a python callback script and at the end i'd like to create folder named, for example, Animation. Just it right now, no parameters inside, only empty folder inside asset. Did anyone know how to make it? That's what i am talkig about.
  7. Hi guys, This has boggled my mind for a while now. I have a OTL that has a tool script attached to it (Type Properties > Tool section), that evokes a PySide interface. The problem is that when I run the tool a few times, every single time a new instance of the interface is being opened, while the old one is still alive. So I'm ending up with lots of open windows of the same tool after a while which is super annoying. How can I prevent this from happening? I want to have only one single instance running at a time, basically close the old window if the tool is run again. Here's a really simple example that we could use as a test case. (Same problem if I run it as a shelf tool) from PySide import QtGui, QtCore class Window(QtGui.QWidget): """Simple Test""" def __init__(self): super(Window, self).__init__() self.setGeometry(50, 50, 500, 300) self.setWindowTitle("test") self.home() def home(self): btn = QtGui.QPushButton("Test Button") a_label = QtGui.QLabel("Test Label") qvbox = QtGui.QVBoxLayout() qvbox.addWidget(btn) qvbox.addWidget(a_label) qvbox.insertStretch(2) self.setLayout(qvbox) def run(self): self.show() main = Window() main.run() Some where I read that using the QEventLoop might help to detect running instances with hou.ui.eventLoopCallbacks(), but after trying some stuff for a few hours, I'm at my wits end. Help here would be much appreciated Thanks!!!
  8. Eval in VEX?

    Hey guys, I searched around for this and can't seem to find a solution, maybe you guys know. To simplify what I'm doing (its quite more complicated than this, but, ya know), lets just say I have this set up- string A = "91+"; string B = @ptnum; string C = A+B; C == "91+1", "91+2", "91+3" . . . Is there an eval I can do in VEX to get a result like this per point? 91 92 93 94 95 I've tried doing things like - float( C ) == errors out or atof( C ) == "91" But it doesn't seem to work for me. Is there any sort of - eval( C ) Or another way to evaluate the string variables as an expression/math? I'm considering just adding new parameters to evalutate the math through python and to read the parameters into the vex, but is there an easier way to do this?
  9. Edit parameters and snippets with your favorite editor – quickly! Includes automatic configuration by looking for popular editors in your computer. Installation - Download - Add the following files to your preference folder or .hip file location: PARMmenu.xml and MainMenuCommon.xml For the complete guide and more information: https://github.com/ArthurYidi/Houdini-External-Editor
  10. Hi all: I am trying to integrated H14 with my company's render pipeline, I imported my old customized Mantra and Rop output Nodes from H13 which were python script HDA module in type property and modified from H13 original nodes, so we could send the geometry cache and renders to the farm with one click. Rop Output Driver: After imported the otls, it will automatically create a new vex type digital asset, and my old one gone. So I tried to modify the H14's built-in Rop Output node in type property, adding the HDA module, after I pasted my script and click accept, same shit happened again, H14 create a new vex type digital asset. It seems H14 forbids user from modifying its built-in nodes in type property. Mantra: I can't even edit anything in type property not without destroying the layouts, so I created a new output driver digital asset, but new render nodes can not be seen in the IPR render view. Do you guys have some ideas how to work around the situations? Orz.................... Thanks
  11. Houdini UI Window

    Is it possible to have a standalone window dialog that does more than just read input or multi-input using python? For instance, can I have a dialog that reads multi input, has a node selection tree, and uses the button as a function call rather than closing the window? Or have a checkbox option within the GUI?
  12. Hi guys, I recently (few days ago) started learning python and while I hit many walls I managed to find enough info on this forum and sidefx.com to help me overcome the issues. However there's one (for now) that I can't manage to solve and it's a bit hard to explain in writing so I hope you'll have patience with me, thanks Passing tokens using callback script. I need to call a function with using the token variable from the drop down menu. For example if the user selects the first option the function get's called with a variable, if the user selects the second option the same function is called but with a different variable. From Houdini help looks like it's done using callback script to pass the token of the menu but I can't seem to make it work. This is the python callback I have on the menu: hou.pwd().parent().parent().hdaModule().DisplayPaintMode(hou.pwd().parm('paintDisplay').eval()) paintDisplay is the drop-down menu parameter where the callback script is with the 1st token: result and the 2n one: paint And this is the function on the HDA python module: #Display Paint Node def DisplayPaintMode(node): HDA = hou.pwd().parent().parent() import toolutils if node == 'paint': print 'display paint' paintNode = HDA.node('ObjectToDestroy/PaintFractureDensity') paintNode.setDisplayFlag(True) paintNode.setRenderFlag(True) else: print 'display result' sopnode = HDA.node('ObjectToDestroy/OUT_display') sopnode.setDisplayFlag(True) sopnode.setRenderFlag(True) But this always prints 'display result' regardless of what option is selected from the menu. However if I change the callback to: hou.pwd().parent().parent().hdaModule().DisplayPaintMode('paint') then it prints paint - the way it should. So I can't find how to pass the menu tokens with the callback script. Thanks a bunch, -Adrian
  13. I'm trying to learn houdini, and one thing which I'm getting really stuck at is the syntax and (apparent) inconsistency of expressions / snippets of code - or at least there's so many little idiosyncrasies that it's driving me nuts. I've looked around as much as I can in various documentations, but couldn't find a single piece of text which describes an overview of all of these things, instead the info is scattered all over the place, probably because some of these are legacy and dates back decades while others are quite new. As far as I understand: $ is for global variables (in HSCRIPT ? and python too? are there substitutes for VEX?) @ is for attributes in VEX (is it possible to access attributes in HSCRIPT?) ch is for referencing a channel (i.e. a parameter of something from the GUI?) (is this HSCRIPT? or PYTHON?) I'm still not sure what op or ` (backtick) are for or when to use them. What I'm after is a very short (hopefully not more than a few sentences per item) summary of what each of these things are, and in what context we are supposed to use them. Also, what is the context of what we enter into textfields? E.g. when I write sin($T) into the position of an object. Is this HSCRIPT? or Python? Or is that a Houdini Expression which is a whole other context separate to HSCRIPT? cheers,
  14. Hi, a scripting question: On SOP level, object-merging an obj level object(say a camera).. then in another node want to refer to the camera's aperture.. What is the way to do that? (Indirectly refer to a parameter in hscript) something like this: (but this doesnt work `ch("../object_merge3/objpath1")/aperture` thanks! Alex (below works with detail params in attribcreate, but is there a more streamlined way?) attribcreate1: aperturePath = `chs("../object_merge3/objpath1")`/aperture attribcreate2: aperture = $APERTUREPATH
×