Script: Bake Camera

January 5, 2024

import hou selectedNode = hou.selectedNodes()[0] bakingNode = hou.node(‘/obj’).createNode(‘cam’, selectedNode.name() + ‘_bake’) hou.setFrame(int(hou.playbar.playbackRange()[0])) for f in range(int(hou.playbar.playbackRange()[0]), int(hou.playbar.playbackRange()[1])+1): hou.setFrame(f) bakingNode.setWorldTransform(selectedNode.worldTransform()) bakingNode.parm(“tx”).setKeyframe(hou.Keyframe(bakingNode.parm(“tx”).eval())) bakingNode.parm(“ty”).setKeyframe(hou.Keyframe(bakingNode.parm(“ty”).eval())) bakingNode.parm(“tz”).setKeyframe(hou.Keyframe(bakingNode.parm(“tz”).eval())) bakingNode.parm(“rx”).setKeyframe(hou.Keyframe(bakingNode.parm(“rx”).eval())) bakingNode.parm(“ry”).setKeyframe(hou.Keyframe(bakingNode.parm(“ry”).eval())) bakingNode.parm(“rz”).setKeyframe(hou.Keyframe(bakingNode.parm(“rz”).eval())) bakingNode.parm(‘focal’).setKeyframe(hou.Keyframe(selectedNode.parm(‘focal’).eval())) bakingNode.parm(‘aperture’).setKeyframe(hou.Keyframe(selectedNode.parm(‘aperture’).eval())) bakingNode.parm(‘near’).setKeyframe(hou.Keyframe(selectedNode.parm(‘near’).eval())) bakingNode.parm(‘far’).setKeyframe(hou.Keyframe(selectedNode.parm(‘far’).eval())) bakingNode.parm(‘resx’).setKeyframe(hou.Keyframe(selectedNode.parm(‘resx’).eval())) bakingNode.parm(‘resy’).setKeyframe(hou.Keyframe(selectedNode.parm(‘resy’).eval())) bakingNode.parm(‘winsizex’).setKeyframe(hou.Keyframe(selectedNode.parm(‘winsizex’).eval())) bakingNode.parm(‘winsizey’).setKeyframe(hou.Keyframe(selectedNode.parm(‘winsizey’).eval())) bakingNode.parm(‘shutter’).setKeyframe(hou.Keyframe(selectedNode.parm(‘shutter’).eval())) bakingNode.parm(‘aspect’).setKeyframe(hou.Keyframe(selectedNode.parm(‘aspect’).eval()))

Python: Phyllotaxis

May 14, 2020

node = hou.pwd() geo = node.geometry() # Add code to modify contents of geo. # Use drop down menu to select examples. from math import radians, sqrt, sin, cos numpoints = 200 angle = 137.508 cval = 0.2 for i in range(numpoints): theta = radians (i * angle) x = cval * sqrt(i) * cos(theta) … Read More

Python: Split Into Groups

March 13, 2019

This little script for Houdini is one I’ve had knocking about and thought might be useful to throw out onto t’interweb. Select the node at which you want to split out the groups and it will create a bunch of blasts and OUT nodes to separate out per group. import hou selectedNodes = hou.selectedNodes() for … Read More

Houdini Python: Find/Replace Parameter Expression

January 18, 2018

A little script to find/replace strings in selected nodes’, parameter expressions: import hou sel = hou.selectedNodes() dialog = hou.ui.readMultiInput('Find/Replace In Expression', input_labels=['Find: ', 'Replace: ',], buttons=("Find/Replace", "Cancel"), severity=hou.severityType.ImportantMessage, title='Find/Replace', close_choice=1) find = dialog[1][0] replace = dialog[1][1] if dialog[0] == 0: for n in sel: for parms in n.parms(): try: newString = str(parms.eval()).replace(find, replace) parms.set(newString) except: … Read More

Houdini Tip: Toggle Update Mode

December 17, 2016

I often find that Houdini wants to cook at inconvenient times. To stop this you can enter Manual Mode which is located in the bottom right of the UI. To make toggling between Manual and Auto mode easier and quick it can be scripted and dedicated a hotkey. Googling brought up this feed http://www.vfxoverflow.com/questions/toggle-update-mode-in-houdini which … Read More

Houdini Tools Development: Version Up

December 8, 2015

Having begun the switch to Houdini, I’ve been learning how to implement my Python knowledge into Houdini. My first tool is an incremental saver (something I find hugely important), which accounts for files that already exist and warns if a naming convention is not adhered to. This .zip contains the .py script, the code for … Read More

Maya: “Unknown Nodes or Data”

January 23, 2015

I’ve just had the misfortune of trying to export a very basic model with Arnold Shaders from Maya as a .ma file. Upon trying this I get the fateful error. A solution I’ve very quickly found is this python script from Fred Lewis (http://www.movingmedia.com/python-scripts-maya/) # Unlock unknown types and delete them import maya.cmds as mc … Read More

Softimage: Renamer Tool

July 18, 2014

Here’s a renaming tool I created for use in Softimage. Downloaded here   (run it from Edit > gbRenamer)

Nuke: BellTools

June 30, 2014

I’ve just uploaded a small collection of nuke scripts and gizmos that I find useful. I shall continue to update the .zip file as-and-when I have more tools. Find them here  

Plugin: Find Object’s Groups

April 11, 2014

Here’s a little plugin for Softimage that will find and select the groups in which the selected objects’ are within.   Drop it in your plugins directory and reboot Softimage. It will then be accessible from the Object’s Explorer context menu like this ( I’ve also mapped it to alt-g ):