添加 NURBS 曲线路径的操作。
align: 对齐模式。可选:'WORLD', 'VIEW', 'CURSOR'。location: 位置 (float[3])rotation: 旋转 (float[3])size: 大小 (float)enter_editmode: 是否进入编辑模式 (boolean)radius: 半径 (float)taper_object: 收缩物 (Object)taper_curve: 收缩曲线 (Curve)taper_radius: 收缩半径 (float)twist_object: 扭曲物 (Object)twist_curve: 扭曲曲线 (Curve)twist_radius: 扭曲半径 (float)use_fill_caps: 是否填充盖 (boolean)use_path: 是否使用路径 (boolean)use_stretch: 是否拉伸 (boolean)use_deform_bounds: 是否修改范围 (boolean)use_endpoints_u: 是否端点 U (boolean)use_endpoints_v: 是否端点 V (boolean)endpoint_u: 端点 U (float)endpoint_v: 端点 V (float){'FINISHED'}: 操作完成import bpy
from mathutils import Vector
# 设置位置和大小
location = Vector((1.0, 1.0, 1.0))
size = 2.0
# 添加 NURBS 路径
bpy.ops.curve.primitive_nurbs_path_add(location=location, size=size)
# 进入编辑模式
bpy.ops.object.editmode_toggle()