Skip to content

Instantly share code, notes, and snippets.

View donovankeith's full-sized avatar

Donovan Keith donovankeith

View GitHub Profile
@donovankeith
donovankeith / print-media-assets-in-category.py
Last active November 6, 2022 23:16
Prints a list of Media Assets in the Cinema 4D Assets Browser to the Console
"""Name-en-US: Print Media in Category
Description-en-US: Prints a list of all media assets belonging to a category ID to the console.
References:
https://plugincafe.maxon.net/topic/14214/get-asset-from-asset-browser-python/4
## License
MIT No Attribution
@donovankeith
donovankeith / PositionInspector.cs
Created February 3, 2022 18:08
Unity Script for Inspecting Position of an Object and Printing to GUI
// PositionInspector.cs
// Prints the position of `targetObject` to the `text` field
// of a Text Mesh Pro text object.
//
// ## Usage
//
// 1. Create a Text Mesh Pro Text Game Object (or select one if it already exists).
// 2. Add this script.
// 3. Link the object whose position you want to inspect in the "targetObject" field.
// 4. Press Play
@donovankeith
donovankeith / README.md
Last active September 3, 2018 22:03
Variable Framerate .mov to 30 fps mp4 Converter Batch Script Generator

FFmpeg Convert to non-variable 30 FPS MP4

NOTE: For the most recent version of this Script, please go to this GitHub Gist

This Python Script searches for all video files matching a specific pattern in the same directory (sub-directories not included) and then generates a Windows Batch Script (UseOnce.cmd) you can then execute to convert those matching video files into Non-Variable 30fps MP4s.

Background

At Cineversity.com we often find ourselves converting large numbers of poorly formed .mov files to 30 FPS non-variable .mp4 files

@donovankeith
donovankeith / IOTButtonForIFTT.ino
Last active October 30, 2020 22:33
Arduino IoT Button with the LoLin Node MCU v3
/**
* IOTButtonForIFTT.ino
* Connects to Wifi, Retrieves a URL, Blinks LED on if Successful
* Be sure to adjust the User Inputs below.
*
* 2017/11/16 Modified by
* Donovan Keith <donovanskeith@gmail.com>
*
* Based On:
* BasicHttpClient.ino by
@donovankeith
donovankeith / ArduinoOSC.ino
Last active January 9, 2023 23:35
Simple test project for driving RGB led with OSC messages.
/*
Send and receive OSC messages between NodeMCU and another OSC speaking device.
Send Case: Press a physical button (connected to NodeMCU) and get informed about it on your smartphone screen
Receive Case: Switch an LED (connected to NodeMCU) on or off via Smartphone
Written by Jackson Campbell <jcampbell@calarts.edu>
Modified by Donovan Keith <dkeith@calarts.edu>
for [Augmenting Realities](https://sites.google.com/view/augmentingrealities/home)
@donovankeith
donovankeith / ArduinoSerialIO.cs
Last active October 19, 2017 23:29
Unity Arduino Input/Output
/* Arduino Serial I/O
* Allows you to send simple commands to an arduino and to receive data back.
*
* Source based on: https://www.alanzucconi.com/2015/10/07/how-to-integrate-arduino-with-unity/
*
* ## Setup
* 1. Edit > Player Settings
* 2. .NET Compatibility Level = `.NET 2.0`
*/
@donovankeith
donovankeith / ScrubAnimation.cs
Created September 28, 2017 08:48
A Unity Script for Scrubbing Animations
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ScrubAnimation : MonoBehaviour {
private Animator anim;
public string animClipName;
float normalizedTime = 0f;
@donovankeith
donovankeith / PrimitiveMover.cs
Created April 5, 2017 22:56
Simple Example of Enums and Switch Statements
// PrimitiveMove.cs
// Creates a simple primitive in Unity and moves it in a user-selected driection.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrimitiveMover : MonoBehaviour {
public enum Shape {Box, Ball, Pill};
@donovankeith
donovankeith / Fade.cs
Created March 1, 2017 08:23
Fades light intensity Up/Down when you press the Up/Down arrow keys.
// Fade.cs
// Fades light intensity Up/Down when you press the Up/Down arrow keys.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Fade : MonoBehaviour {
// User Inputs
@donovankeith
donovankeith / MousePaint.cs
Created February 9, 2017 01:58
MousePant: A simple unity script for cloning objects as you click/drag.
// MousePaint.cs
// Paints objects when you click and drag.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MousePaint : MonoBehaviour {
public GameObject stamp;