移动图层掩码
bpy.ops.gpencil.layer_mask_move(axis=(0, 0, 0), mode='RELATIVE')
axis
(Vector):
移动的向量mode
(str):
移动模式,包括:ABSOLUTE
(绝对) 或 RELATIVE
(相对){'FINISHED'}
import bpy
# 选中当前的画笔对象
bpy.context.scene.objects.active = bpy.data.objects['GPencil Object']
# 选中第一个图层
bpy.data.objects['GPencil Object'].layers[0].select = True
# 移动图层掩码
bpy.ops.gpencil.layer_mask_move(axis=(0, 1, 0), mode='RELATIVE')
RuntimeError
: 如果图层对象不被选中,则会引发异常