fake-bpy-module 20241129__py3-none-any.whl → 20241201__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.

mathutils/__init__.pyi CHANGED
@@ -422,10 +422,18 @@ class Euler:
422
422
  :param other:
423
423
  """
424
424
 
425
- def rotate(self, other):
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
+ ):
426
433
  """Rotates the euler by another mathutils value.
427
434
 
428
435
  :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
429
437
  """
430
438
 
431
439
  def rotate_axis(self, axis: str, angle: float):
@@ -612,24 +620,39 @@ class Matrix:
612
620
  """
613
621
 
614
622
  @classmethod
615
- def LocRotScale(cls, location, rotation, scale) -> typing_extensions.Self:
623
+ def LocRotScale(
624
+ cls,
625
+ location: Vector | collections.abc.Sequence[float],
626
+ rotation: Euler
627
+ | Quaternion
628
+ | collections.abc.Sequence[collections.abc.Sequence[float]]
629
+ | collections.abc.Sequence[float]
630
+ | typing_extensions.Self,
631
+ scale: Vector | collections.abc.Sequence[float],
632
+ ) -> typing_extensions.Self:
616
633
  """Create a matrix combining translation, rotation and scale,
617
634
  acting as the inverse of the decompose() method.Any of the inputs may be replaced with None if not needed.
618
635
 
619
636
  :param location: The translation component.
637
+ :type location: Vector | collections.abc.Sequence[float]
620
638
  :param rotation: The rotation component as a 3x3 matrix, quaternion, euler or None for no rotation.
639
+ :type rotation: Euler | Quaternion | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[float] | typing_extensions.Self
621
640
  :param scale: The scale component.
641
+ :type scale: Vector | collections.abc.Sequence[float]
622
642
  :return: Combined transformation as a 4x4 matrix.
623
643
  :rtype: typing_extensions.Self
624
644
  """
625
645
 
626
646
  @classmethod
627
- def OrthoProjection(cls, axis, size: int) -> typing_extensions.Self:
647
+ def OrthoProjection(
648
+ cls, axis: Vector | collections.abc.Sequence[float] | str, size: int
649
+ ) -> typing_extensions.Self:
628
650
  """Create a matrix to represent an orthographic projection.
629
651
 
630
652
  :param axis: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],
631
653
  where a single axis is for a 2D matrix.
632
654
  Or a vector for an arbitrary axis
655
+ :type axis: Vector | collections.abc.Sequence[float] | str
633
656
  :param size: The size of the projection matrix to construct [2, 4].
634
657
  :type size: int
635
658
  :return: A new projection matrix.
@@ -637,7 +660,12 @@ class Matrix:
637
660
  """
638
661
 
639
662
  @classmethod
640
- def Rotation(cls, angle: float, size: int, axis) -> typing_extensions.Self:
663
+ def Rotation(
664
+ cls,
665
+ angle: float,
666
+ size: int,
667
+ axis: Vector | collections.abc.Sequence[float] | str | None = "",
668
+ ) -> typing_extensions.Self:
641
669
  """Create a matrix representing a rotation.
642
670
 
643
671
  :param angle: The angle of rotation desired, in radians.
@@ -646,6 +674,7 @@ class Matrix:
646
674
  :type size: int
647
675
  :param axis: a string in ['X', 'Y', 'Z'] or a 3D Vector Object
648
676
  (optional when size is 2).
677
+ :type axis: Vector | collections.abc.Sequence[float] | str | None
649
678
  :return: A new rotation matrix.
650
679
  :rtype: typing_extensions.Self
651
680
  """
@@ -670,7 +699,7 @@ class Matrix:
670
699
  """
671
700
 
672
701
  @classmethod
673
- def Shear(cls, plane: str, size: int, factor) -> typing_extensions.Self:
702
+ def Shear(cls, plane: str, size: int, factor: float) -> typing_extensions.Self:
674
703
  """Create a matrix to represent an shear transformation.
675
704
 
676
705
  :param plane: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],
@@ -679,6 +708,7 @@ class Matrix:
679
708
  :param size: The size of the shear matrix to construct [2, 4].
680
709
  :type size: int
681
710
  :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.
711
+ :type factor: float
682
712
  :return: A new shear matrix.
683
713
  :rtype: typing_extensions.Self
684
714
  """
@@ -756,12 +786,13 @@ class Matrix:
756
786
 
757
787
  """
758
788
 
759
- def inverted(self, fallback=None):
789
+ def inverted(self, fallback=None) -> typing_extensions.Self:
760
790
  """Return an inverted copy of the matrix.
761
791
 
762
792
  :param fallback: return this when the inverse can't be calculated
763
793
  (instead of raising a `ValueError`).
764
794
  :return: The inverted matrix or fallback when given.
795
+ :rtype: typing_extensions.Self
765
796
  """
766
797
 
767
798
  def inverted_safe(self) -> typing_extensions.Self:
@@ -802,10 +833,18 @@ class Matrix:
802
833
  def resize_4x4(self):
803
834
  """Resize the matrix to 4x4."""
804
835
 
805
- def rotate(self, other):
836
+ def rotate(
837
+ self,
838
+ other: Euler
839
+ | Quaternion
840
+ | collections.abc.Sequence[collections.abc.Sequence[float]]
841
+ | collections.abc.Sequence[float]
842
+ | typing_extensions.Self,
843
+ ):
806
844
  """Rotates the matrix by another mathutils value.
807
845
 
808
846
  :param other: rotation component of mathutils value
847
+ :type other: Euler | Quaternion | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[float] | typing_extensions.Self
809
848
  """
810
849
 
811
850
  def to_2x2(self) -> typing_extensions.Self:
@@ -1217,10 +1256,18 @@ class Quaternion:
1217
1256
  :rtype: typing_extensions.Self
1218
1257
  """
1219
1258
 
1220
- def rotate(self, other):
1259
+ def rotate(
1260
+ self,
1261
+ other: Euler
1262
+ | Matrix
1263
+ | collections.abc.Sequence[collections.abc.Sequence[float]]
1264
+ | collections.abc.Sequence[float]
1265
+ | typing_extensions.Self,
1266
+ ):
1221
1267
  """Rotates the quaternion by another mathutils value.
1222
1268
 
1223
1269
  :param other: rotation component of mathutils value
1270
+ :type other: Euler | Matrix | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[float] | typing_extensions.Self
1224
1271
  """
1225
1272
 
1226
1273
  def rotation_difference(
@@ -3599,7 +3646,7 @@ class Vector:
3599
3646
  self,
3600
3647
  other: collections.abc.Sequence[float] | typing_extensions.Self,
3601
3648
  fallback=None,
3602
- ):
3649
+ ) -> float:
3603
3650
  """Return the angle between two vectors.
3604
3651
 
3605
3652
  :param other: another vector to compare the angle with
@@ -3607,11 +3654,12 @@ class Vector:
3607
3654
  :param fallback: return this when the angle can't be calculated (zero length vector),
3608
3655
  (instead of raising a `ValueError`).
3609
3656
  :return: angle in radians or fallback when given
3657
+ :rtype: float
3610
3658
  """
3611
3659
 
3612
3660
  def angle_signed(
3613
3661
  self, other: collections.abc.Sequence[float] | typing_extensions.Self, fallback
3614
- ):
3662
+ ) -> float:
3615
3663
  """Return the signed angle between two 2D vectors (clockwise is positive).
3616
3664
 
3617
3665
  :param other: another vector to compare the angle with
@@ -3619,6 +3667,7 @@ class Vector:
3619
3667
  :param fallback: return this when the angle can't be calculated (zero length vector),
3620
3668
  (instead of raising a `ValueError`).
3621
3669
  :return: angle in radians or fallback when given
3670
+ :rtype: float
3622
3671
  """
3623
3672
 
3624
3673
  def copy(self) -> typing_extensions.Self:
@@ -3628,12 +3677,15 @@ class Vector:
3628
3677
  :rtype: typing_extensions.Self
3629
3678
  """
3630
3679
 
3631
- def cross(self, other: collections.abc.Sequence[float] | typing_extensions.Self):
3680
+ def cross(
3681
+ self, other: collections.abc.Sequence[float] | typing_extensions.Self
3682
+ ) -> float | typing_extensions.Self:
3632
3683
  """Return the cross product of this vector and another.
3633
3684
 
3634
3685
  :param other: The other vector to perform the cross product with.
3635
3686
  :type other: collections.abc.Sequence[float] | typing_extensions.Self
3636
3687
  :return: The cross product as a vector or a float when 2D vectors are used.
3688
+ :rtype: float | typing_extensions.Self
3637
3689
  """
3638
3690
 
3639
3691
  def dot(
@@ -3734,10 +3786,18 @@ class Vector:
3734
3786
  :rtype: typing_extensions.Self
3735
3787
  """
3736
3788
 
3737
- def rotate(self, other):
3789
+ def rotate(
3790
+ self,
3791
+ other: Euler
3792
+ | Matrix
3793
+ | Quaternion
3794
+ | collections.abc.Sequence[collections.abc.Sequence[float]]
3795
+ | collections.abc.Sequence[float],
3796
+ ):
3738
3797
  """Rotate the vector by a rotation value.
3739
3798
 
3740
3799
  :param other: rotation component of mathutils value
3800
+ :type other: Euler | Matrix | Quaternion | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[float]
3741
3801
  """
3742
3802
 
3743
3803
  def rotation_difference(
@@ -60,7 +60,9 @@ class BVHTree:
60
60
  :type epsilon: float
61
61
  """
62
62
 
63
- def find_nearest(self, origin, distance: float = 1.84467e19):
63
+ def find_nearest(
64
+ self, origin, distance: float = 1.84467e19
65
+ ) -> float | mathutils.Vector:
64
66
  """Find the nearest element (typically face index) to a point.
65
67
 
66
68
  :param origin:
@@ -68,6 +70,7 @@ class BVHTree:
68
70
  :type distance: float
69
71
  :return: Returns a tuple: (position, normal, index, distance),
70
72
  Values will all be None if no hit is found.
73
+ :rtype: float | mathutils.Vector
71
74
  """
72
75
 
73
76
  def find_nearest_range(
@@ -95,7 +98,7 @@ class BVHTree:
95
98
  origin: collections.abc.Sequence[float] | mathutils.Vector,
96
99
  direction: collections.abc.Sequence[float] | mathutils.Vector,
97
100
  distance: float = sys.float_info.max,
98
- ):
101
+ ) -> float | mathutils.Vector:
99
102
  """Cast a ray onto the mesh.
100
103
 
101
104
  :param origin: Start location of the ray in object space.
@@ -106,6 +109,7 @@ class BVHTree:
106
109
  :type distance: float
107
110
  :return: Returns a tuple: (position, normal, index, distance),
108
111
  Values will all be None if no hit is found.
112
+ :rtype: float | mathutils.Vector
109
113
  """
110
114
 
111
115
  def __init__(self, size):
@@ -185,7 +185,7 @@ def intersect_line_line_2d(
185
185
  lineA_p2: collections.abc.Sequence[float] | mathutils.Vector,
186
186
  lineB_p1: collections.abc.Sequence[float] | mathutils.Vector,
187
187
  lineB_p2: collections.abc.Sequence[float] | mathutils.Vector,
188
- ):
188
+ ) -> mathutils.Vector:
189
189
  """Takes 2 segments (defined by 4 vectors) and returns a vector for their point of intersection or None.
190
190
 
191
191
  :param lineA_p1: First point of the first line
@@ -197,6 +197,7 @@ def intersect_line_line_2d(
197
197
  :param lineB_p2: Second point of the second line
198
198
  :type lineB_p2: collections.abc.Sequence[float] | mathutils.Vector
199
199
  :return: The point of intersection or None when not found
200
+ :rtype: mathutils.Vector
200
201
  """
201
202
 
202
203
  def intersect_line_plane(
@@ -205,7 +206,7 @@ def intersect_line_plane(
205
206
  plane_co: collections.abc.Sequence[float] | mathutils.Vector,
206
207
  plane_no: collections.abc.Sequence[float] | mathutils.Vector,
207
208
  no_flip=False,
208
- ):
209
+ ) -> mathutils.Vector:
209
210
  """Calculate the intersection between a line (as 2 vectors) and a plane.
210
211
  Returns a vector for the intersection or None.
211
212
 
@@ -218,6 +219,7 @@ def intersect_line_plane(
218
219
  :param plane_no: The direction the plane is facing
219
220
  :type plane_no: collections.abc.Sequence[float] | mathutils.Vector
220
221
  :return: The point of intersection or None when not found
222
+ :rtype: mathutils.Vector
221
223
  """
222
224
 
223
225
  def intersect_line_sphere(
@@ -226,7 +228,7 @@ def intersect_line_sphere(
226
228
  sphere_co: collections.abc.Sequence[float] | mathutils.Vector,
227
229
  sphere_radius: float,
228
230
  clip=True,
229
- ):
231
+ ) -> mathutils.Vector:
230
232
  """Takes a line (as 2 points) and a sphere (as a point and a radius) and
231
233
  returns the intersection
232
234
 
@@ -239,6 +241,7 @@ def intersect_line_sphere(
239
241
  :param sphere_radius: Radius of the sphere
240
242
  :type sphere_radius: float
241
243
  :return: The intersection points as a pair of vectors or None when there is no intersection
244
+ :rtype: mathutils.Vector
242
245
  """
243
246
 
244
247
  def intersect_line_sphere_2d(
@@ -247,7 +250,7 @@ def intersect_line_sphere_2d(
247
250
  sphere_co: collections.abc.Sequence[float] | mathutils.Vector,
248
251
  sphere_radius: float,
249
252
  clip=True,
250
- ):
253
+ ) -> mathutils.Vector:
251
254
  """Takes a line (as 2 points) and a sphere (as a point and a radius) and
252
255
  returns the intersection
253
256
 
@@ -260,6 +263,7 @@ def intersect_line_sphere_2d(
260
263
  :param sphere_radius: Radius of the sphere
261
264
  :type sphere_radius: float
262
265
  :return: The intersection points as a pair of vectors or None when there is no intersection
266
+ :rtype: mathutils.Vector
263
267
  """
264
268
 
265
269
  def intersect_plane_plane(
@@ -323,7 +327,7 @@ def intersect_point_tri(
323
327
  tri_p1: collections.abc.Sequence[float] | mathutils.Vector,
324
328
  tri_p2: collections.abc.Sequence[float] | mathutils.Vector,
325
329
  tri_p3: collections.abc.Sequence[float] | mathutils.Vector,
326
- ):
330
+ ) -> mathutils.Vector:
327
331
  """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.
328
332
 
329
333
  :param pt: Point
@@ -335,6 +339,7 @@ def intersect_point_tri(
335
339
  :param tri_p3: Third point of the triangle
336
340
  :type tri_p3: collections.abc.Sequence[float] | mathutils.Vector
337
341
  :return: Point on the triangles plane or None if its outside the triangle
342
+ :rtype: mathutils.Vector
338
343
  """
339
344
 
340
345
  def intersect_point_tri_2d(
@@ -363,7 +368,7 @@ def intersect_ray_tri(
363
368
  ray: collections.abc.Sequence[float] | mathutils.Vector,
364
369
  orig: collections.abc.Sequence[float] | mathutils.Vector,
365
370
  clip: bool = True,
366
- ):
371
+ ) -> mathutils.Vector:
367
372
  """Returns the intersection between a ray and a triangle, if possible, returns None otherwise.
368
373
 
369
374
  :param v1: Point1
@@ -379,6 +384,7 @@ def intersect_ray_tri(
379
384
  :param clip: When False, don't restrict the intersection to the area of the triangle, use the infinite plane defined by the triangle.
380
385
  :type clip: bool
381
386
  :return: The point of intersection or None if no intersection is found
387
+ :rtype: mathutils.Vector
382
388
  """
383
389
 
384
390
  def intersect_sphere_sphere_2d(
rna_info/__init__.pyi CHANGED
@@ -66,7 +66,7 @@ class InfoPropertyRNA:
66
66
  class_fmt="{:s}",
67
67
  mathutils_fmt="{:s}",
68
68
  collection_id="Collection",
69
- enum_descr_override=None,
69
+ enum_descr_override: str | None = None,
70
70
  ):
71
71
  """
72
72
 
@@ -77,6 +77,7 @@ class InfoPropertyRNA:
77
77
  :param collection_id:
78
78
  :param enum_descr_override: Optionally override items for enum.
79
79
  Otherwise expand the literal items.
80
+ :type enum_descr_override: str | None
80
81
  """
81
82
 
82
83
  class InfoStructRNA: