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 os | |
import sys | |
import bpy | |
output = None | |
input = None | |
info = None | |
error = None | |
write = None |
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
using UnityEditor; | |
using UnityEngine; | |
[CustomEditor(typeof(MeshFilter))] | |
public class MeshInfo : Editor { | |
protected MeshFilter meshFilter; | |
protected Mesh mesh; | |
protected Vector3[] lines; | |
public void OnEnable() { |
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 exporter just serializes Blender's bpy curve data API verbatim, | |
# so the exported json structure mirrors the variable names and | |
# arrays. The exporter only goes so far to export the U-component of | |
# the curve data, since we're more interested in curves and not NURBS | |
# surfaces for use in videogames. An asset importer in Unity need only | |
# look up the Blender Python API to choose how to interpret this data. | |
import bpy | |
import json | |
from bpy_extras.io_utils import ExportHelper |
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 os | |
import bpy | |
bl_info = { | |
'name': 'Unity Lines (.js)', | |
'author': 'Tamas Kemenczy', | |
'version': (0, 1), | |
'blender': (2, 6, 3), | |
'location': 'File > Import-Export > Unity Lines (.js)', | |
'description': 'Export loose edges of a mesh as Unity GL immediate-mode commands', |
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
function qsort(a, k, l, r) { | |
// a: array to sort, k: key to sort by, | |
// l, r: optional array index array range | |
// i: stack index, s: stack, | |
// p: pivot index, v: pivot value, | |
// t: temporary array item, | |
// x, y: partion low/high | |
var i, s, p, v, t, x, y; |
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 bpy | |
from mathutils import Color | |
bl_info = { | |
'name': 'Select By Color', | |
'author': 'Tamas Kemenczy', | |
'version': (0, 1), | |
'blender': (2, 6, 1), | |
'location': 'View3D > Specials > Select By Color', | |
'description': 'Select all faces with the same vertex color of the selected face', |
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 bpy | |
import curve_simplify | |
bl_info = { | |
'name': 'Simplify Action', | |
'author': 'Tamas Kemenczy', | |
'version': (0, 1), | |
'blender': (2, 91, 0), | |
'description': 'Use Simplify F-Curves on any action visible in the graph editor.', | |
'category': 'Add Curve', |
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
#!/usr/bin/env python | |
# HEIC image conversion depends on the heif-convert cmd utility, | |
# available through the `libheif-examples` package on Ubuntu, for example. | |
import os | |
import glob | |
import argparse | |
import datetime | |
import shutil |
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 os | |
import bpy | |
import math | |
import mathutils | |
bl_info = { | |
'name': 'Export SVG Lines (.svg)', | |
'author': 'Tamas Kemenczy', | |
'version': (0, 1), | |
'blender': (2, 6, 9), |
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 bpy | |
import bmesh | |
NAME = '(Plot)' | |
def line(gen, name=NAME): | |
"""Plot arbitrary x,y values as line""" | |
with Plotter(name) as p: | |
for x, y in gen: | |
p.extend(x, y) |
NewerOlder