Skip to content

Instantly share code, notes, and snippets.

View johnfredcee's full-sized avatar
🚀
On an intergalactic cruise

John Connors johnfredcee

🚀
On an intergalactic cruise
View GitHub Profile
@johnfredcee
johnfredcee / dump_sexp.py
Created October 12, 2011 10:51
Blender Sexp Exporter
bl_info = {
"name": "Dump Sexp (.lisp)",
"author": "John Connors (ZabaQ)",
"version": (0, 7),
"blender": (2, 5, 4),
"api": 33047,
"location": "File > Export",
"description": "Dump Blender Data To Sexp (.lisp)",
"warning": "",
@johnfredcee
johnfredcee / dump_sexp.py
Created October 12, 2011 11:27
Better Blender Sexp Exporter
bl_info = {
"name": "Dump Sexp (.lisp)",
"author": "John Connors (ZabaQ)",
"version": (0, 7),
"blender": (2, 5, 4),
"api": 33047,
"location": "File > Export",
"description": "Dump Blender Data To Sexp (.lisp)",
"warning": "",
@johnfredcee
johnfredcee / LispObj.h
Created November 15, 2011 12:31
Base Lisp Polymorphic object code
#ifndef H_LISP_OBJ
#define H_LISP_OBJ
#include <cassert>
#include <ostream>
#include <vector>
#include <map>
#include <string>
#include <algorithm>
@johnfredcee
johnfredcee / io_export_lua.py
Created December 2, 2011 11:43
Dump Blender Scene as Lua via Introspection
bl_info = {
"name": "Export Scene as Lua (.lua)",
"author": "John Connors (ZabaQ)",
"version": (0, 7),
"blender": (2, 5, 4),
"api": 33047,
"location": "File > Export",
"description": "Blender Scene To Lua (.lua)",
"warning": "",
@johnfredcee
johnfredcee / make_tags.py
Created December 29, 2011 14:53
Top Level Tag File Scanner
#!/usr/bin/python
import os
import tempfile
import shlex
import subprocess
import sys
def is_source(file, suffixes):
return os.path.isfile(file) and (os.path.splitext(file)[1] in suffixes)
@johnfredcee
johnfredcee / bvh_read.py
Created March 9, 2012 16:57
bvh file parser (tested w Python2.6)
import re
bvh_file = "Example1.bvh"
def identifier(scanner, token): return "IDENT", token
def operator(scanner, token): return "OPERATOR", token
def digit(scanner, token): return "DIGIT", token
def open_brace(scanner, token): return "OPEN_BRACE", token
def close_brace(scanner, token): return "CLOSE_BRACE", token
@johnfredcee
johnfredcee / gist:2483379
Created April 24, 2012 20:22
SConstruct file for working with flymake.
import os
import tempfile
import shlex
import subprocess
import sys
vars = Variables()
vars.Add(BoolVariable('SYNTAX', 'Set to 1 for a syntax check',0))
vars.Add(BoolVariable('DUMPENV', 'Set to 1 to dump environment',0))
@johnfredcee
johnfredcee / gist:2483457
Created April 24, 2012 20:27
Flymake SCons support
(defun flymake-get-scons-cmdline (source base-dir)
(list "scons"
(list "-suC"
(expand-file-name base-dir)
"SYNTAX=1"
(concat (file-name-sans-extension source) ".o"))))
(defun flymake-master-scons-init (get-incl-dirs-f master-file-masks include-regexp)
"Create make command line for a source file checked via master file compilation."
(let* ((make-args nil)
@johnfredcee
johnfredcee / unreal-flymake.el
Created July 28, 2012 14:11
Flymake for Unrealscript
(defcustom udk-location "C:\\UDK\\UDK-2012-05\\"
"Directory where udk executables are found"
:type 'directory
:group 'udk)
(defun flymake-unrealscript-init ()
(setq flymake-base-dir udk-location)
(list (concat udk-location "\\Binaries\\Win32\\UDK.com") '("make" "-debug")))
(defun flymake-unrealscript-cleanup ()
@johnfredcee
johnfredcee / fbxcube.py
Created October 29, 2012 18:05
FBX Python SDK sample cube and cylinder
import fbx
import sys
import math
###############################################################
# Helper Function(s). #
###############################################################
def makeMaterial( pScene, materialName, **kwargs ):
global fbxManager