fake-bpy-module 20241103__py3-none-any.whl → 20241111__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 (56) 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 +365 -604
  24. bpy/utils/__init__.pyi +30 -29
  25. bpy/utils/previews/__init__.pyi +1 -2
  26. bpy/utils/units/__init__.pyi +1 -2
  27. bpy_extras/anim_utils/__init__.pyi +5 -12
  28. bpy_extras/bmesh_utils/__init__.pyi +1 -2
  29. bpy_extras/image_utils/__init__.pyi +2 -5
  30. bpy_extras/io_utils/__init__.pyi +8 -14
  31. bpy_extras/mesh_utils/__init__.pyi +14 -29
  32. bpy_extras/object_utils/__init__.pyi +1 -1
  33. bpy_extras/view3d_utils/__init__.pyi +3 -10
  34. {fake_bpy_module-20241103.dist-info → fake_bpy_module-20241111.dist-info}/METADATA +1 -1
  35. {fake_bpy_module-20241103.dist-info → fake_bpy_module-20241111.dist-info}/RECORD +56 -56
  36. freestyle/chainingiterators/__init__.pyi +2 -7
  37. freestyle/functions/__init__.pyi +4 -16
  38. freestyle/types/__init__.pyi +29 -63
  39. freestyle/utils/ContextFunctions/__init__.pyi +2 -2
  40. freestyle/utils/__init__.pyi +1 -2
  41. gpu/__init__.pyi +19 -5
  42. gpu/matrix/__init__.pyi +2 -2
  43. gpu/state/__init__.pyi +16 -8
  44. gpu/types/__init__.pyi +14 -29
  45. gpu_extras/batch/__init__.pyi +9 -9
  46. gpu_extras/presets/__init__.pyi +4 -11
  47. idprop/types/__init__.pyi +1 -2
  48. imbuf/__init__.pyi +2 -4
  49. mathutils/__init__.pyi +30 -95
  50. mathutils/bvhtree/__init__.pyi +13 -17
  51. mathutils/geometry/__init__.pyi +26 -45
  52. mathutils/interpolate/__init__.pyi +2 -2
  53. mathutils/kdtree/__init__.pyi +13 -28
  54. rna_info/__init__.pyi +1 -2
  55. {fake_bpy_module-20241103.dist-info → fake_bpy_module-20241111.dist-info}/WHEEL +0 -0
  56. {fake_bpy_module-20241103.dist-info → fake_bpy_module-20241111.dist-info}/top_level.txt +0 -0
gpu/__init__.pyi CHANGED
@@ -22,7 +22,13 @@ A batch contains the necessary data to perform the drawing.
22
22
  That includes an obligatory *Vertex Buffer* and an optional *Index Buffer*,
23
23
  each of which is described in more detail in the following sections.
24
24
  A batch also defines a draw type.
25
- Typical draw types are POINTS, LINES and TRIS.
25
+ Typical draw types are POINTS
26
+
27
+ , LINES
28
+
29
+ and TRIS
30
+
31
+ .
26
32
  The draw type determines how the data will be interpreted and drawn.
27
33
 
28
34
 
@@ -78,7 +84,9 @@ indices = ((0, 1, 2), (2, 1, 3))
78
84
  ibo = gpu.types.GPUIndexBuf(type='TRIS', seq=indices)
79
85
  ```
80
86
 
81
- Here the first tuple in indices describes which vertices should be used for the first triangle
87
+ Here the first tuple in indices
88
+
89
+ describes which vertices should be used for the first triangle
82
90
  (same for the second tuple).
83
91
  Note how the diagonal vertices 1 and 2 are shared between both triangles.
84
92
 
@@ -92,12 +100,18 @@ Typically multiple shaders are linked together into a *Program*.
92
100
  However, in the Blender Python API the term *Shader* refers to an OpenGL Program.
93
101
  Every gpu.types.GPUShader consists of a vertex shader, a fragment shader and an optional geometry shader.
94
102
  For common drawing tasks there are some built-in shaders accessible from gpu.shader.from_builtin
95
- with an identifier such as UNIFORM_COLOR or FLAT_COLOR.
103
+ with an identifier such as UNIFORM_COLOR
104
+
105
+ or FLAT_COLOR
106
+
107
+ .
96
108
 
97
109
  Every shader defines a set of attributes and uniforms that have to be set in order to use the shader.
98
110
  Attributes are properties that are set using a vertex buffer and can be different for individual vertices.
99
111
  Uniforms are properties that are constant per draw call.
100
- They can be set using the shader.uniform_* functions after the shader has been bound.
112
+ They can be set using the shader.uniform_*
113
+
114
+ functions after the shader has been bound.
101
115
 
102
116
 
103
117
  --------------------
@@ -123,7 +137,7 @@ This is called Offscreen Rendering.
123
137
  In Blender Offscreen Rendering is done using the gpu.types.GPUOffScreen type.
124
138
 
125
139
  [WARNING]
126
- GPUOffScreen objects are bound to the OpenGL context they have been created in.
140
+ gpu.types.GPUOffScreen objects are bound to the OpenGL context they have been created in.
127
141
  This means that once Blender discards this context (i.e. the window is closed),
128
142
  the offscreen instance will be freed.
129
143
 
gpu/matrix/__init__.pyi CHANGED
@@ -86,7 +86,7 @@ def reset():
86
86
  def scale(scale):
87
87
  """Scale the current stack matrix.
88
88
 
89
- :param scale: Scale the current stack matrix.
89
+ :param scale: Scale the current stack matrix with 2 or 3 floats.
90
90
  """
91
91
 
92
92
  def scale_uniform(scale: float):
@@ -99,5 +99,5 @@ def scale_uniform(scale: float):
99
99
  def translate(offset):
100
100
  """Scale the current stack matrix.
101
101
 
102
- :param offset: Translate the current stack matrix.
102
+ :param offset: Translate the current stack matrix with 2 or 3 floats.
103
103
  """
gpu/state/__init__.pyi CHANGED
@@ -17,14 +17,22 @@ def blend_set(mode: str):
17
17
  """Defines the fixed pipeline blending equation.
18
18
 
19
19
  :param mode: The type of blend mode.
20
- * NONE No blending.
21
- * ALPHA The original color channels are interpolated according to the alpha value.
22
- * ALPHA_PREMULT The original color channels are interpolated according to the alpha value with the new colors pre-multiplied by this value.
23
- * ADDITIVE The original color channels are added by the corresponding ones.
24
- * ADDITIVE_PREMULT The original color channels are added by the corresponding ones that are pre-multiplied by the alpha value.
25
- * MULTIPLY The original color channels are multiplied by the corresponding ones.
26
- * SUBTRACT The original color channels are subtracted by the corresponding ones.
27
- * INVERT The original color channels are replaced by its complementary color.
20
+
21
+ NONE No blending.
22
+
23
+ ALPHA The original color channels are interpolated according to the alpha value.
24
+
25
+ ALPHA_PREMULT The original color channels are interpolated according to the alpha value with the new colors pre-multiplied by this value.
26
+
27
+ ADDITIVE The original color channels are added by the corresponding ones.
28
+
29
+ ADDITIVE_PREMULT The original color channels are added by the corresponding ones that are pre-multiplied by the alpha value.
30
+
31
+ MULTIPLY The original color channels are multiplied by the corresponding ones.
32
+
33
+ SUBTRACT The original color channels are subtracted by the corresponding ones.
34
+
35
+ INVERT The original color channels are replaced by its complementary color.
28
36
  :type mode: str
29
37
  """
30
38
 
gpu/types/__init__.pyi CHANGED
@@ -41,8 +41,7 @@ class GPUBatch:
41
41
  def draw_range(
42
42
  self, program: GPUShader, *, elem_start: int = 0, elem_count: int = 0
43
43
  ):
44
- """Run the drawing program with the parameters assigned to the batch. Only draw
45
- the elem_count elements of the index buffer starting at elem_start
44
+ """Run the drawing program with the parameters assigned to the batch. Only draw the elem_count elements of the index buffer starting at elem_start.
46
45
 
47
46
  :param program: Program that performs the drawing operations.
48
47
  :type program: GPUShader
@@ -93,7 +92,7 @@ class GPUFrameBuffer:
93
92
  """Fill color, depth and stencil textures with specific value.
94
93
  Common values: color=(0.0, 0.0, 0.0, 1.0), depth=1.0, stencil=0.
95
94
 
96
- :param color: float sequence each representing (r, g, b, a).
95
+ :param color: Sequence of 3 or 4 floats representing (r, g, b, a).
97
96
  :param depth: depth value.
98
97
  :type depth: float | None
99
98
  :param stencil: stencil value.
@@ -272,11 +271,10 @@ class GPUShader:
272
271
  :rtype: int
273
272
  """
274
273
 
275
- def attrs_info_get(self) -> tuple:
274
+ def attrs_info_get(self):
276
275
  """Information about the attributes used in the Shader.
277
276
 
278
277
  :return: tuples containing information about the attributes in order (name, type)
279
- :rtype: tuple
280
278
  """
281
279
 
282
280
  def bind(self):
@@ -315,22 +313,20 @@ class GPUShader:
315
313
  :rtype: int
316
314
  """
317
315
 
318
- def uniform_bool(self, name: str, value: bool):
316
+ def uniform_bool(self, name: str, value):
319
317
  """Specify the value of a uniform variable for the current program object.
320
318
 
321
319
  :param name: Name of the uniform variable whose value is to be changed.
322
320
  :type name: str
323
321
  :param value: Value that will be used to update the specified uniform variable.
324
- :type value: bool
325
322
  """
326
323
 
327
- def uniform_float(self, name: str, value: list[float]):
324
+ def uniform_float(self, name: str, value):
328
325
  """Specify the value of a uniform variable for the current program object.
329
326
 
330
327
  :param name: Name of the uniform variable whose value is to be changed.
331
328
  :type name: str
332
329
  :param value: Value that will be used to update the specified uniform variable.
333
- :type value: list[float]
334
330
  """
335
331
 
336
332
  def uniform_from_name(self, name: str) -> int:
@@ -342,13 +338,12 @@ class GPUShader:
342
338
  :rtype: int
343
339
  """
344
340
 
345
- def uniform_int(self, name: str, seq: list[int]):
341
+ def uniform_int(self, name: str, seq):
346
342
  """Specify the value of a uniform variable for the current program object.
347
343
 
348
344
  :param name: name of the uniform variable whose value is to be changed.
349
345
  :type name: str
350
346
  :param seq: Value that will be used to update the specified uniform variable.
351
- :type seq: list[int]
352
347
  """
353
348
 
354
349
  def uniform_sampler(self, name: str, texture: GPUTexture):
@@ -360,15 +355,12 @@ class GPUShader:
360
355
  :type texture: GPUTexture
361
356
  """
362
357
 
363
- def uniform_vector_float(
364
- self, location: int, buffer: list[float], length: int, count: int
365
- ):
358
+ def uniform_vector_float(self, location: int, buffer, length: int, count: int):
366
359
  """Set the buffer to fill the uniform.
367
360
 
368
361
  :param location: Location of the uniform variable to be modified.
369
362
  :type location: int
370
363
  :param buffer: The data that should be set. Can support the buffer protocol.
371
- :type buffer: list[float]
372
364
  :param length: Size of the uniform data type:
373
365
 
374
366
  1: float
@@ -464,12 +456,7 @@ class GPUShaderCreateInfo:
464
456
  """
465
457
 
466
458
  def image(
467
- self,
468
- slot: int,
469
- format: str,
470
- type: str,
471
- name: str,
472
- qualifiers: set = {"NO_RESTRICT"},
459
+ self, slot: int, format: str, type: str, name: str, qualifiers={"NO_RESTRICT"}
473
460
  ):
474
461
  """Specify an image resource used for arbitrary load and store operations.
475
462
 
@@ -637,7 +624,6 @@ class GPUShaderCreateInfo:
637
624
  - NO_RESTRICT
638
625
  - READ
639
626
  - WRITE
640
- :type qualifiers: set
641
627
  """
642
628
 
643
629
  def local_group_size(self, x: int, y: int = -1, z: int = -1):
@@ -651,7 +637,7 @@ class GPUShaderCreateInfo:
651
637
  :type z: int
652
638
  """
653
639
 
654
- def push_constant(self, type: str, name: str, size=0):
640
+ def push_constant(self, type: str, name: str, size: int = 0):
655
641
  """Specify a global access constant.
656
642
 
657
643
  :param type: One of these types:
@@ -689,6 +675,7 @@ class GPUShaderCreateInfo:
689
675
  :param name: Name of the constant.
690
676
  :type name: str
691
677
  :param size: If not zero, indicates that the constant is an array with the specified size.
678
+ :type size: int
692
679
  """
693
680
 
694
681
  def sampler(self, slot: int, type: str, name: str):
@@ -773,7 +760,7 @@ class GPUShaderCreateInfo:
773
760
  """
774
761
 
775
762
  def uniform_buf(self, slot: int, type_name: str, name: str):
776
- """Specify a uniform variable whose type can be one of those declared in typedef_source.
763
+ """Specify a uniform variable whose type can be one of those declared in `gpu.types.GPUShaderCreateInfo.typedef_source`.
777
764
 
778
765
  :param slot: The uniform variable index.
779
766
  :type slot: int
@@ -991,7 +978,7 @@ class GPUTexture:
991
978
  :param format: The format that describes the content of a single item.
992
979
  Possible values are FLOAT, INT, UINT, UBYTE, UINT_24_8 and 10_11_11_REV.
993
980
  :type format: str
994
- :param value: sequence each representing the value to fill.
981
+ :param value: Sequence each representing the value to fill. Sizes 1..4 are supported.
995
982
  """
996
983
 
997
984
  def read(self):
@@ -1009,13 +996,11 @@ class GPUUniformBuf:
1009
996
  class GPUVertBuf:
1010
997
  """Contains a VBO."""
1011
998
 
1012
- def attr_fill(self, id: int | str, data: list[float]):
999
+ def attr_fill(self, id, data):
1013
1000
  """Insert data into the buffer for a single attribute.
1014
1001
 
1015
1002
  :param id: Either the name or the id of the attribute.
1016
- :type id: int | str
1017
- :param data: Sequence of data that should be stored in the buffer
1018
- :type data: list[float]
1003
+ :param data: Buffer or sequence of data that should be stored in the buffer
1019
1004
  """
1020
1005
 
1021
1006
  class GPUVertFormat:
@@ -4,16 +4,16 @@ import typing_extensions
4
4
  import gpu.types
5
5
 
6
6
  def batch_for_shader(
7
- shader: gpu.types.GPUShader, type: str, content: dict, *, indices=None
7
+ shader: gpu.types.GPUShader, type: str, content, *, indices=None
8
8
  ) -> gpu.types.GPUBatch:
9
9
  """Return a batch already configured and compatible with the shader.
10
10
 
11
- :param shader: shader for which a compatible format will be computed.
12
- :type shader: gpu.types.GPUShader
13
- :param type: "'POINTS', 'LINES', 'TRIS' or 'LINES_ADJ'".
14
- :type type: str
15
- :param content: Maps the name of the shader attribute with the data to fill the vertex buffer.
16
- :type content: dict
17
- :return: compatible batch
18
- :rtype: gpu.types.GPUBatch
11
+ :param shader: shader for which a compatible format will be computed.
12
+ :type shader: gpu.types.GPUShader
13
+ :param type: "'POINTS', 'LINES', 'TRIS' or 'LINES_ADJ'".
14
+ :type type: str
15
+ :param content: Maps the name of the shader attribute with the data to fill the vertex buffer.
16
+ For the dictionary values see documentation for `gpu.types.GPUVertBuf.attr_fill` data argument.
17
+ :return: compatible batch
18
+ :rtype: gpu.types.GPUBatch
19
19
  """
@@ -4,24 +4,17 @@ import typing_extensions
4
4
  import gpu.types
5
5
  import mathutils
6
6
 
7
- def draw_circle_2d(
8
- position: collections.abc.Sequence[float] | mathutils.Vector,
9
- color,
10
- radius: float,
11
- *,
12
- segments: int | None = None,
13
- ):
7
+ def draw_circle_2d(position, color, radius: float, *, segments=None):
14
8
  """Draw a circle.
15
9
 
16
- :param position: Position where the circle will be drawn.
17
- :type position: collections.abc.Sequence[float] | mathutils.Vector
18
- :param color: Color of the circle. To use transparency GL_BLEND has to be enabled.
10
+ :param position: 2D position where the circle will be drawn.
11
+ :param color: Color of the circle (RGBA).
12
+ To use transparency blend must be set to ALPHA, see: `gpu.state.blend_set`.
19
13
  :param radius: Radius of the circle.
20
14
  :type radius: float
21
15
  :param segments: How many segments will be used to draw the circle.
22
16
  Higher values give better results but the drawing will take longer.
23
17
  If None or not specified, an automatic value will be calculated.
24
- :type segments: int | None
25
18
  """
26
19
 
27
20
  def draw_texture_2d(
idprop/types/__init__.pyi CHANGED
@@ -40,11 +40,10 @@ class IDPropertyGroup:
40
40
  def to_dict(self):
41
41
  """Return a purely Python version of the group."""
42
42
 
43
- def update(self, other: dict | typing_extensions.Self):
43
+ def update(self, other):
44
44
  """Update key, values.
45
45
 
46
46
  :param other: Updates the values in the group with this.
47
- :type other: dict | typing_extensions.Self
48
47
  """
49
48
 
50
49
  def values(self):
imbuf/__init__.pyi CHANGED
@@ -18,11 +18,10 @@ import imbuf.types
18
18
 
19
19
  from . import types as types
20
20
 
21
- def load(filepath: bytes | str) -> imbuf.types.ImBuf:
21
+ def load(filepath) -> imbuf.types.ImBuf:
22
22
  """Load an image from a file.
23
23
 
24
24
  :param filepath: the filepath of the image.
25
- :type filepath: bytes | str
26
25
  :return: the newly loaded image.
27
26
  :rtype: imbuf.types.ImBuf
28
27
  """
@@ -35,11 +34,10 @@ def new(size) -> imbuf.types.ImBuf:
35
34
  :rtype: imbuf.types.ImBuf
36
35
  """
37
36
 
38
- def write(image: imbuf.types.ImBuf, filepath: bytes | str = image.filepath):
37
+ def write(image: imbuf.types.ImBuf, filepath=image.filepath):
39
38
  """Write an image.
40
39
 
41
40
  :param image: the image to write.
42
41
  :type image: imbuf.types.ImBuf
43
42
  :param filepath: Optional filepath of the image (fallback to the images file path).
44
- :type filepath: bytes | str
45
43
  """
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):