Each layer gets one drawing on the scene’s current frame, holding its strokes. The drawing is only shown from that frame onwards, so a layer created on frame 10 has no drawing on frame 1. A layer with no strokes gets an empty drawing.
The layers to create, mapping each layer’s name to the positions of its points with shape (N, 3) and the number of points in each stroke. If None, creates an empty grease pencil object. Defaults to None.
If the positions of a layer don’t have shape (N, 3), a stroke has fewer than 1 point, or the stroke sizes of a layer don’t add up to the number of its positions. Every layer is checked before anything is created.
Examples
import numpy as npfrom databpy import create_grease_pencil_object# Create two layers, with 2 strokes and 1 strokegp_obj = create_grease_pencil_object( {"Lines": (np.random.random((7, 3)), [3, 4]),"Outline": (np.random.random((5, 3)), [5]), })