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 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) |
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
#ifndef _MATHUTIL | |
#define _MATHUTIL | |
#define PI 3.141592653589793115997963468544185161590576171875 | |
inline float floorq(float v, float q) { | |
return floor(v / q) * q; | |
} | |
inline float ceilq(float v, float q) { |
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
#ifndef _BILLBOARD | |
#define _BILLBOARD | |
#include "UnityCG.cginc" | |
/* | |
About BILLBOARD_MATRIX | |
---------------------- |
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
#ifndef _COLOR | |
#define _COLOR | |
inline float3 hue2rgb(in float h) | |
{ | |
float r = abs(h * 6 - 3) - 1; | |
float g = 2 - abs(h * 6 - 2); | |
float b = 2 - abs(h * 6 - 4); | |
return saturate(float3(r, g, b)); | |
} |
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
''' | |
Simple tool for packing colors into UV maps | |
''' | |
import bpy | |
import math | |
import mathutils | |
def v2_to_float(v2, precision=4096): | |
'''Pack two 0-1 float values into a single float''' |
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() { |
NewerOlder