fake-bpy-module 20241103__py3-none-any.whl → 20241112__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of fake-bpy-module might be problematic. Click here for more details.

Files changed (57) hide show
  1. addon_utils/__init__.pyi +28 -13
  2. bl_console_utils/autocomplete/complete_calltip/__init__.pyi +1 -2
  3. bl_console_utils/autocomplete/complete_import/__init__.pyi +3 -6
  4. bl_console_utils/autocomplete/complete_namespace/__init__.pyi +1 -2
  5. bl_console_utils/autocomplete/intellisense/__init__.pyi +2 -6
  6. bl_operators/image_as_planes/__init__.pyi +12 -39
  7. bl_operators/uvcalc_transform/__init__.pyi +4 -42
  8. bl_operators/wm/__init__.pyi +8 -0
  9. bl_ui/generic_ui_list/__init__.pyi +2 -1
  10. bl_ui/properties_grease_pencil_common/__init__.pyi +0 -7
  11. bl_ui/space_userpref/__init__.pyi +2 -2
  12. blf/__init__.pyi +3 -5
  13. bmesh/types/__init__.pyi +22 -33
  14. bmesh/utils/__init__.pyi +6 -16
  15. bpy/app/icons/__init__.pyi +5 -11
  16. bpy/app/translations/__init__.pyi +7 -14
  17. bpy/msgbus/__init__.pyi +7 -8
  18. bpy/ops/curves/__init__.pyi +16 -0
  19. bpy/ops/nla/__init__.pyi +1 -1
  20. bpy/ops/sequencer/__init__.pyi +3 -0
  21. bpy/path/__init__.pyi +6 -16
  22. bpy/props/__init__.pyi +122 -135
  23. bpy/types/__init__.pyi +418 -615
  24. bpy/typing/__init__.pyi +1 -1
  25. bpy/utils/__init__.pyi +30 -29
  26. bpy/utils/previews/__init__.pyi +1 -2
  27. bpy/utils/units/__init__.pyi +1 -2
  28. bpy_extras/anim_utils/__init__.pyi +5 -12
  29. bpy_extras/bmesh_utils/__init__.pyi +1 -2
  30. bpy_extras/image_utils/__init__.pyi +2 -5
  31. bpy_extras/io_utils/__init__.pyi +8 -14
  32. bpy_extras/mesh_utils/__init__.pyi +14 -29
  33. bpy_extras/object_utils/__init__.pyi +1 -1
  34. bpy_extras/view3d_utils/__init__.pyi +3 -10
  35. {fake_bpy_module-20241103.dist-info → fake_bpy_module-20241112.dist-info}/METADATA +1 -1
  36. {fake_bpy_module-20241103.dist-info → fake_bpy_module-20241112.dist-info}/RECORD +57 -57
  37. {fake_bpy_module-20241103.dist-info → fake_bpy_module-20241112.dist-info}/WHEEL +1 -1
  38. freestyle/chainingiterators/__init__.pyi +2 -7
  39. freestyle/functions/__init__.pyi +4 -16
  40. freestyle/types/__init__.pyi +29 -63
  41. freestyle/utils/ContextFunctions/__init__.pyi +2 -2
  42. freestyle/utils/__init__.pyi +1 -2
  43. gpu/__init__.pyi +19 -5
  44. gpu/matrix/__init__.pyi +2 -2
  45. gpu/state/__init__.pyi +16 -8
  46. gpu/types/__init__.pyi +14 -29
  47. gpu_extras/batch/__init__.pyi +9 -9
  48. gpu_extras/presets/__init__.pyi +4 -11
  49. idprop/types/__init__.pyi +1 -2
  50. imbuf/__init__.pyi +2 -4
  51. mathutils/__init__.pyi +30 -95
  52. mathutils/bvhtree/__init__.pyi +13 -17
  53. mathutils/geometry/__init__.pyi +26 -45
  54. mathutils/interpolate/__init__.pyi +2 -2
  55. mathutils/kdtree/__init__.pyi +13 -28
  56. rna_info/__init__.pyi +1 -2
  57. {fake_bpy_module-20241103.dist-info → fake_bpy_module-20241112.dist-info}/top_level.txt +0 -0
mathutils/__init__.pyi CHANGED
@@ -422,18 +422,10 @@ class Euler:
422
422
  :param other:
423
423
  """
424
424
 
425
- def rotate(
426
- self,
427
- other: Matrix
428
- | Quaternion
429
- | collections.abc.Sequence[collections.abc.Sequence[float]]
430
- | collections.abc.Sequence[float]
431
- | typing_extensions.Self,
432
- ):
425
+ def rotate(self, other):
433
426
  """Rotates the euler by another mathutils value.
434
427
 
435
428
  :param other: rotation component of mathutils value
436
- :type other: Matrix | Quaternion | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[float] | typing_extensions.Self
437
429
  """
438
430
 
439
431
  def rotate_axis(self, axis: str, angle: float):
@@ -620,35 +612,24 @@ class Matrix:
620
612
  """
621
613
 
622
614
  @classmethod
623
- def LocRotScale(
624
- cls,
625
- location: Vector | collections.abc.Sequence[float] | None,
626
- rotation: Euler | Quaternion | collections.abc.Sequence[float] | None,
627
- scale: Vector | collections.abc.Sequence[float] | None,
628
- ) -> typing_extensions.Self:
615
+ def LocRotScale(cls, location, rotation, scale) -> typing_extensions.Self:
629
616
  """Create a matrix combining translation, rotation and scale,
630
617
  acting as the inverse of the decompose() method.Any of the inputs may be replaced with None if not needed.
631
618
 
632
619
  :param location: The translation component.
633
- :type location: Vector | collections.abc.Sequence[float] | None
634
- :param rotation: The rotation component.
635
- :type rotation: Euler | Quaternion | collections.abc.Sequence[float] | None
620
+ :param rotation: The rotation component as a 3x3 matrix, quaternion, euler or None for no rotation.
636
621
  :param scale: The scale component.
637
- :type scale: Vector | collections.abc.Sequence[float] | None
638
- :return: Combined transformation matrix.
622
+ :return: Combined transformation as a 4x4 matrix.
639
623
  :rtype: typing_extensions.Self
640
624
  """
641
625
 
642
626
  @classmethod
643
- def OrthoProjection(
644
- cls, axis: Vector | collections.abc.Sequence[float] | str, size: int
645
- ) -> typing_extensions.Self:
627
+ def OrthoProjection(cls, axis, size: int) -> typing_extensions.Self:
646
628
  """Create a matrix to represent an orthographic projection.
647
629
 
648
630
  :param axis: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],
649
631
  where a single axis is for a 2D matrix.
650
632
  Or a vector for an arbitrary axis
651
- :type axis: Vector | collections.abc.Sequence[float] | str
652
633
  :param size: The size of the projection matrix to construct [2, 4].
653
634
  :type size: int
654
635
  :return: A new projection matrix.
@@ -656,12 +637,7 @@ class Matrix:
656
637
  """
657
638
 
658
639
  @classmethod
659
- def Rotation(
660
- cls,
661
- angle: float,
662
- size: int,
663
- axis: Vector | collections.abc.Sequence[float] | str | None = "",
664
- ) -> typing_extensions.Self:
640
+ def Rotation(cls, angle: float, size: int, axis) -> typing_extensions.Self:
665
641
  """Create a matrix representing a rotation.
666
642
 
667
643
  :param angle: The angle of rotation desired, in radians.
@@ -670,7 +646,6 @@ class Matrix:
670
646
  :type size: int
671
647
  :param axis: a string in ['X', 'Y', 'Z'] or a 3D Vector Object
672
648
  (optional when size is 2).
673
- :type axis: Vector | collections.abc.Sequence[float] | str | None
674
649
  :return: A new rotation matrix.
675
650
  :rtype: typing_extensions.Self
676
651
  """
@@ -695,7 +670,7 @@ class Matrix:
695
670
  """
696
671
 
697
672
  @classmethod
698
- def Shear(cls, plane: str, size: int, factor: float) -> typing_extensions.Self:
673
+ def Shear(cls, plane: str, size: int, factor) -> typing_extensions.Self:
699
674
  """Create a matrix to represent an shear transformation.
700
675
 
701
676
  :param plane: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],
@@ -703,9 +678,7 @@ class Matrix:
703
678
  :type plane: str
704
679
  :param size: The size of the shear matrix to construct [2, 4].
705
680
  :type size: int
706
- :param factor: The factor of shear to apply. For a 3 or 4 size matrix
707
- pass a pair of floats corresponding with the plane axis.
708
- :type factor: float
681
+ :param factor: The factor of shear to apply. For a 2 size matrix use a single float. For a 3 or 4 size matrix pass a pair of floats corresponding with the plane axis.
709
682
  :return: A new shear matrix.
710
683
  :rtype: typing_extensions.Self
711
684
  """
@@ -739,11 +712,11 @@ class Matrix:
739
712
  :rtype: typing_extensions.Self
740
713
  """
741
714
 
742
- def decompose(self) -> tuple[Vector, Quaternion, Vector]:
715
+ def decompose(self) -> Quaternion:
743
716
  """Return the translation, rotation, and scale components of this matrix.
744
717
 
745
- :return: tuple of translation, rotation, and scale
746
- :rtype: tuple[Vector, Quaternion, Vector]
718
+ :return: Tuple of translation, rotation, and scale.
719
+ :rtype: Quaternion
747
720
  """
748
721
 
749
722
  def determinant(self) -> float:
@@ -783,14 +756,12 @@ class Matrix:
783
756
 
784
757
  """
785
758
 
786
- def inverted(self, fallback: typing.Any | None = None) -> typing_extensions.Self:
759
+ def inverted(self, fallback=None):
787
760
  """Return an inverted copy of the matrix.
788
761
 
789
762
  :param fallback: return this when the inverse can't be calculated
790
763
  (instead of raising a `ValueError`).
791
- :type fallback: typing.Any | None
792
- :return: the inverted matrix or fallback when given.
793
- :rtype: typing_extensions.Self
764
+ :return: The inverted matrix or fallback when given.
794
765
  """
795
766
 
796
767
  def inverted_safe(self) -> typing_extensions.Self:
@@ -831,18 +802,10 @@ class Matrix:
831
802
  def resize_4x4(self):
832
803
  """Resize the matrix to 4x4."""
833
804
 
834
- def rotate(
835
- self,
836
- other: Euler
837
- | Quaternion
838
- | collections.abc.Sequence[collections.abc.Sequence[float]]
839
- | collections.abc.Sequence[float]
840
- | typing_extensions.Self,
841
- ):
805
+ def rotate(self, other):
842
806
  """Rotates the matrix by another mathutils value.
843
807
 
844
808
  :param other: rotation component of mathutils value
845
- :type other: Euler | Quaternion | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[float] | typing_extensions.Self
846
809
  """
847
810
 
848
811
  def to_2x2(self) -> typing_extensions.Self:
@@ -1254,18 +1217,10 @@ class Quaternion:
1254
1217
  :rtype: typing_extensions.Self
1255
1218
  """
1256
1219
 
1257
- def rotate(
1258
- self,
1259
- other: Euler
1260
- | Matrix
1261
- | collections.abc.Sequence[collections.abc.Sequence[float]]
1262
- | collections.abc.Sequence[float]
1263
- | typing_extensions.Self,
1264
- ):
1220
+ def rotate(self, other):
1265
1221
  """Rotates the quaternion by another mathutils value.
1266
1222
 
1267
1223
  :param other: rotation component of mathutils value
1268
- :type other: Euler | Matrix | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[float] | typing_extensions.Self
1269
1224
  """
1270
1225
 
1271
1226
  def rotation_difference(
@@ -1294,11 +1249,10 @@ class Quaternion:
1294
1249
  :rtype: typing_extensions.Self
1295
1250
  """
1296
1251
 
1297
- def to_axis_angle(self) -> tuple[Vector, float]:
1252
+ def to_axis_angle(self):
1298
1253
  """Return the axis, angle representation of the quaternion.
1299
1254
 
1300
- :return: axis, angle.
1301
- :rtype: tuple[Vector, float]
1255
+ :return: Axis, angle.
1302
1256
  """
1303
1257
 
1304
1258
  def to_euler(
@@ -1333,13 +1287,13 @@ class Quaternion:
1333
1287
  :rtype: Matrix
1334
1288
  """
1335
1289
 
1336
- def to_swing_twist(self, axis) -> tuple[Quaternion, float]:
1290
+ def to_swing_twist(self, axis: str):
1337
1291
  """Split the rotation into a swing quaternion with the specified
1338
1292
  axis fixed at zero, and the remaining twist rotation angle.
1339
1293
 
1340
- :param axis: twist axis as a string in ['X', 'Y', 'Z']
1341
- :return: swing, twist angle.
1342
- :rtype: tuple[Quaternion, float]
1294
+ :param axis: Twist axis as a string in ['X', 'Y', 'Z'].
1295
+ :type axis: str
1296
+ :return: Swing, twist angle.
1343
1297
  """
1344
1298
 
1345
1299
  def __init__(self, seq=(1.0, 0.0, 0.0, 0.0)):
@@ -3644,33 +3598,27 @@ class Vector:
3644
3598
  def angle(
3645
3599
  self,
3646
3600
  other: collections.abc.Sequence[float] | typing_extensions.Self,
3647
- fallback: typing.Any | None = None,
3648
- ) -> float:
3601
+ fallback=None,
3602
+ ):
3649
3603
  """Return the angle between two vectors.
3650
3604
 
3651
3605
  :param other: another vector to compare the angle with
3652
3606
  :type other: collections.abc.Sequence[float] | typing_extensions.Self
3653
3607
  :param fallback: return this when the angle can't be calculated (zero length vector),
3654
3608
  (instead of raising a `ValueError`).
3655
- :type fallback: typing.Any | None
3656
3609
  :return: angle in radians or fallback when given
3657
- :rtype: float
3658
3610
  """
3659
3611
 
3660
3612
  def angle_signed(
3661
- self,
3662
- other: collections.abc.Sequence[float] | typing_extensions.Self,
3663
- fallback: typing.Any,
3664
- ) -> float:
3613
+ self, other: collections.abc.Sequence[float] | typing_extensions.Self, fallback
3614
+ ):
3665
3615
  """Return the signed angle between two 2D vectors (clockwise is positive).
3666
3616
 
3667
3617
  :param other: another vector to compare the angle with
3668
3618
  :type other: collections.abc.Sequence[float] | typing_extensions.Self
3669
3619
  :param fallback: return this when the angle can't be calculated (zero length vector),
3670
3620
  (instead of raising a `ValueError`).
3671
- :type fallback: typing.Any
3672
3621
  :return: angle in radians or fallback when given
3673
- :rtype: float
3674
3622
  """
3675
3623
 
3676
3624
  def copy(self) -> typing_extensions.Self:
@@ -3680,15 +3628,12 @@ class Vector:
3680
3628
  :rtype: typing_extensions.Self
3681
3629
  """
3682
3630
 
3683
- def cross(
3684
- self, other: collections.abc.Sequence[float] | typing_extensions.Self
3685
- ) -> typing_extensions.Self:
3631
+ def cross(self, other: collections.abc.Sequence[float] | typing_extensions.Self):
3686
3632
  """Return the cross product of this vector and another.
3687
3633
 
3688
3634
  :param other: The other vector to perform the cross product with.
3689
3635
  :type other: collections.abc.Sequence[float] | typing_extensions.Self
3690
- :return: The cross product.
3691
- :rtype: typing_extensions.Self
3636
+ :return: The cross product as a vector or a float when 2D vectors are used.
3692
3637
  """
3693
3638
 
3694
3639
  def dot(
@@ -3789,18 +3734,10 @@ class Vector:
3789
3734
  :rtype: typing_extensions.Self
3790
3735
  """
3791
3736
 
3792
- def rotate(
3793
- self,
3794
- other: Euler
3795
- | Matrix
3796
- | Quaternion
3797
- | collections.abc.Sequence[collections.abc.Sequence[float]]
3798
- | collections.abc.Sequence[float],
3799
- ):
3737
+ def rotate(self, other):
3800
3738
  """Rotate the vector by a rotation value.
3801
3739
 
3802
3740
  :param other: rotation component of mathutils value
3803
- :type other: Euler | Matrix | Quaternion | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[float]
3804
3741
  """
3805
3742
 
3806
3743
  def rotation_difference(
@@ -3819,7 +3756,7 @@ class Vector:
3819
3756
  self,
3820
3757
  other: collections.abc.Sequence[float] | typing_extensions.Self,
3821
3758
  factor: float,
3822
- fallback: typing.Any | None = None,
3759
+ fallback=None,
3823
3760
  ) -> typing_extensions.Self:
3824
3761
  """Returns the interpolation of two non-zero vectors (spherical coordinates).
3825
3762
 
@@ -3829,7 +3766,6 @@ class Vector:
3829
3766
  :type factor: float
3830
3767
  :param fallback: return this when the vector can't be calculated (zero length vector or direct opposites),
3831
3768
  (instead of raising a `ValueError`).
3832
- :type fallback: typing.Any | None
3833
3769
  :return: The interpolated vector.
3834
3770
  :rtype: typing_extensions.Self
3835
3771
  """
@@ -3866,13 +3802,12 @@ class Vector:
3866
3802
  :rtype: Quaternion
3867
3803
  """
3868
3804
 
3869
- def to_tuple(self, precision: int = -1) -> tuple:
3805
+ def to_tuple(self, precision: int = -1):
3870
3806
  """Return this vector as a tuple with.
3871
3807
 
3872
3808
  :param precision: The number to round the value to in [-1, 21].
3873
3809
  :type precision: int
3874
3810
  :return: the values of the vector rounded by precision
3875
- :rtype: tuple
3876
3811
  """
3877
3812
 
3878
3813
  def zero(self):
@@ -60,36 +60,34 @@ class BVHTree:
60
60
  :type epsilon: float
61
61
  """
62
62
 
63
- def find_nearest(self, origin, distance: float = 1.84467e19) -> tuple:
63
+ def find_nearest(self, origin, distance: float = 1.84467e19):
64
64
  """Find the nearest element (typically face index) to a point.
65
65
 
66
66
  :param origin:
67
67
  :param distance: Maximum distance threshold.
68
68
  :type distance: float
69
- :return: Returns a tuple
70
- (`Vector` location, `Vector` normal, int index, float distance),
69
+ :return: Returns a tuple: (position, normal, index, distance),
71
70
  Values will all be None if no hit is found.
72
- :rtype: tuple
73
71
  """
74
72
 
75
- def find_nearest_range(self, origin, distance: float = 1.84467e19) -> list:
73
+ def find_nearest_range(
74
+ self, origin, distance: float = 1.84467e19
75
+ ) -> int | mathutils.Vector:
76
76
  """Find the nearest elements (typically face index) to a point in the distance range.
77
77
 
78
- :param origin:
79
- :param distance: Maximum distance threshold.
80
- :type distance: float
81
- :return: Returns a list of tuples
82
- (`Vector` location, `Vector` normal, int index, float distance),
83
- :rtype: list
78
+ :param origin:
79
+ :param distance: Maximum distance threshold.
80
+ :type distance: float
81
+ :return: Returns a list of tuples (position, normal, index, distance)
82
+ :rtype: int | mathutils.Vector
84
83
  """
85
84
 
86
- def overlap(self, other_tree: typing_extensions.Self) -> list:
85
+ def overlap(self, other_tree: typing_extensions.Self):
87
86
  """Find overlapping indices between 2 trees.
88
87
 
89
88
  :param other_tree: Other tree to perform overlap test on.
90
89
  :type other_tree: typing_extensions.Self
91
90
  :return: Returns a list of unique index pairs, the first index referencing this tree, the second referencing the other_tree.
92
- :rtype: list
93
91
  """
94
92
 
95
93
  def ray_cast(
@@ -97,7 +95,7 @@ class BVHTree:
97
95
  origin: collections.abc.Sequence[float] | mathutils.Vector,
98
96
  direction: collections.abc.Sequence[float] | mathutils.Vector,
99
97
  distance: float = sys.float_info.max,
100
- ) -> tuple:
98
+ ):
101
99
  """Cast a ray onto the mesh.
102
100
 
103
101
  :param origin: Start location of the ray in object space.
@@ -106,10 +104,8 @@ class BVHTree:
106
104
  :type direction: collections.abc.Sequence[float] | mathutils.Vector
107
105
  :param distance: Maximum distance threshold.
108
106
  :type distance: float
109
- :return: Returns a tuple
110
- (`Vector` location, `Vector` normal, int index, float distance),
107
+ :return: Returns a tuple: (position, normal, index, distance),
111
108
  Values will all be None if no hit is found.
112
- :rtype: tuple
113
109
  """
114
110
 
115
111
  def __init__(self, size):
@@ -32,7 +32,7 @@ def barycentric_transform(
32
32
  tri_b1: collections.abc.Sequence[float] | mathutils.Vector,
33
33
  tri_b2: collections.abc.Sequence[float] | mathutils.Vector,
34
34
  tri_b3: collections.abc.Sequence[float] | mathutils.Vector,
35
- ):
35
+ ) -> mathutils.Vector:
36
36
  """Return a transformed point, the transformation is defined by 2 triangles.
37
37
 
38
38
  :param point: The point to transform.
@@ -50,24 +50,23 @@ def barycentric_transform(
50
50
  :param tri_b3: target triangle vertex.
51
51
  :type tri_b3: collections.abc.Sequence[float] | mathutils.Vector
52
52
  :return: The transformed point
53
+ :rtype: mathutils.Vector
53
54
  """
54
55
 
55
- def box_fit_2d(points: list) -> float:
56
+ def box_fit_2d(points) -> float:
56
57
  """Returns an angle that best fits the points to an axis aligned rectangle
57
58
 
58
- :param points: list of 2d points.
59
- :type points: list
59
+ :param points: Sequence of 2D points.
60
60
  :return: angle
61
61
  :rtype: float
62
62
  """
63
63
 
64
- def box_pack_2d(boxes: list) -> tuple:
64
+ def box_pack_2d(boxes: float):
65
65
  """Returns a tuple with the width and height of the packed bounding box.
66
66
 
67
- :param boxes: list of boxes, each box is a list where the first 4 items are [x, y, width, height, ...] other items are ignored.
68
- :type boxes: list
69
- :return: the width and height of the packed bounding box
70
- :rtype: tuple
67
+ :param boxes: list of boxes, each box is a list where the first 4 items are [X, Y, width, height, ...] other items are ignored. The X & Y values in this list are modified to set the packed positions.
68
+ :type boxes: float
69
+ :return: The width and height of the packed bounding box.
71
70
  """
72
71
 
73
72
  def closest_point_on_tri(
@@ -90,22 +89,15 @@ def closest_point_on_tri(
90
89
  :rtype: mathutils.Vector
91
90
  """
92
91
 
93
- def convex_hull_2d(points: list) -> list[int]:
92
+ def convex_hull_2d(points):
94
93
  """Returns a list of indices into the list given
95
94
 
96
- :param points: list of 2d points.
97
- :type points: list
95
+ :param points: Sequence of 2D points.
98
96
  :return: a list of indices
99
- :rtype: list[int]
100
97
  """
101
98
 
102
99
  def delaunay_2d_cdt(
103
- vert_coords: list[mathutils.Vector],
104
- edges,
105
- faces,
106
- output_type: int,
107
- epsilon: float,
108
- need_ids=True,
100
+ vert_coords, edges, faces, output_type: int, epsilon: float, need_ids=True
109
101
  ):
110
102
  """Computes the Constrained Delaunay Triangulation of a set of vertices,
111
103
  with edges and faces that must appear in the triangulation.
@@ -121,7 +113,6 @@ def delaunay_2d_cdt(
121
113
  of the orig arrays, which may save some time.
122
114
 
123
115
  :param vert_coords: Vertex coordinates (2d)
124
- :type vert_coords: list[mathutils.Vector]
125
116
  :param edges: Edges, as pairs of indices in vert_coords
126
117
  :param faces: Faces, each sublist is a face, as indices in vert_coords (CCW oriented)
127
118
  :param output_type: What output looks like. 0 => triangles with convex hull. 1 => triangles inside constraints. 2 => the input constraints, intersected. 3 => like 2 but detect holes and omit them from output. 4 => like 2 but with extra edges to make valid BMesh faces. 5 => like 4 but detect holes and omit them from output.
@@ -167,7 +158,7 @@ def interpolate_bezier(
167
158
  :type knot2: collections.abc.Sequence[float] | mathutils.Vector
168
159
  :param resolution: Number of points to return.
169
160
  :type resolution: int
170
- :return: The interpolated points
161
+ :return: The interpolated points.
171
162
  """
172
163
 
173
164
  def intersect_line_line(
@@ -175,7 +166,7 @@ def intersect_line_line(
175
166
  v2: collections.abc.Sequence[float] | mathutils.Vector,
176
167
  v3: collections.abc.Sequence[float] | mathutils.Vector,
177
168
  v4: collections.abc.Sequence[float] | mathutils.Vector,
178
- ) -> tuple[mathutils.Vector, ...]:
169
+ ):
179
170
  """Returns a tuple with the points on each line respectively closest to the other.
180
171
 
181
172
  :param v1: First point of the first line
@@ -187,7 +178,6 @@ def intersect_line_line(
187
178
  :param v4: Second point of the second line
188
179
  :type v4: collections.abc.Sequence[float] | mathutils.Vector
189
180
  :return: The intersection on each line or None when the lines are co-linear.
190
- :rtype: tuple[mathutils.Vector, ...]
191
181
  """
192
182
 
193
183
  def intersect_line_line_2d(
@@ -195,7 +185,7 @@ def intersect_line_line_2d(
195
185
  lineA_p2: collections.abc.Sequence[float] | mathutils.Vector,
196
186
  lineB_p1: collections.abc.Sequence[float] | mathutils.Vector,
197
187
  lineB_p2: collections.abc.Sequence[float] | mathutils.Vector,
198
- ) -> mathutils.Vector:
188
+ ):
199
189
  """Takes 2 segments (defined by 4 vectors) and returns a vector for their point of intersection or None.
200
190
 
201
191
  :param lineA_p1: First point of the first line
@@ -207,7 +197,6 @@ def intersect_line_line_2d(
207
197
  :param lineB_p2: Second point of the second line
208
198
  :type lineB_p2: collections.abc.Sequence[float] | mathutils.Vector
209
199
  :return: The point of intersection or None when not found
210
- :rtype: mathutils.Vector
211
200
  """
212
201
 
213
202
  def intersect_line_plane(
@@ -216,7 +205,7 @@ def intersect_line_plane(
216
205
  plane_co: collections.abc.Sequence[float] | mathutils.Vector,
217
206
  plane_no: collections.abc.Sequence[float] | mathutils.Vector,
218
207
  no_flip=False,
219
- ) -> mathutils.Vector:
208
+ ):
220
209
  """Calculate the intersection between a line (as 2 vectors) and a plane.
221
210
  Returns a vector for the intersection or None.
222
211
 
@@ -229,7 +218,6 @@ def intersect_line_plane(
229
218
  :param plane_no: The direction the plane is facing
230
219
  :type plane_no: collections.abc.Sequence[float] | mathutils.Vector
231
220
  :return: The point of intersection or None when not found
232
- :rtype: mathutils.Vector
233
221
  """
234
222
 
235
223
  def intersect_line_sphere(
@@ -290,21 +278,20 @@ def intersect_plane_plane(
290
278
  :type plane_b_co: collections.abc.Sequence[float] | mathutils.Vector
291
279
  :param plane_b_no: Normal of the second plane
292
280
  :type plane_b_no: collections.abc.Sequence[float] | mathutils.Vector
293
- :return: The line of the intersection represented as a point and a vector
281
+ :return: The line of the intersection represented as a point and a vector or None if the intersection can't be calculated
294
282
  """
295
283
 
296
284
  def intersect_point_line(
297
285
  pt: collections.abc.Sequence[float] | mathutils.Vector,
298
286
  line_p1: collections.abc.Sequence[float] | mathutils.Vector,
299
287
  line_p2,
300
- ) -> tuple[mathutils.Vector]:
288
+ ):
301
289
  """Takes a point and a line and returns a tuple with the closest point on the line and its distance from the first point of the line as a percentage of the length of the line.
302
290
 
303
291
  :param pt: Point
304
292
  :type pt: collections.abc.Sequence[float] | mathutils.Vector
305
293
  :param line_p1: First point of the lineSecond point of the line
306
294
  :type line_p1: collections.abc.Sequence[float] | mathutils.Vector
307
- :rtype: tuple[mathutils.Vector]
308
295
  """
309
296
 
310
297
  def intersect_point_quad_2d(
@@ -336,7 +323,7 @@ def intersect_point_tri(
336
323
  tri_p1: collections.abc.Sequence[float] | mathutils.Vector,
337
324
  tri_p2: collections.abc.Sequence[float] | mathutils.Vector,
338
325
  tri_p3: collections.abc.Sequence[float] | mathutils.Vector,
339
- ) -> mathutils.Vector:
326
+ ):
340
327
  """Takes 4 vectors: one is the point and the next 3 define the triangle. Projects the point onto the triangle plane and checks if it is within the triangle.
341
328
 
342
329
  :param pt: Point
@@ -348,7 +335,6 @@ def intersect_point_tri(
348
335
  :param tri_p3: Third point of the triangle
349
336
  :type tri_p3: collections.abc.Sequence[float] | mathutils.Vector
350
337
  :return: Point on the triangles plane or None if its outside the triangle
351
- :rtype: mathutils.Vector
352
338
  """
353
339
 
354
340
  def intersect_point_tri_2d(
@@ -377,7 +363,7 @@ def intersect_ray_tri(
377
363
  ray: collections.abc.Sequence[float] | mathutils.Vector,
378
364
  orig: collections.abc.Sequence[float] | mathutils.Vector,
379
365
  clip: bool = True,
380
- ) -> mathutils.Vector:
366
+ ):
381
367
  """Returns the intersection between a ray and a triangle, if possible, returns None otherwise.
382
368
 
383
369
  :param v1: Point1
@@ -393,7 +379,6 @@ def intersect_ray_tri(
393
379
  :param clip: When False, don't restrict the intersection to the area of the triangle, use the infinite plane defined by the triangle.
394
380
  :type clip: bool
395
381
  :return: The point of intersection or None if no intersection is found
396
- :rtype: mathutils.Vector
397
382
  """
398
383
 
399
384
  def intersect_sphere_sphere_2d(
@@ -401,7 +386,7 @@ def intersect_sphere_sphere_2d(
401
386
  radius_a: float,
402
387
  p_b: collections.abc.Sequence[float] | mathutils.Vector,
403
388
  radius_b: float,
404
- ) -> tuple[mathutils.Vector, ...]:
389
+ ):
405
390
  """Returns 2 points on between intersecting circles.
406
391
 
407
392
  :param p_a: Center of the first circle
@@ -413,7 +398,6 @@ def intersect_sphere_sphere_2d(
413
398
  :param radius_b: Radius of the second circle
414
399
  :type radius_b: float
415
400
  :return: 2 points on between intersecting circles or None when there is no intersection.
416
- :rtype: tuple[mathutils.Vector, ...]
417
401
  """
418
402
 
419
403
  def intersect_tri_tri_2d(tri_a1, tri_a2, tri_a3, tri_b1, tri_b2, tri_b3) -> bool:
@@ -425,31 +409,28 @@ def intersect_tri_tri_2d(tri_a1, tri_a2, tri_a3, tri_b1, tri_b2, tri_b3) -> bool
425
409
  def normal(vectors) -> mathutils.Vector:
426
410
  """Returns the normal of a 3D polygon.
427
411
 
428
- :param vectors: Vectors to calculate normals with
412
+ :param vectors: 3 or more vectors to calculate normals.
429
413
  :rtype: mathutils.Vector
430
414
  """
431
415
 
432
416
  def points_in_planes(
433
- planes: list[mathutils.Vector],
434
- epsilon_coplanar: float = 0.0001,
435
- epsilon_isect: float = 1e-06,
417
+ planes, epsilon_coplanar: float = 0.0001, epsilon_isect: float = 1e-06
436
418
  ):
437
419
  """Returns a list of points inside all planes given and a list of index values for the planes used.
438
420
 
439
421
  :param planes: List of planes (4D vectors).
440
- :type planes: list[mathutils.Vector]
441
422
  :param epsilon_coplanar: Epsilon value for interpreting plane pairs as co-plannar.
442
423
  :type epsilon_coplanar: float
443
424
  :param epsilon_isect: Epsilon value for intersection.
444
425
  :type epsilon_isect: float
445
- :return: two lists, once containing the vertices inside the planes, another containing the plane indices used
426
+ :return: Two lists, once containing the 3D coordinates inside the planes, another containing the plane indices used.
446
427
  """
447
428
 
448
- def tessellate_polygon(veclist_list) -> list:
429
+ def tessellate_polygon(polylines) -> int:
449
430
  """Takes a list of polylines (each point a pair or triplet of numbers) and returns the point indices for a polyline filled with triangles. Does not handle degenerate geometry (such as zero-length lines due to consecutive identical points).
450
431
 
451
- :param veclist_list: list of polylines
452
- :rtype: list
432
+ :param polylines: Polygons where each polygon is a sequence of 2D or 3D points.
433
+ :rtype: int
453
434
  """
454
435
 
455
436
  def volume_tetrahedron(
@@ -10,6 +10,6 @@ import typing_extensions
10
10
  def poly_3d_calc(veclist, pt):
11
11
  """Calculate barycentric weights for a point on a polygon.
12
12
 
13
- :param veclist: list of vectors
14
- :param pt: point :rtype: list of per-vector weights
13
+ :param veclist: Sequence of 3D positions.
14
+ :param pt: 2D or 3D position. :type pt: Sequence[float] :return: list of per-vector weights.
15
15
  """