This file contains hidden or 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
export default class EventEmitter | |
{ | |
constructor() | |
{ | |
this.callbacks = {} | |
this.callbacks.base = {} | |
} | |
on(_names, callback) | |
{ |
This file contains hidden or 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
vec3 hsv_to_rgb(vec3 color) { | |
// Translates HSV color to RGB color | |
// H: 0.0 - 360.0, S: 0.0 - 100.0, V: 0.0 - 100.0 | |
// R, G, B: 0.0 - 1.0 | |
float hue = color.x; | |
float saturation = color.y; | |
float value = color.z; | |
float c = (value/100) * (saturation/100); |
This file contains hidden or 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
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
This file contains hidden or 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
# Ultra quick'n'hacky AE camera animation importer for Houdini. | |
# Create a new shelf, create a new tool, paste this into the script box. | |
# | |
# In AE, select the Orientation and/or Position keyframes, and Ctrl/Cmd-C them to the clipboard | |
# Open a new text file (Notepad or Textedit) and paste the clipboard contents in. There's your keyframes. | |
# Save the text file somewhere and amend the filename line below to suit | |
# In Houdini, create a camera (it's up to you to set the same zoom / aperture as the AE one). | |
# ... and run this script (well, press the shelf button you stuck this on) | |
This file contains hidden or 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 After Effects camera animation exporter | |
# This version: 7/11/2018, by Howard Matthews - [email protected] | |
# Copyright: CC-0 - use and abuse. Please pass on the knowledge. | |
# Note: there's no error-checking in this script, but it alters nothing within the Houdini scene, so it'll just | |
# fail with an error if you try running it without a camera selected. No harm done. | |
import hou | |
theNodes = hou.selectedNodes() |
This file contains hidden or 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 python script will start AE and run a jsx file in Documents when AE has started. | |
import subprocess, sys | |
app = 'C:/Program Files/Adobe/Adobe After Effects CC 2018/Support Files/AfterFX.exe' | |
subprocess.Popen([app, '-s', "var a = new File('C:/Users/bonsak/Documents/test.jsx'); a.open(); eval(a.read()); app.exitAfterLaunchAndEval = false;"]) |
This file contains hidden or 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
// Run in a detail wrangle. Added .h to get syntax highlighting | |
i[]@index; | |
int rand; | |
vector newpos; | |
int succ; | |
// create a simple ordered array | |
for (int i=0; i<@numpt;i++){ | |
@index[i] = i; | |
} |
This file contains hidden or 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 hou | |
rop = hou.node("/obj").createNode("matnet", "Materials") | |
mat = hou.node("/obj").createNode("ropnet", "Render") | |
shad = hou.node("/obj/Materials").createNode("redshift::Material", "Material").setMaterialFlag(True) | |
rop.moveToGoodPosition() | |
mat.moveToGoodPosition() |
This file contains hidden or 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
int closept[] = pcfind(0, "Cd", @Cd, 0.1, 9); | |
vector kernelsum = 0; | |
vector firstcol = point(0, "Cd", closept[0]); | |
for (int i = 1; i < 9; i++){ | |
vector closecol = point(0, "Cd", closept[i]); | |
kernelsum += ( closecol * -1 ); | |
} | |
f@density = length( kernelsum += ( firstcol * 8 ) ); |
This file contains hidden or 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
<?php | |
remove_action( 'rest_api_init', 'create_initial_rest_routes', 0 ); |
NewerOlder