Skip to content

Instantly share code, notes, and snippets.

View zeffii's full-sized avatar

Dealga McArdle zeffii

View GitHub Profile
def do_bix2():
obj = bpy.context.edit_object
me = obj.data
bm = bmesh.from_edit_mesh(me)
bm.verts.ensure_lookup_table()
bm.edges.ensure_lookup_table()
bm.faces.ensure_lookup_table()
bm_verts = bm.verts
bm_edges = bm.edges
import bpy
class TEXT_Cycle_TextBlocks(bpy.types.Operator):
bl_idname = "text.cycle_textblocks"
bl_label = "switch text content of current viewer"
bl_options = {'REGISTER', 'UNDO'}
direction = bpy.props.IntProperty(default=-1)
convert RENDERED_icons.png local01.miff
convert local01.miff -crop 32x32+0+0 VTX.png
convert local01.miff -crop 32x32+32+0 V2X.png
convert local01.miff -crop 32x32+64+0 XALL.png
convert local01.miff -crop 32x32+96+0 BIX.png
convert local01.miff -crop 32x32+128+0 PERP.png
convert local01.miff -crop 32x32+160+0 CCEN.png
convert local01.miff -crop 32x32+192+0 EXM.png
rm local01.miff
@zeffii
zeffii / bash_gen.py
Last active August 29, 2015 14:21 — forked from anonymous/Text.001
bash generator
def generate(from_file, x, y, filenames, type='.png'):
filenames = filenames.split()
yield "# this file is generated automatically."
yield "convert {0} local01.miff".format(from_file)
for i, filename in enumerate(filenames):
l = "convert local01.miff -crop {0}x{1}+{2}+0 {3}{4}"
yield l.format(x, y, i*x, filename, type)
yield "rm local01.miff"
@zeffii
zeffii / rsnatch.sh
Last active August 29, 2015 14:21 — forked from anonymous/rsnatch.sh
convert RENDERED_icons.png local01.miff
convert local01.miff -crop 32x32+0+0 VTX.png
convert local01.miff -crop 32x32+32+0 V2X.png
convert local01.miff -crop 32x32+64+0 XALL.png
convert local01.miff -crop 32x32+96+0 BIX.png
convert local01.miff -crop 32x32+128+0 PERP.png
convert local01.miff -crop 32x32+160+0 CCEN.png
convert local01.miff -crop 32x32+192+0 EXM.png
rm local01.miff
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
import bpy
import bmesh
from bmesh.ops import spin
import math
def lathe_geometry(bm, options, remove_doubles=True, dist=0.0001):
cent, axis, dvec, angle, steps = options
geom = bm.verts[:] + bm.edges[:]
@zeffii
zeffii / boomstick.py
Last active August 29, 2015 14:21 — forked from anonymous/boomstick.py
import bpy
import bgl
import blf
import bmesh
from mathutils import Vector, Matrix
from collections import defaultdict
import sys
from sverchok.utils import (
sv_bmesh_utils,
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
import bpy
rows = 5
columns = 5
# fp = r"C:\Gannon\Blender\Sounds\Music\Batty McFadden.mp3"
fp = "/home/zeffii/SOUND/Demo Tracks- 1999/09 After the Landing.mp3"
def spiral(X, Y):