So I would like to draw some high constrast strokes, for example, a black stroke with itself having a white outline stroke. A stroke stroke, so to speak.
In practice, this white outline would actually be a thicker stroke on a lower layer. To do this you need to duplicate the black layer, move it to a lower layer, change the colour to white, and increase the thickness. Of course every time you update the black layer, you need to do all that again.
I’m looking to do this faster, so I’ve decided to write a small script so it can be done with the press of a button. Using Python I want to duplicate the layer of the black stroke without using operators, as is good practice.
Usually you’d use a
.copy() method, but there isn’t one for layers.
So how to copy or duplicate a grease pencil layer in Python without using operators?