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
# Point projection from: | |
# - https://blender.stackexchange.com/questions/16472/how-can-i-get-the-cameras-projection-matrix#answer-86570 | |
# (@fnunnari's response) | |
import bpy | |
from mathutils import Vector | |
def project_3d_point(camera: bpy.types.Object, | |
p: Vector, |
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 import * | |
C=bpy.context | |
D=bpy.data | |
def get_bone_co_pose_space(bone_name, tip_or_head): | |
"""Expects an active Armature object, and if run as main an empty object called "Empty" """ | |
name = bone_name | |
C.object.data.show_axes = 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
import bmesh | |
import bpy | |
import json | |
C = bpy.context | |
mesh = C.object.data | |
#Get faces and vertices from the current object | |
faces = [] |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>AudioMixer</title> | |
</head> | |
<body> | |
<h1>GGJ18 AUDIO MIXER</h1> | |
<audio id="maria" src="radio_maria.mp3"></audio> |
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
#---------------------------------------------------------- | |
# File bone_panel.py | |
#---------------------------------------------------------- | |
import bpy | |
# | |
# Menu in tools region | |
# see https://wiki.blender.org/index.php/Dev:Py/Scripts/Cookbook/Code_snippets/Interface | |
class ToolsPanel(bpy.types.Panel): | |
bl_label = "Pointer prop test" |
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 | |
import pandas | |
from keras.models import Sequential | |
from keras.layers import Dense | |
from keras import optimizers | |
from keras import regularizers | |
# load dataset | |
dataframe = pandas.read_csv("some_quaternions.csv", delim_whitespace=False, header=None) | |
dataset = dataframe.values |
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
a = [a for a in range(20)] | |
from random import shuffle | |
shuffle(a) | |
print a | |
#[13, 2, 4, 5, 10, 3, 0, 9, 14, 12, 8, 11, 7, 6, 15, 16, 17, 18, 1, 19] | |
lista = [[],[],[]] | |
for i,val in enumerate(a): | |
lista[i%3].append(val) | |
print lista |