Advanced Search
Search Results
70 total results found
ROP
PostRender open MPLAY: import os; img_path = "`chs("picture")`".replace("$F", "\*"); os.system("mplay %s" % img_path) flipbook mplay post-render script Open mrv: import os;img_path = "`chs("picture")`".replace("$F", "1001");os.system("/mnt/jobs/users/antho...
Install Ubuntu in distrobox
Install Docker first: # Add Docker's official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl gnupg sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/k...
Pull version from hipname
Can be used in a parameter. Returns a integer. import hou, re version = re.findall('_v\d+', hou.hipFile.basename())[0] version = int(re.findall('\d+', version)[0]) return version
New Page
Fun Shelf Scripts
Version up sops that have a "version" parm - I use this to version up a lot of exports in tops or rops: import hou nodes = hou.selectedNodes() for x in nodes: ver = x.parm("version").eval() + 1 x.parm("version").set(ver) Send a ROP fetch to TOPs name...
Orientation
Get transform and orientation from camera: string camera = "/obj/alembicarchive1/Camera2/CameraShape2"; // path to your camera @P = ptransform(camera, "space:current", {0,0,0}); @N = ntransform(camera, "space:current", {0,0,-1}); Random orient on points: ...
Get Frame Size of Image File
node= hou.pwd(); bg=node.parm("image").eval(); res=hou.imageResolution(bg); node.parm("framesizex").set(res[0]); node.parm("framesizey").set(res[1]);
Create Agent from built in mocap rig - Simple
This will take a test mocap rig 3 built in to houdini, create an agent, add agent clips from the built in library (must be in your scene already), and lay everything out. import hou obj = hou.node("/obj") agentname = hou.ui.readInput("Agent Name", title="N...
Send selected nodes to new object (fancy way to create object merges)
import hou nodes = hou.selectedNodes() destnode = hou.node(hou.ui.selectNode(title="select destination node")) for x in nodes: name = x.name()+"_"+str(x.parent()) path= x.path() objmergenode = destnode.createNode("object_merge") objmerge...
Send nodes to new alembic export
import hou nodes = hou.selectedNodes() destnode = hou.node("/obj/EXPORTS") if not destnode: destnode = hou.node("/obj").createNode("geo") destnode.setName("EXPORTS") for x in nodes: name = x.name()+"_"+str(x.parent()) path= x.path...
TOPs - symlink output file of parent
exportFile = str(work_item.expectedInputFiles[0]) dir = os.path.dirname(exportFile) newFile = os.path.join(dir, "cache.abc") os.symlink(exportFile, newFile)
Expressions
Switch by Normal: if(point("../resample3", 0, "N", 2)<0, 0, 1) Menu expressions taken from Forum: So you could do { parma == "" parmb == "" } this would mean they both need to be true in order to work an (and) operation. Or if { parma == "" } { parmb ==...
Spiral
#include "math.h" #include "voplib.h" float easeOutCirc ( float t ) { return sqrt ( 1 - ( pow ( ( 1 - t ), 2 ) ) ); } float index = @ptnum; float numpts = @numpt; float startAngle = radians ( ch("angle") ); float dir = 2 * ch("dir") - 1; floa...
Links
Big resource: https://lex.ikoon.cz/vex-snippets/
Copy Text to Clipboard example
This example I make a dictionary and copy to clipboard. I also gather a frame range from files on disk. #needed: name, path, start, end import hou, os from pathlib import Path def getinfo(): pathname = hou.ui.selectFile(collapse_sequences=True) ...
Button Python Scripts
Make Flipbook button. Must make an opengl in pipeline for the path details. Takes resolution from camera in ShotInfo node. import hou, re, os; stealfile =hou.ui.selectNode(title="Select OpenGl Export Node to steal path from", multiple_select=False, node_typ...
Tops Random
Get the range from a range gen or extend -- works on items: pdgattrib("range", 0) #first frame pdgattrib("range", 1) #last frame #not sure this works
Comparing array
Find the difference between input 1's ids and input 0's: int delete_ids[] = array(); int numPrims = nprimitives(1); for (int i = 0; i < numPrims; i++) { int leaf_id = prim(1, "leafid", i); append(delete_ids, leaf_id); } int my_id = i@leafid;...
Tailscale
services.tailscale = { enable = true; openFirewall = true; authKeyFile = path-to-key; extraUpFlags = [ "--login-server=https://your-instance" # if you use a non-default tailscale coordinator "--accept-dns=false" # if its' a s...
My Shelf Setup XML
My shelf tools setup, in progress. Save to houdinixx.x/toolbar/daam.shelf <?xml version="1.0" encoding="UTF-8"?> <shelfDocument> <!-- This file contains definitions of shelves, toolbars, and tools. It should not be hand-edited when it is being used by t...