This file contains 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 | |
# XXX these don't work yet ... | |
#from bpy_types import NodeTree, Node, NodeSocket | |
# Implementation of custom nodes from Python | |
# Shortcut for node type menu | |
def add_nodetype(layout, type): | |
print(dir(type)) |
This file contains 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
#ifndef INCLUDED_QJSON_H | |
#define INCLUDED_QJSON_H | |
#include <string> | |
#include <vector> | |
#include <map> | |
#include <stdexcept> | |
#include <memory> | |
#include <algorithm> | |
#include <istream> |
This file contains 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
bl_info = { | |
"name": "FILL ME MO", | |
"author": "", | |
"version": (0, 1), | |
"blender": (2, 7, 6), | |
"category": "3D View" | |
} | |
import os | |
import bpy |
This file contains 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 | |
from mathutils.geometry import interpolate_bezier | |
def get_points(spline, clean=True): | |
knots = spline.bezier_points | |
if len(knots) < 2: | |
return |
This file contains 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
{ | |
"export_version": "0.079", | |
"framed_nodes": {}, | |
"groups": {}, | |
"nodes": { | |
"Bezier Spline (Curve)": { | |
"bl_idname": "SvBezierSplineNode", | |
"custom_socket_props": { | |
"0": { | |
"expanded": true, |
This file contains 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
// doesn't matter what size, we're using a different | |
// part of the array, the "associative" part | |
me.dir() + "/audio/" => string path; | |
["kick_01", "click_01", "click_02" | |
] @=> string sample_list[]; | |
// doesn't matter what size as long as it's 0 or more. | |
// If you only want an array of object references use @: |
This file contains 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
{ | |
"export_version": "0.079", | |
"framed_nodes": {}, | |
"groups": {}, | |
"nodes": { | |
"A Number": { | |
"bl_idname": "SvNumberNode", | |
"height": 100.0, | |
"hide": false, | |
"label": "", |
This file contains 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
{ | |
"export_version": "0.079", | |
"framed_nodes": {}, | |
"groups": {}, | |
"nodes": { | |
"Extrude Region": { | |
"bl_idname": "SvExtrudeRegionNode", | |
"height": 100.0, | |
"hide": false, | |
"label": "", |
This file contains 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 numpy as np | |
import math | |
from math import fabs | |
def sv_main(contour_res=10, num_slices=1, scale=20): | |
in_sockets = [ | |
['s', 'contour_res', contour_res], | |
['s', 'num_slices', num_slices], | |
['s', 'scale', scale]] |
This file contains 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 | |
dfile = r"C:\Users\dealga\Desktop\Archive\SU8606_DSM_1M.asc" | |
getval = lambda i: next(i).split()[1] | |
with open(dfile) as ofile: | |
ncols = getval(ofile) | |
nrows = getval(ofile) | |
xllcorner = getval(ofile) |