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
float[][] distances; | |
float maxDistance; | |
int spacer; | |
Trigger[] triggers; | |
int value = 0; | |
void setup() { | |
size(640, 360); | |
frameRate(32); |
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 | |
import bgl | |
from bpy_extras.view3d_utils import location_3d_to_region_2d as loc3d2d | |
# (...) | |
def draw_points(context, points, size, gl_col): | |
""" | |
input | |
- context: bpy.context ( a 3d view ) |
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
float[][] distances; | |
float maxDistance; | |
int spacer; | |
Trigger[][] triggers; | |
int value = 0; | |
int triggers_cols = 8; | |
int triggers_rows = 3; | |
void setup() { |
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
float[][] distances; | |
float maxDistance; | |
int spacer; | |
Trigger[][] triggers; | |
int value = 0; | |
int triggers_cols = 8; | |
int triggers_rows = 3; | |
void setup() { |
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
bla = "qweronoquenr\n2424onounwerwer342342\nerw523535\n3534" | |
find_index_of_last = (instr, token) -> | |
return null if not (token in instr) | |
idx_shift = -1 | |
while true | |
fd = instr.indexOf(token, idx_shift+1) | |
if fd == -1 |
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
solidify = obj.modifiers.new(type='SOLIDIFY', name="make_solid") | |
solidify.thickness = -0.02 |
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
class nozem | |
constructor: (@var1="def", @var2="def2") -> | |
# yep, can be empty! | |
some_class_func: -> | |
[@var1, @var2] # will return this array | |
some_class_func2: (arg1, arg2) -> | |
@some_class_func() #class methods |
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
>>> C.active_object.material_slots['Material.001'].link | |
'OBJECT' |
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 | |
import re | |
from urllib.request import urlopen | |
def create_obj_from_name(location="568003-Code-View-P001"): | |
''' | |
input: location string in format similar to default value | |
output: adds object to scene if success. | |
''' |
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 | |
def create_obj_from_name(): | |
''' | |
input: location string in format similar to default value | |
output: adds object to scene if success. | |
''' | |
bpy.context.scene.render.engine = 'CYCLES' | |
cols = [ | |
(0.11764, 0.14117, 0.14901, 1.0), |
OlderNewer