Skip to content

Instantly share code, notes, and snippets.

@5agado
Last active February 15, 2021 08:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save 5agado/2956ade2fe5db5d5f1c174d062d5c464 to your computer and use it in GitHub Desktop.
Save 5agado/2956ade2fe5db5d5f1c174d062d5c464 to your computer and use it in GitHub Desktop.
Snippets for Grease Pencil Scripting Post
import bpy
NUM_FRAMES = 30
FRAMES_SPACING = 1 # distance between frames
bpy.context.scene.frame_start = 0
bpy.context.scene.frame_end = NUM_FRAMES*FRAMES_SPACING
for frame in range(NUM_FRAMES):
gp_frame = gp_layer.frames.new(frame*FRAMES_SPACING)
# do something with your frame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment