Skip to content

Instantly share code, notes, and snippets.

View add_mesh_spiral_thingy.py
bl_info = {
"name": "Spiral Mesh",
"author": "batFINGER",
"version": (1, 0),
"blender": (2, 80, 0),
"location": "View3D > Add > Mesh > Spiral Mesh",
"description": "Adds a Spiral Thingy",
"warning": "",
"wiki_url": "",
"category": "Add Mesh",
View mesh_origin_to_selected.py
bl_info = {
"name": "Set mesh origin to selected geometry",
"author": "batFINGER",
"version": (1, 0),
"blender": (2, 80, 0),
"description": "Set mesh origin to selected geometry",
"warning": "",
"wiki_url": "",
"category": "Add Mesh",
}
View osm_road_stroke.py
import bpy
from bpy import context
from mathutils import Vector
import bmesh
up = Vector((0, 0, 1)) # z axis
north = Vector((0, 1, 0)) # y axis
def stroke(bm, v, n, w):
v1 = bm.verts.new(v + w / 2 * n)
View uv_mercator_project.py
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",
@batFINGER
batFINGER / __init__.py
Created Dec 13, 2016
C3D addon with modal "animation" operator removed
View __init__.py
# ##### 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
View fold_triangular_corners.py
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 / process_files.py
Created Nov 24, 2016
Process multi files (ImportHelper) in blender.
View process_files.py
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
View drop_to_ground.py
# ##### 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 / add_mesh_sphere_torus_space.py
Last active Jan 2, 2021
Spaces Spherical, Torus, Cylindrical
View add_mesh_sphere_torus_space.py
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",
@batFINGER
batFINGER / import_osm.py
Created Sep 8, 2016
Blender GEO OSM import tweak
View import_osm.py
# 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)",