snnib.blender.utils.mesh_utils.add_spline2data

snnib.blender.utils.mesh_utils.add_spline2data(data: bpy.types.Curve, coords: List[List[float]], scale: List[float] | float = 1.0, handle_type: List[str] | str = 'AUTO') bpy.types.Spline[source]

adds a new (bezier) spline with vertices at coords to data

Parameters
  • data
    • bpy.types.Curve

    • curve object to add a spline to

  • coords
    • List[List[float]]

    • coordinates of the vertices defining the new spline

  • scale
    • List[float], float, optional

    • scale to apply to the vertices’ handles

    • if float
      • applied to all handles

    • the default is 1.0

  • handle_type
    • List[str], str, optional

    • handle type to use for each of the generated vertices

    • if str
      • applied to all handles

    • the default is ‘AUTO’

Raises

Returns
  • spline
    • bpy.types.Spline

    • generated spline

Dependencies
  • bpy

  • logging

  • numpy

  • typing