BlenderPythonRecipes
BlenderPythonRecipes copied to clipboard
curated snippets for bpy (mostly for Blender <= 2.79 ), some changes are needed to maintain compatibility with 2.8+
convert an array of 2d vectors to 3d vectors. see: https://stackoverflow.com/questions/36878089/python-add-a-column-to-numpy-2d-array ```python import numpy as np array_2dvec = np.array([ [x1, y1], [x2, y2], [x3, y3] ]) array_3dvec = np.hstack( (array_2dvec,...
A lot of this stuff is not entirely compatible with Blender 2.8+ bpy API. Mostly things covered in these wiki pages will need subtle adjustments to work in 2.8+. The...
```python """ in verts_in v in floats_in s in order s d=3 n=2 out verts_out v out floats_out s """ def process_component(data, order): order = order // 2 fdata =...
this works.. but i sense that it is not wise. ```c #include #include void hello_world() { printf("Hello World!"); } int* multiplyArray(int, int*); int* multiplyArray(int aSize, int* arr){ int i; int...
hello_world.c ```c #include void hello_world() { printf("Hello World!"); } int main() { return 0; } ``` ```python import ctypes path = "C:\\Users\\zeffi\\compiles\\hello.so" lib = ctypes.cdll.LoadLibrary(path) lib.hello_world() """ gcc -c hello_world.c...

