将图片加载到grease pencil图层,并在上面绘制矢量线。
bpy.ops.gpencil.trace_image(filepath="", frame_start=1, frame_end=1, frame_step=1, layer="", thickness=1.0, use_antialiasing=True, use_negative=False, noise=0.0, threshold=0.1, black_threshold=0.1, uv_layer="", normalize=True, force_even_number=False)
filepath (string, optional) – 图片的完整路径。如果未指定,将使用当前打开的文件frame_start (int, optional) – 开始帧。默认为1frame_end (int, optional) – 结束帧。默认为1layer (string, optional) – 图层名称。如果未指定,将使用当前活动的图层。thickness (float, optional) – 绘制笔刷的宽度。默认为1.0。use_antialiasing (boolean, optional) – 是否使用抗锯齿。默认为True。use_negative (boolean, optional) – 是否使用反色。默认为False。noise (float, optional) – 添加噪声的强度。默认为0.0。threshold (float, optional) – 二值化的门限。默认为0.1。black_threshold (float, optional) – 黑色的二值化门限。默认为0.1。uv_layer (string, optional) – UV图层名称。如果未指定,则使用当前UV图层。normalize (boolean, optional) – 是否规范化图像。默认为True。force_even_number (boolean, optional) – 图像分辨率是否强制到偶数。默认为False。