Skip to content

Instantly share code, notes, and snippets.

View abdev's full-sized avatar

Anda B. abdev

View GitHub Profile
@jmpinit
jmpinit / blender_grease_pencil_drawing.py
Created September 22, 2019 21:48
Starting point for using Python to draw with the Grease Pencil in Blender 2.8.
# https://towardsdatascience.com/blender-2-8-grease-pencil-scripting-and-generative-art-cbbfd3967590
import bpy
import math
import numpy as np
def get_grease_pencil(gpencil_obj_name='GPencil') -> bpy.types.GreasePencil:
"""
Return the grease-pencil object with the given name. Initialize one if not already present.
:param gpencil_obj_name: name/key of the grease pencil object in the scene