I have created a function. I relies on the scene module to make label nodes. My question is what all can I get rid of in the script if anything. Where should it be save( I pretty sure the folder for the project. Or in a directory if I would like to use it anywhere... I’m not sure how or which directory though. And any other advice you have on creating, saving, importing module and writing a better function is welcomed.
from scene import *
class MyScene (Scene):
def layered_text(self, name, text, font, size, x, y, x_offset, y_offset, *colors, **kwargs):
i = 0
colors = [*colors]
for c in range(len(colors)):
name = LabelNode(
text,
font = (font, size),
position = (x, y),
color = colors[i],
parent=self,
)
x += x_offset
y += y_offset
i += 1