This file contains hidden or 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 json | |
def sv_main(scale=75.0, verticals=0.005): | |
verts_out = [] | |
edges_out = [] | |
in_sockets = [ | |
['s', 'scale', scale], | |
['s', 'verticals', verticals] |
This file contains hidden or 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 json | |
def sv_main(scale=0.3): | |
verts_out = [] | |
edges_out = [] | |
in_sockets = [ | |
['s', 'scale', scale] | |
] |
This file contains hidden or 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 math | |
from math import sin, cos, pi | |
def sv_main(w=2.2, h=6.0, radius=0.3): | |
verts_out = [] | |
faces_out = [] | |
in_sockets = [ | |
['s', 'width', w], | |
['s', 'height', h], |
This file contains hidden or 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 math | |
from math import sin, cos, pi | |
def sv_main(w=2.2, h=6.0, radius=0.3): | |
verts_out = [] | |
faces_out = [] | |
in_sockets = [ | |
['s', 'width', w], | |
['s', 'height', h], |
This file contains hidden or 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
function inputs(){ | |
var obj = {}; | |
obj.r = {min: 1.0, max:100.0, default: 5.0, step: 0.1}; | |
obj.g = 14; | |
obj.b = 21; | |
return obj | |
} | |
function jazz(r, g, b){ |
This file contains hidden or 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
# 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 |
This file contains hidden or 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
def mouse_change(func): | |
def add_mouse_change(*args): | |
print('mouse wait') | |
func(*args) | |
print('mouse normal') | |
return add_mouse_change | |
@mouse_change | |
def monkey_business(a, b, c): | |
print('a={0}, b={1}, c={2}'.format(a, b, b)) |
This file contains hidden or 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
function gen_verts(r1, r2, num_verts, ramp){ | |
var tv = []; | |
var edges = []; | |
// # verts | |
for (var i=0; i<num_verts; i+=1){ | |
var tamp = i/num_verts * 14 * Math.PI; | |
var theta = i/num_verts * 2 * Math.PI; | |
var x = (Math.sin(theta)*r1) + (Math.sin(tamp) * ramp), | |
y = (Math.cos(theta)*r2) + (Math.cos(tamp) * ramp), |
This file contains hidden or 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
function gen_verts(r1, r2, num_verts, ramp){ | |
var tv = []; | |
var edges = []; | |
// # verts | |
for (var i=0; i<num_verts; i+=1){ | |
var tamp = i/num_verts * 14 * Math.PI; | |
var theta = i/num_verts * 2 * Math.PI; | |
var x = (Math.sin(theta)*r1) + (Math.sin(tamp) * ramp), | |
y = (Math.cos(theta)*r2) + (Math.cos(tamp) * ramp), |
This file contains hidden or 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
# lookup sidechain parents | |
def bondLookUp(atom, amac): | |
if atom in {"O", "OXT"}: | |
parent = ["C", C] | |
elif atom in {"CB", "HA", "HA2", "HA3"}: | |
parent = ["CA", C] | |
elif (atom == "SG" or "HB" in atom or "OG" in atom or "CG" in atom): | |
parent = ["CB", C] |