Advanced Search
Search Results
70 total results found
Retime track in nuke
Retiming a curve There are many retiming options in Nuke but how do you retime tracking data or animation?The answer is actually very simple and can be used wherever you have an animation curve in your script. If you are using an OFlow node, called ‘OFlow1’, ...
Cropping
Center Crop for Instagram: ffmpeg -i ParticleSensor.mp4 -vf "scale=(iw*sar)*max(1080/(iw*sar)\,1080/ih):ih*max(1080/(iw*sar)\,1080/ih), crop=1080:1080" ParticleSensor_ig.mp4
Convert PNG to Icon
first convert to 256 convert input.png -resize 256x256 output.png last convert to icns png2icns output.icns input.png
Python - import all image sequences under folder
"""Finds and creates nodes for file sequences in an entire directory tree""" # This has the user select a folder, then creates Read nodes # for all files and sequences under that folder # lewis@lewissaunders.com 03/2011 import os, nuke, re, time from...
Random Python
Get the file path from selected nodes: sel=nuke.selectedNodes() for x in sel: print(x.knob("file").getValue())
Update frame range from file
def grabFrames(self): import os plate = self.parm("backplate").eval() if not plate: framex = self.parm("frange1").eval() framey = self.parm("frange2").eval() else: flist = [x.split(".")[-2] for x in os.listdir(os....
split by group
import hou selected = hou.selectedNodes()[0] groups = [g.name() for g in selected.geometry().primGroups()] for i, name in enumerate(groups, 1): #make a split node split = selected.createOutputNode("blast") split.setName(name) ...
Camera Stuff
auto focus, get distance from object and camera: vlength(vtorigin(“/obj/geo1”, “/obj/cam1”))
Points
divide points into 3 equal parts: i@part = floor(fit(rand(@ptnum+.258), 0, 1, 0, 2.9)); Nage replacement @nage = fit(@age,0,@life,0,1); Group from class: string grpname = sprintf("class_%d", i@class); setprimgroup(0, grpname, @primnum, 1); // use setpoin...
Bake Camera from Alembic
Shelf script to bake camera form Alembic camera in scene. Must select the child camera in the alembic sop. import hou obj = hou.node("/obj") ocam = hou.node(hou.ui.selectNode(node_type_filter=hou.nodeTypeFilter.ObjCamera)) ver = ocam.parent().parent()....
If then statements
If the pscale is greater than .4 then set it to .2, if not set it to its current pscale @pscale = @pscale>.4?.2:@pscale
Web Convert
OGV: in_old = "path_to_vid.mp4" new = ${in_old%.*}.ogv ffmpeg -i $in_old -codec:v libtheora -qscale:v 6 -codec:a libvorbis -qscale:a 6 $new MP4: ffmpeg -i Web*.mov -an \ -vf "scale=1920:-2:flags=lanczos,fps=30" \ -c:v libx264 -preset slow -crf 22 \ ...
Convert entire folder
for i in *.mov; do name=`echo "$i" | cut -d'.' -f1` echo "$name" ffmpeg -i "$i" "${name}.mp4" done
Transforms and Junk
1. transforms to attribute matrix: p@orient = quaternion(3@transform); v@scale = cracktransform(0,0,2,set(0.0.0). 3@transform); 2. rotate packed fracture based on point + distance: vector p1= set(@P.x, @P.y, @P.z); vector crack1 = point(1, "P", 0); v...
Get frame range from alembic
This script should be added to a button on a node (thats why it's funnyily formated) import _alembic_hom_extensions as ahe; import hou; anode = hou.pwd(); cam = anode.parm("camera").eval(); fpath = hou.node(cam).parm("fileName"); ver = fpath.eval().split("...
Example On Node Buttons
This is how a button on a non-adminned node needs to be laid out: import hou (probably not needed) ; do something ; This grabs frame range from supplied alembic camera, updates names, etc: import _alembic_hom_extensions as ahe; import hou; anode = hou....
Hardware encoding
Intel example command: ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -i "${invid}" -codec:v h264_vaapi ${invid%.}_testHW.mp4
PDF to one image
convert in.pdf +append out%d.png sudo apt install imagemagick If convert is broken, update policy: # Open the file sudo nano /etc/ImageMagick-6/policy.xml # find and edit the line <policy domain="coder" rights="none" pattern="PDF" /> # to : <polic...
Send to Tops
import hou nodes = hou.selectedNodes() topnet = hou.node("/obj/topnet1") if not topnet: topnet = hou.node("/obj").createNode("topnet") topnet.setName("topnet1") for x in nodes: name = x.name()+"_"+str(x.parent()) fstart = x.parm("f1")...
Set Frame Range without Script
import hou; anode = hou.pwd(); start = anode.parm("framemin").eval(); end = anode.parm("framemax").eval(); hou.playbar.setFrameRange(start, end); hou.playbar.setPlaybackRange(start, end)