Jump to content

Search the Community

Showing results for tags 'script'.



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

  1. Hey guys I have an HDA with 2 python SOPs inside. I need a button on the HDA that would trigger a function in one of the python SOPs. I looked at how callback scripts work but it was too confusing. Appreciate it if someone could help me out. Thanks! Cheers defc0n1
  2. Real-time recorder python script

    Hi guys, I am working on a python script that bakes the hand movement of geometry with mouse in the viewport over the time and creates keys on each frame. In other word, I want to move my object with mouse in the view port and get the Transform/Rotation/Scale keyed on each frame. Currently I am using hou.selectedNode() and the hou.parm() to access the specific parameters that I want to bake. Then I use a for loop to generate keyframe on each frame. Immediately after pushing the bake button it bakes the parameters value on the first frame for entire time line. I have tried using while loop with time.sleep() to wait for a bit after setting key on each frame, but it freeze the view port and I cant move my geometry. Is there anyway to make my code somehow that constantly check the new values of object parameters on each frame and allow me to work on the view port while it does its job in the background? Is this related to multi threading? Here is my for loop for f in timeline: setKey = hou.Keyframe() setKey.setFrame(f) setKey.setValue( keyValue[f] ) ParmList.setKeyframe(setKey) hou.setFrame(f) Thanks,
  3. Compile VEX code to VOP network

    Hello guys, I have a question about how to compile my VEX code to a VOP network by VCC complier? I know there is a mode "-m" before, but it isn't work now, How can I do this in Houdini 15.5? yuqing
  4. Custom Group SOP in VEX

    Hi guys, here are the files I used for the last Vancouver Houdini User Group in case anyone wants to take a look. My presentation was about writing the Group SOP in VEX and trying to optimize it. I wrote everything in a wrangle, and it works great as a preset in a point/prim wrangle. I also made a Digital Asset, although it's not a VEX operator because I couldn't figure out how to make it work purely in VEX because I need to use the group bindings from the Wrangle and I'm not sure how to implement that in VEX. Anyways, the OTL is just the wrangle with the parameters promoted. In the presentation file you can take a look at the speed tests of the Group VEX vs the Group SOP. The difference in performance is pretty similar if you have a few points/prims, but once you go above 1 million the performance difference really starts to kick in. The Group VEX becomes exponentially faster than the Group SOP the more points you have. The difference can really be seen when you group by object and when you group by volume. I also made those 2 modes work with primitives. Here are the files in case anyone wants to take a look at the code. Feedback is greatly appreciated! group_vex_jeronimo_maggi.hipnc vhug_presentation_jeronimo_maggi.hipnc group_vex_jm.hdanc custom_group_sop.vfl
  5. Hello, how can I force a channel in a sop to evaluate my python expression as an expression (not as the final value) ? With hscript it is simple I write : `mycode` But with Python I don't get it, sometimes I write something like : frame() or hou.frame() or hou.pwd() And it is recognized immediately as an expression and is evaluated (blue/cyan background), sometimes the very same text is considered as the final value (background black). I sometimes need to enter the code many times in order to have it recognized as code. I do not understand why ? Any help is very welcome (I am on houdini 15.5.565 on Windows 10) Thanks, Nicolas
  6. Hello, I'd like to include a 'hide/disable when' conditional on a parameter which is being created by a script. How do I do this? null = hou.node("/obj").createNode("null") null.setName('newNull') tabs = null.parmTemplateGroup() for folder in tabs.entries(): tabs.hideFolder(str(folder.label()), True) null.setParmTemplateGroup(tabs) parmGroup = null.parmTemplateGroup() parmGroup.addParmTemplate(hou.ToggleParmTemplate("overrideToggle", "Override Cache Version", 1)) parmGroup.addParmTemplate(hou.IntParmTemplate("overridingVersion", "Overriding Version", 1)) null.setParmTemplateGroup(parmGroup) null.parm('overrideToggle').set(0) null.parm('overridingVersion').disable(1)
  7. I know basic python scripting in houdini so this question is easy one. I have a shelf tool, when clicked runs a python code. I want that tool to ask for a number when clicked and use it in the script. basically, I want to select a node and click that shelf tool to ask for a number, when given that code should copy and paste (duplicate) that node the number of times which is entered. i know i will have to use copyNodeTo function in python, just want to know about getting user input. Thanks!
  8. Hi all, Regarding digital asset parameter pane tab. Can the parameter pane be replaced/switched with a Python panel. Can I make a custom Python panel appear in place of Houdini's standard parameter pane? A few thoughts - possible solutions: I realise I can have a Python panel seperate to the parameter pane, implicitly associated with an asset. I would imagine I can code the custom panel to be loaded/appear when the hda is created/selected. Also I guess a single button could be in the standard parameter pane that could be used to show the custom panel. Although these seem to be workable solutions, It would however be better and a more consistent workflow to find a solution that answers my initial question. Thanks for any help on this Nick
  9. Python Shelf Btn Script With Simple UI

    Hi there! I wrote a couple lines of python code that lets you export Houdini point attributes to an xml file. And then another couple of lines that reads the xml file in Maya. Useful for getting Houdini point colors to vertex colors in Maya, and possible other things to. I thought I would create a simple UI for the Houdini part of the script that has a couple of user defined parameters. But after searching for a while I still don't have a clear idea what's the simplest way to do this. I've attached a image of what the UI could look like. If this was a scripted python Digital Asset then I would get the UI for free, it feel like this shouldn't be that hard either. To do this in Maya, with Python or Mel isn't that tricky either. If it's possible I would like to avoid using PySide & PyQt. I've been looking the the hou.ui module but I don't really understand, I read somewhere that one approach is to load a UI description from a external file. What is common practice here (for simple UI's & dialogs)? Thanks / John
  10. Why my initialization script...

    ... doesn't work with my custom OTLs? When I create "null.py" it gets called, but when I create python file with my OTL operator type as name, it's ignored. Should I put it in different place than for normal nodes? Thanks!
  11. Can it be done? I would like to set some parameters but check some values first. The basic presets just set blindly values, but if we could create presets with python, than it wouldn't be a problem. Or maybe we can add presets with HDK?
  12. Hey guys, i didnt find anything in the forum so i'm gonna open up a new thread for future searchers on this topic (and not hijack my other thread about compilation issues....). Now that i managed to build my plugins, i would like to establish a convenient plugin testing workflow. What i would do in Maya is, after the build i would run a python script to: 1. Load empty scene 2. Unload the plugin and release the handle 3. Copy and overwrite the .dll (.mll) 4. Reload the plugin 5. Reraise test scene setup I can't seem to find a way to unload the plugin in Houdini (or load it in the interface). Is there a way to set it up like this, or do i need to restart Houdini every time ? PS: Is there a list somewhere that explains all the abbreviations like GU, OP etc. ? When i accidentaly read that GU means Geometry Utility, lightbulbs went on, and the HDK naming scheme immediately became a lot less obscure....
  13. For normal scripts with ".cmd" extension it was "arg1", and how it's called for python version of those scripts?
  14. for loop in one line

    i am trying to put a code into a button that will print the values of some parameters, i was able to make a list with t = [x for x in hou.pwd().parms() if x.name().startswith("blend")]; then i can print the list of the parameters that i want with print t; but if i want to do something to each one is when starts to break: t = [x for x in hou.pwd().parms() if x.name().startswith("blend")]; print t; for i in t: print i.eval(); the funny thing is if i print all directly with out doing the filter list does work =( for i in hou.pwd().parms(): print i.eval(); any cool tip that might work? thanks.
  15. i select some nodes on the network tab, and i do get a tuple, i can make it a list, and then sort them. but is not always the same depending on the way the node were selected. can i sort them base on node.name()
  16. Houdini gui

    Hello, all. Anybody know houdini have checkbox element in library of functions. I understand that i can take pyqt, but gui for my script very simple and i need only checkbox and buttons. Thanks
×