Skip to content

Instantly share code, notes, and snippets.

@batFINGER
batFINGER / spherical_fibonacci.py
Created August 15, 2016 17:33
Spherical Fibonacci Coordinates
import bpy
from numpy import (sum, dot, inf, log, sin, cos, pi,
arccos, arctan2, floor, sqrt, trunc,
)
from mathutils import Vector, Matrix
import bmesh
from bpy import context
PHI = (1 + sqrt(5)) / 2 # golden ratio
@batFINGER
batFINGER / __init__.py
Last active July 6, 2019 15:14
"addon submodules"
bl_info = {
"name": "Example Addon Preferences",
"author": "Your Name Here",
"version": (1, 0),
"blender": (2, 65, 0),
"location": "SpaceBar Search -> Addon Preferences Example",
"description": "Example Addon",
"warning": "",
"wiki_url": "",
"tracker_url": "",
@batFINGER
batFINGER / blurb.md
Last active September 4, 2016 15:08
Sound Drivers major preferences update

Added adhoc module register support for sound drivers

@batFINGER
batFINGER / import_osm.py
Created September 8, 2016 17:54
Blender GEO OSM import tweak
# This is the release version of the plugin file io_import_scene_osm_dev.py
# If you would like to make edits, make them in the file io_import_scene_osm_dev.py and the other related modules
# To create the release version of io_import_scene_osm_dev.py, execute:
# python plugin_builder.py io_import_scene_osm_dev.py
bl_info = {
"name": "Import OpenStreetMap (.osm)",
"author": "Vladimir Elistratov <vladimir.elistratov@gmail.com> and gtoonstra",
"version": (1, 1, 0),
"blender": (2, 7, 4),
"location": "File > Import > OpenStreetMap (.osm)",
@batFINGER
batFINGER / add_mesh_sphere_torus_space.py
Last active January 2, 2021 11:10
Spaces Spherical, Torus, Cylindrical
bl_info = {
"name": "Math Surface Shape",
"author": "batFINGER",
"version": (1, 0),
"blender": (2, 78, 0), # and most prior
"location": "View3D > Add > Mesh > New Object",
"description": "Adds a new Mesh Object",
"warning": "",
"wiki_url": "",
"category": "Add Mesh",
# ##### 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
@batFINGER
batFINGER / process_files.py
Created November 24, 2016 13:05
Process multi files (ImportHelper) in blender.
import bpy
def process_files(context, directory, files):
import os
for file in files:
path = os.path.join(directory, file.name)
print("process %s" % path)
return {'FINISHED'}
# ImportHelper is a helper class, defines filename and
@batFINGER
batFINGER / fold_triangular_corners.py
Created December 10, 2016 19:01
Fold triangular corners
import bpy
import bmesh
from bpy.props import FloatProperty
from math import radians
from mathutils.geometry import intersect_point_line
from mathutils import Matrix
class BMeshTriangularFold(bpy.types.Operator):
"""Fold Triangle on edge"""
@batFINGER
batFINGER / __init__.py
Created December 13, 2016 01:25
C3D addon with modal "animation" operator removed
# ##### 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 3
# 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
@batFINGER
batFINGER / uv_mercator_project.py
Created September 6, 2017 21:57
Mercator UV Projection
bl_info = {
"name": "Mercator Project",
"author": "batFINGER",
"version": (1, 0),
"blender": (2, 79, 0),
"location": "View3D > Mesh > UV UnWrap > Mercator Project",
"description": "UV Mercator Projection",
"warning": "",
"wiki_url": "",
"category": "UV",