将当前剪贴板中的数据粘贴到当前的笔划对象,此操作会替换掉当前笔划对象中选中的笔画数据。
location
:粘贴的位置,默认为 (0,0,0)
。mode
:粘贴的方式,默认为 REPLACE
。{'FINISHED'}
:操作执行成功。{'CANCELLED'}
:操作执行失败或取消。将剪贴板中的笔划数据粘贴到当前选中的笔划对象中:
import bpy
# 选择第一个笔划对象
bpy.context.scene.grease_pencil = bpy.context.scene.grease_pencils[0]
# 在(x=1, y=1, z=0)的位置粘贴剪贴板中的笔划数据
bpy.ops.gpencil.paste(location=(1, 1, 0))