This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# POPULATE! | |
# | |
import bpy | |
import math | |
from bpy_extras import object_utils | |
from random import randint | |
from math import radians |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# POPULATE! | |
# | |
import bpy | |
import math | |
from bpy_extras import object_utils | |
from random import randint | |
from math import radians |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import bpy | |
from math import pi, sin, cos, sqrt, atan2, fabs | |
import socket | |
rad2deg = 180/3.14159265 | |
UDP_IP = "127.0.0.1" | |
UDP_PORT = 4950 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Motion export script | |
rad2deg = 180/3.14159265 | |
import bpy | |
import math | |
from math import sqrt | |
sce = bpy.context.scene | |
saveFile = open("/Users/h/Documents/BlenderPlayback.csv","w") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// This expression, applied to the blur radius of a Lens blur effect, will calc the right amount of blur | |
// to apply to objects at infinity (eg star fields) depending on the focus dist / aperture of the current active camera | |
// | |
// For safety it maxes out at 100 px (!) | |
// | |
try { | |
focLen = (thisComp.activeCamera.cameraOption.zoom * 102.05) / thisComp.width; | |
blurDiam = (focLen * thisComp.activeCamera.cameraOption.aperture) / (thisComp.activeCamera.cameraOption.focusDistance - focLen); | |
Math.min(100,Math.abs(blurDiam)/2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Houdini to Blender camera exporter thingy | |
# h@howiem.net / 22 Aug 2019 | |
# | |
# v1.0: hacky but seemingly working | |
# | |
# Pop this into a toolbar button's script window in Houdini | |
# Select a camera (or a camera switcher) and press the button | |
# | |
# A newly generated python script is now on the clipboard. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first hacky attempt at getting camera / object animations into AE from Houdini. | |
# Stick this on a tool button on a shelf. Note the hard-coding below (!) | |
# A file will be created in your home folder; open it, copy to the clipboard, then go to AE and paste onto the cam/null of your choice | |
import hou | |
h = hou.node("/obj/geo1") | |
filename = "testfile.txt" | |
startFrame = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: ignore the .cpp extension on the filename - this is VEX | |
// but I couldn't find a gist-friendly way to syntax-hilight it | |
// ¯\_(ツ)_/¯ | |
// | |
// h's magic adaptive point resizer for optimal | |
// rendering of tiny points/particles/wires | |
// | |
// 1/2/2018 h@howiem.net | |
// CC-0 - use and abuse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<div style="font-family: sans-serif; font-size: large; width: 100%; padding: 10px; margin:0 0 30px 0; border: 2px solid black;" id="titlebar"></div> | |
<div id="myDiv"> | |
</div> | |
<script> | |
// h quick util: takes a querystring URL - ?file=URL_to_JS_file and renders out as hilighted JS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# h's super dodgy, super-hacky MIDI controller for Houdini code | |
# | |
# Designed to get a Behringer X-Touch One controller to control Houdini | |
# while feeding back current frame and status to the lights and readouts | |
# on the controller. Super cool. | |
# | |
# But this really, really, shouldn't be public. My Python-fu is a little raw. | |
# But it may give someone a useful starting point... | |