复制曲线并移动。
bpy.ops.curve.duplicate_move(CURVE_OT_duplicate=None, TRANSFORM_OT_translate=None)
CURVE_OT_duplicate
(CurveDuplicate
):复制曲线的选项。TRANSFORM_OT_translate
(TransformTranslate
):平移曲线的选项。{'FINISHED'}
:成功执行操作。import bpy
# 选中曲线
bpy.ops.object.select_all(action='DESELECT')
bpy.context.view_layer.objects.active = bpy.data.objects["Curve"]
bpy.data.objects["Curve"].select_set(True)
# 复制并移动曲线
bpy.ops.curve.duplicate_move()
# 取消选中曲线
bpy.data.objects["Curve.001"].select_set(False)