Skip to content

Instantly share code, notes, and snippets.

View zeffii's full-sized avatar

Dealga McArdle zeffii

View GitHub Profile
@zeffii
zeffii / MLP_mod.py
Created February 25, 2015 19:17 — forked from anonymous/MLP_mod.py
# kdArrange v.003
import bmesh
import bpy
import mathutils
from collections import defaultdict
from BioBlender.table_values import values_fi
nstr = '_4GE.001'
@zeffii
zeffii / testing kdtree.py
Last active August 29, 2015 14:16 — forked from anonymous/Text
interim code
# kdArrange v.003
import bmesh
import bpy
import mathutils
from collections import defaultdict
from BioBlender.table_values import values_fi
nstr = '_4GE.001'
@zeffii
zeffii / MLP_mod.py
Last active August 29, 2015 14:16 — forked from anonymous/MLP_mod.py
# kdArrange v.003
import bmesh
import bpy
from collections import defaultdict
from BioBlender.table_values import values_fi
nstr = '_4GE.001'
surface_obj_name = ''
@zeffii
zeffii / MLP_mod.py
Created February 24, 2015 22:29 — forked from anonymous/MLP_mod.py
# kdArrange
import bpy
from collections import defaultdict
from BioBlender.table_values import values_fi
'''
[x] step 01: first store atoms as {element_name: [co,..], }
[ ] step 02: generate singular ordered mesh by adding vertices
@zeffii
zeffii / MLP_mod.py
Created February 24, 2015 20:38 — forked from anonymous/MLP_mod.py
# kdArrange
import bpy
from collections import defaultdict
from BioBlender.table_values import values_fi
'''
[x] step 01: first store atoms as {element_name: [co,..], }
[ ] step 02: generate singular ordered mesh by adding vertices
@zeffii
zeffii / MLP_mod.py
Last active August 29, 2015 14:16 — forked from anonymous/MLP_mod.py
# kdArrange
import bpy
from collections import defaultdict
'''
[x] step 01: first store atoms as {element_name: [co,..], }
[ ] step 02: generate singular ordered mesh by adding vertices
in clumps of element types. (H,H,H,H,H,H,O,O,O,O,O,O..)
@zeffii
zeffii / MLP_mod.py
Last active August 29, 2015 14:16 — forked from anonymous/MLP_mod.py
# kdArrange
import bpy
from collections import defaultdict
'''
[x] step 01: first store atoms as {element_name: [co,..], }
[ ] step 02: generate singular ordered mesh by adding vertices
in clumps of element types. (H,H,H,H,H,H,O,O,O,O,O,O..)
@zeffii
zeffii / perhaps.py
Created February 23, 2015 14:42 — forked from anonymous/perhaps.py
import bpy
import bmesh
obj = bpy.context.edit_object
me = obj.data
bm = bmesh.from_edit_mesh(me)
# bmesh.ops.recalc_face_normals(bm, faces=bm.faces[:])
bm.normal_update()
# ##### 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 json
def sv_main(scale=75.0, verticals=0.005):
verts_out = []
widths_out = []
in_sockets = [
['s', 'scale', scale],
['s', 'verticals', verticals]