设置剪辑中的所有动画帧的原点。
原点是剪辑中所有动画的基准点,通常是第一帧的中心点。当您想向后或向前移动剪辑中的所有帧时,可以使用此操作。
bpy.ops.clip.set_origin(
type="CENTER", center="NONE",
frame=0, wait_for_calculate=True)
type (string, optional) - 修改原点的方式。可选值为:CENTER, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, and BOTTOM_RIGHT。默认为CENTER。
center (string, optional) - 修改中心(仅在type设置为CENTER时才会使用)。可选值为:NONE, CURSOR, SELECTED, and ORIGIN。默认为NONE。
frame (int, optional) - 设置为新原点的帧号。默认为0。
wait_for_calculate (boolean, optional) - 生成文件时是否等待计算。默认值为True。
{"FINISHED"} - 成功完成操作。
{"CANCELLED"} - 用户取消操作。
{"FAILED"} - 操作失败。
设置原点为(100,100),帧数为10:
bpy.ops.clip.set_origin(type="CENTER", center="NONE", frame=10)
设置原点为选择的尺寸,帧数为10:
bpy.ops.clip.set_origin(type="CENTER", center="SELECTED", frame=10)
设置原点为光标位置,帧数为0:
bpy.ops.clip.set_origin(type="CENTER", center="CURSOR", frame=0)
RuntimeError - 当提供的参数无效或操作失败时抛出。
ValueError - 帧数小于0时抛出。