Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@howiemnet
howiemnet / Populate.py
Created March 7, 2017 07:14
Populate! a hacky, project-specific crowd animator
#
# POPULATE!
#
import bpy
import math
from bpy_extras import object_utils
from random import randint
from math import radians
@howiemnet
howiemnet / Populate.py
Created March 7, 2017 07:13
Populate! a hacky, project-specific crowd animator
#
# POPULATE!
#
import bpy
import math
from bpy_extras import object_utils
from random import randint
from math import radians
@howiemnet
howiemnet / SetScreenLayout.py
Created January 27, 2017 15:18
Blender Screen hotkeys script
import bpy
class SetScreenLayout(bpy.types.Operator):
"""Switches to the screen layout of the given name."""
bl_idname="screen.set_layout"
bl_label="Switch to Screen Layout"
layoutNamme=bpy.props.StringProperty()
def execute(self,context):
bpy.context.window.screen=bpy.data.screens[self.layoutNamme]
return{'FINISHED'}
def invoke(self,context,event):
@howiemnet
howiemnet / gist:b63f759c99475dcb347c6ee727995778
Created January 3, 2017 11:31
After Effects: expressions for Particular - particles from thrust
// apply this to the PoI of a spot light to point it in the direction of its acceleration vector
nextVec = transform.position.valueAtTime(time+0.08)-transform.position.valueAtTime(time);
prevVec = transform.position.valueAtTime(time)-transform.position.valueAtTime(time-0.08);
theVec = prevVec-nextVec;
theVec = theVec * 10;
theVec = theVec + transform.position;
theVec
// apply this to the Particles/sec parameter
prevVel = length(thisComp.layer("TEAL").transform.position.valueAtTime(time+0.04) - thisComp.layer("TEAL").transform.position.valueAtTime(time));
@howiemnet
howiemnet / Spot_Flare_Brightness.js
Created December 7, 2016 06:02
After Effects Expression to control flare brightness from spotlight orientation
// AE expression to modulate a spotlight's flare brightness
// depending on whether the spot is facing into or away
// from the camera
// h 6/12/2016
// change these to reference your spotlight
// and camera as appropriate
L = thisComp.layer("Light 1");
C = thisComp.activeCamera;
#include <Adafruit_NeoPixel.h>
#define PIN 3
#define LEDCOUNT 23
#define SPEED 5
const uint8_t PROGMEM gamma[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
# 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")
C = thisComp.layer("Camera");
V = C.toWorldVec([0,0,1]);
P = toWorld(anchorPoint);
lookAt(P, P + V);
#
# POPULATE!
#
import bpy
import math
from bpy_extras import object_utils
from random import randint
from math import radians
@howiemnet
howiemnet / SerialPortLister.swift
Created August 17, 2015 06:27
Serial port lister for OS X in Swift
//
// GetSerialPortList.swift
// serialTestsIokitSwift
//
// Created by h on 17/08/2015.
// Copyright © 2015 h. All rights reserved.
//
// Simple function returns array of serial port
// paths as Strings
//