fake-bge-module 20250103__py3-none-any.whl → 20250201__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.
- addon_utils/__init__.pyi +11 -6
- aud/__init__.pyi +4 -0
- bge/types/__init__.pyi +66 -27
- bgl/__init__.pyi +2 -2
- bgui/image/__init__.pyi +3 -1
- bgui/system/__init__.pyi +12 -4
- bl_console_utils/autocomplete/complete_calltip/__init__.pyi +5 -2
- bl_console_utils/autocomplete/complete_import/__init__.pyi +6 -3
- bl_console_utils/autocomplete/complete_namespace/__init__.pyi +2 -1
- bl_console_utils/autocomplete/intellisense/__init__.pyi +8 -2
- bl_operators/node/__init__.pyi +78 -0
- bl_ui/anim/__init__.pyi +6 -0
- bl_ui/generic_ui_list/__init__.pyi +2 -2
- bl_ui/node_add_menu_shader/__init__.pyi +0 -1
- bl_ui/node_add_menu_texture/__init__.pyi +1 -0
- bl_ui/properties_data_camera/__init__.pyi +0 -2
- bl_ui/properties_mask_common/__init__.pyi +17 -0
- bl_ui/properties_material_gpencil/__init__.pyi +29 -0
- bl_ui/properties_scene/__init__.pyi +6 -0
- bl_ui/properties_view_layer/__init__.pyi +1 -0
- bl_ui/space_clip/__init__.pyi +53 -0
- bl_ui/space_graph/__init__.pyi +2 -0
- bl_ui/space_image/__init__.pyi +25 -0
- bl_ui/space_node/__init__.pyi +0 -1
- bl_ui/space_sequencer/__init__.pyi +2 -1
- blf/__init__.pyi +6 -3
- bmesh/ops/__init__.pyi +111 -54
- bmesh/types/__init__.pyi +134 -46
- bmesh/utils/__init__.pyi +17 -5
- bpy/__init__.pyi +1 -2
- bpy/_typing/__init__.pyi +4 -0
- bpy/{typing → _typing/rna_enums}/__init__.pyi +36 -36
- bpy/app/__init__.pyi +13 -5
- bpy/app/handlers/__init__.pyi +4 -2
- bpy/app/icons/__init__.pyi +6 -2
- bpy/app/translations/__init__.pyi +17 -8
- bpy/msgbus/__init__.pyi +14 -2
- bpy/ops/action/__init__.pyi +51 -151
- bpy/ops/anim/__init__.pyi +61 -179
- bpy/ops/armature/__init__.pyi +48 -147
- bpy/ops/asset/__init__.pyi +16 -71
- bpy/ops/boid/__init__.pyi +11 -44
- bpy/ops/brush/__init__.pyi +16 -42
- bpy/ops/buttons/__init__.pyi +6 -29
- bpy/ops/cachefile/__init__.pyi +5 -19
- bpy/ops/camera/__init__.pyi +2 -5
- bpy/ops/clip/__init__.pyi +95 -293
- bpy/ops/cloth/__init__.pyi +1 -3
- bpy/ops/collection/__init__.pyi +10 -26
- bpy/ops/console/__init__.pyi +21 -79
- bpy/ops/constraint/__init__.pyi +18 -45
- bpy/ops/curve/__init__.pyi +57 -186
- bpy/ops/curves/__init__.pyi +37 -109
- bpy/ops/cycles/__init__.pyi +3 -9
- bpy/ops/dpaint/__init__.pyi +8 -22
- bpy/ops/ed/__init__.pyi +20 -52
- bpy/ops/export_anim/__init__.pyi +1 -3
- bpy/ops/export_scene/__init__.pyi +55 -32
- bpy/ops/extensions/__init__.pyi +34 -110
- bpy/ops/file/__init__.pyi +40 -167
- bpy/ops/fluid/__init__.pyi +14 -77
- bpy/ops/font/__init__.pyi +23 -85
- bpy/ops/geometry/__init__.pyi +29 -46
- bpy/ops/gizmogroup/__init__.pyi +2 -9
- bpy/ops/gpencil/__init__.pyi +8 -32
- bpy/ops/graph/__init__.pyi +82 -201
- bpy/ops/grease_pencil/__init__.pyi +125 -324
- bpy/ops/image/__init__.pyi +61 -163
- bpy/ops/import_anim/__init__.pyi +1 -3
- bpy/ops/import_curve/__init__.pyi +1 -3
- bpy/ops/import_scene/__init__.pyi +4 -6
- bpy/ops/info/__init__.pyi +7 -29
- bpy/ops/lattice/__init__.pyi +11 -32
- bpy/ops/logic/__init__.pyi +26 -65
- bpy/ops/marker/__init__.pyi +11 -31
- bpy/ops/mask/__init__.pyi +39 -132
- bpy/ops/material/__init__.pyi +3 -19
- bpy/ops/mball/__init__.pyi +8 -19
- bpy/ops/mesh/__init__.pyi +223 -470
- bpy/ops/nla/__init__.pyi +42 -150
- bpy/ops/node/__init__.pyi +169 -393
- bpy/ops/object/__init__.pyi +320 -749
- bpy/ops/outliner/__init__.pyi +76 -268
- bpy/ops/paint/__init__.pyi +67 -147
- bpy/ops/paintcurve/__init__.pyi +8 -33
- bpy/ops/palette/__init__.pyi +7 -27
- bpy/ops/particle/__init__.pyi +39 -134
- bpy/ops/pose/__init__.pyi +64 -182
- bpy/ops/poselib/__init__.pyi +9 -33
- bpy/ops/preferences/__init__.pyi +35 -94
- bpy/ops/ptcache/__init__.pyi +7 -33
- bpy/ops/render/__init__.pyi +13 -37
- bpy/ops/rigidbody/__init__.pyi +22 -54
- bpy/ops/scene/__init__.pyi +47 -130
- bpy/ops/screen/__init__.pyi +46 -144
- bpy/ops/script/__init__.pyi +3 -11
- bpy/ops/sculpt/__init__.pyi +40 -94
- bpy/ops/sculpt_curves/__init__.pyi +4 -10
- bpy/ops/sequencer/__init__.pyi +104 -327
- bpy/ops/sound/__init__.pyi +17 -28
- bpy/ops/spreadsheet/__init__.pyi +4 -15
- bpy/ops/surface/__init__.pyi +6 -13
- bpy/ops/text/__init__.pyi +43 -175
- bpy/ops/text_editor/__init__.pyi +1 -3
- bpy/ops/texture/__init__.pyi +4 -21
- bpy/ops/transform/__init__.pyi +114 -134
- bpy/ops/ui/__init__.pyi +39 -120
- bpy/ops/uilist/__init__.pyi +3 -7
- bpy/ops/uv/__init__.pyi +58 -143
- bpy/ops/view2d/__init__.pyi +14 -39
- bpy/ops/view3d/__init__.pyi +68 -238
- bpy/ops/wm/__init__.pyi +178 -319
- bpy/ops/workspace/__init__.pyi +7 -33
- bpy/ops/world/__init__.pyi +2 -11
- bpy/path/__init__.pyi +16 -6
- bpy/props/__init__.pyi +157 -127
- bpy/types/__init__.pyi +35227 -34838
- bpy/utils/__init__.pyi +71 -25
- bpy/utils/previews/__init__.pyi +2 -1
- bpy/utils/units/__init__.pyi +2 -1
- bpy_extras/anim_utils/__init__.pyi +11 -3
- bpy_extras/bmesh_utils/__init__.pyi +2 -1
- bpy_extras/image_utils/__init__.pyi +5 -2
- bpy_extras/io_utils/__init__.pyi +12 -5
- bpy_extras/mesh_utils/__init__.pyi +27 -6
- bpy_extras/object_utils/__init__.pyi +6 -5
- bpy_extras/view3d_utils/__init__.pyi +9 -2
- {fake_bge_module-20250103.dist-info → fake_bge_module-20250201.dist-info}/METADATA +3 -3
- {fake_bge_module-20250103.dist-info → fake_bge_module-20250201.dist-info}/RECORD +153 -152
- {fake_bge_module-20250103.dist-info → fake_bge_module-20250201.dist-info}/WHEEL +1 -1
- freestyle/chainingiterators/__init__.pyi +7 -2
- freestyle/functions/__init__.pyi +16 -4
- freestyle/shaders/__init__.pyi +5 -1
- freestyle/types/__init__.pyi +103 -30
- freestyle/utils/ContextFunctions/__init__.pyi +2 -2
- freestyle/utils/__init__.pyi +2 -1
- gpu/capabilities/__init__.pyi +2 -1
- gpu/matrix/__init__.pyi +4 -2
- gpu/state/__init__.pyi +2 -2
- gpu/types/__init__.pyi +40 -8
- gpu_extras/batch/__init__.pyi +13 -1
- gpu_extras/presets/__init__.pyi +10 -1
- idprop/types/__init__.pyi +4 -2
- imbuf/__init__.pyi +6 -3
- imbuf/types/__init__.pyi +5 -2
- mathutils/__init__.pyi +126 -35
- mathutils/bvhtree/__init__.pyi +21 -6
- mathutils/geometry/__init__.pyi +68 -22
- mathutils/interpolate/__init__.pyi +5 -1
- mathutils/kdtree/__init__.pyi +21 -8
- mathutils/noise/__init__.pyi +2 -1
- rna_info/__init__.pyi +2 -1
- {fake_bge_module-20250103.dist-info → fake_bge_module-20250201.dist-info}/top_level.txt +0 -0
mathutils/__init__.pyi
CHANGED
|
@@ -171,10 +171,11 @@ class Color:
|
|
|
171
171
|
:rtype: typing_extensions.Self
|
|
172
172
|
"""
|
|
173
173
|
|
|
174
|
-
def __init__(self, rgb=(0.0, 0.0, 0.0)):
|
|
174
|
+
def __init__(self, rgb: collections.abc.Sequence[float] = (0.0, 0.0, 0.0)):
|
|
175
175
|
"""
|
|
176
176
|
|
|
177
177
|
:param rgb:
|
|
178
|
+
:type rgb: collections.abc.Sequence[float]
|
|
178
179
|
"""
|
|
179
180
|
|
|
180
181
|
def __get__(self, instance, owner) -> typing_extensions.Self:
|
|
@@ -347,13 +348,13 @@ class Color:
|
|
|
347
348
|
"""
|
|
348
349
|
|
|
349
350
|
@typing.overload
|
|
350
|
-
def __setitem__(self, key: slice, value: collections.abc.Iterable[float]):
|
|
351
|
+
def __setitem__(self, key: slice, value: collections.abc.Iterable[float] | Color):
|
|
351
352
|
"""
|
|
352
353
|
|
|
353
354
|
:param key:
|
|
354
355
|
:type key: slice
|
|
355
356
|
:param value:
|
|
356
|
-
:type value: collections.abc.Iterable[float]
|
|
357
|
+
:type value: collections.abc.Iterable[float] | Color
|
|
357
358
|
"""
|
|
358
359
|
|
|
359
360
|
class Euler:
|
|
@@ -422,10 +423,18 @@ class Euler:
|
|
|
422
423
|
:param other:
|
|
423
424
|
"""
|
|
424
425
|
|
|
425
|
-
def rotate(
|
|
426
|
+
def rotate(
|
|
427
|
+
self,
|
|
428
|
+
other: Matrix
|
|
429
|
+
| Quaternion
|
|
430
|
+
| collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
431
|
+
| collections.abc.Sequence[float]
|
|
432
|
+
| typing_extensions.Self,
|
|
433
|
+
):
|
|
426
434
|
"""Rotates the euler by another mathutils value.
|
|
427
435
|
|
|
428
436
|
:param other: rotation component of mathutils value
|
|
437
|
+
:type other: Matrix | Quaternion | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[float] | typing_extensions.Self
|
|
429
438
|
"""
|
|
430
439
|
|
|
431
440
|
def rotate_axis(self, axis: str, angle: float):
|
|
@@ -455,11 +464,17 @@ class Euler:
|
|
|
455
464
|
def zero(self):
|
|
456
465
|
"""Set all values to zero."""
|
|
457
466
|
|
|
458
|
-
def __init__(
|
|
467
|
+
def __init__(
|
|
468
|
+
self,
|
|
469
|
+
angles: collections.abc.Sequence[float] = (0.0, 0.0, 0.0),
|
|
470
|
+
order: str = "XYZ",
|
|
471
|
+
):
|
|
459
472
|
"""
|
|
460
473
|
|
|
461
474
|
:param angles:
|
|
475
|
+
:type angles: collections.abc.Sequence[float]
|
|
462
476
|
:param order:
|
|
477
|
+
:type order: str
|
|
463
478
|
"""
|
|
464
479
|
|
|
465
480
|
def __get__(self, instance, owner) -> typing_extensions.Self:
|
|
@@ -512,13 +527,13 @@ class Euler:
|
|
|
512
527
|
"""
|
|
513
528
|
|
|
514
529
|
@typing.overload
|
|
515
|
-
def __setitem__(self, key: slice, value: collections.abc.Iterable[float]):
|
|
530
|
+
def __setitem__(self, key: slice, value: collections.abc.Iterable[float] | Euler):
|
|
516
531
|
"""
|
|
517
532
|
|
|
518
533
|
:param key:
|
|
519
534
|
:type key: slice
|
|
520
535
|
:param value:
|
|
521
|
-
:type value: collections.abc.Iterable[float]
|
|
536
|
+
:type value: collections.abc.Iterable[float] | Euler
|
|
522
537
|
"""
|
|
523
538
|
|
|
524
539
|
class Matrix:
|
|
@@ -612,24 +627,40 @@ class Matrix:
|
|
|
612
627
|
"""
|
|
613
628
|
|
|
614
629
|
@classmethod
|
|
615
|
-
def LocRotScale(
|
|
630
|
+
def LocRotScale(
|
|
631
|
+
cls,
|
|
632
|
+
location: None | Vector | collections.abc.Sequence[float],
|
|
633
|
+
rotation: Euler
|
|
634
|
+
| None
|
|
635
|
+
| Quaternion
|
|
636
|
+
| collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
637
|
+
| collections.abc.Sequence[float]
|
|
638
|
+
| typing_extensions.Self,
|
|
639
|
+
scale: None | Vector | collections.abc.Sequence[float],
|
|
640
|
+
) -> typing_extensions.Self:
|
|
616
641
|
"""Create a matrix combining translation, rotation and scale,
|
|
617
642
|
acting as the inverse of the decompose() method.Any of the inputs may be replaced with None if not needed.
|
|
618
643
|
|
|
619
644
|
:param location: The translation component.
|
|
645
|
+
:type location: None | Vector | collections.abc.Sequence[float]
|
|
620
646
|
:param rotation: The rotation component as a 3x3 matrix, quaternion, euler or None for no rotation.
|
|
647
|
+
:type rotation: Euler | None | Quaternion | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[float] | typing_extensions.Self
|
|
621
648
|
:param scale: The scale component.
|
|
649
|
+
:type scale: None | Vector | collections.abc.Sequence[float]
|
|
622
650
|
:return: Combined transformation as a 4x4 matrix.
|
|
623
651
|
:rtype: typing_extensions.Self
|
|
624
652
|
"""
|
|
625
653
|
|
|
626
654
|
@classmethod
|
|
627
|
-
def OrthoProjection(
|
|
655
|
+
def OrthoProjection(
|
|
656
|
+
cls, axis: Vector | collections.abc.Sequence[float] | str, size: int
|
|
657
|
+
) -> typing_extensions.Self:
|
|
628
658
|
"""Create a matrix to represent an orthographic projection.
|
|
629
659
|
|
|
630
660
|
:param axis: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],
|
|
631
661
|
where a single axis is for a 2D matrix.
|
|
632
662
|
Or a vector for an arbitrary axis
|
|
663
|
+
:type axis: Vector | collections.abc.Sequence[float] | str
|
|
633
664
|
:param size: The size of the projection matrix to construct [2, 4].
|
|
634
665
|
:type size: int
|
|
635
666
|
:return: A new projection matrix.
|
|
@@ -637,7 +668,12 @@ class Matrix:
|
|
|
637
668
|
"""
|
|
638
669
|
|
|
639
670
|
@classmethod
|
|
640
|
-
def Rotation(
|
|
671
|
+
def Rotation(
|
|
672
|
+
cls,
|
|
673
|
+
angle: float,
|
|
674
|
+
size: int,
|
|
675
|
+
axis: Vector | collections.abc.Sequence[float] | str | None = "",
|
|
676
|
+
) -> typing_extensions.Self:
|
|
641
677
|
"""Create a matrix representing a rotation.
|
|
642
678
|
|
|
643
679
|
:param angle: The angle of rotation desired, in radians.
|
|
@@ -646,6 +682,7 @@ class Matrix:
|
|
|
646
682
|
:type size: int
|
|
647
683
|
:param axis: a string in ['X', 'Y', 'Z'] or a 3D Vector Object
|
|
648
684
|
(optional when size is 2).
|
|
685
|
+
:type axis: Vector | collections.abc.Sequence[float] | str | None
|
|
649
686
|
:return: A new rotation matrix.
|
|
650
687
|
:rtype: typing_extensions.Self
|
|
651
688
|
"""
|
|
@@ -670,7 +707,9 @@ class Matrix:
|
|
|
670
707
|
"""
|
|
671
708
|
|
|
672
709
|
@classmethod
|
|
673
|
-
def Shear(
|
|
710
|
+
def Shear(
|
|
711
|
+
cls, plane: str, size: int, factor: collections.abc.Sequence[float] | float
|
|
712
|
+
) -> typing_extensions.Self:
|
|
674
713
|
"""Create a matrix to represent an shear transformation.
|
|
675
714
|
|
|
676
715
|
:param plane: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],
|
|
@@ -679,6 +718,7 @@ class Matrix:
|
|
|
679
718
|
:param size: The size of the shear matrix to construct [2, 4].
|
|
680
719
|
:type size: int
|
|
681
720
|
: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.
|
|
721
|
+
:type factor: collections.abc.Sequence[float] | float
|
|
682
722
|
:return: A new shear matrix.
|
|
683
723
|
:rtype: typing_extensions.Self
|
|
684
724
|
"""
|
|
@@ -712,11 +752,11 @@ class Matrix:
|
|
|
712
752
|
:rtype: typing_extensions.Self
|
|
713
753
|
"""
|
|
714
754
|
|
|
715
|
-
def decompose(self) -> Quaternion:
|
|
755
|
+
def decompose(self) -> tuple[Vector, Quaternion, Vector]:
|
|
716
756
|
"""Return the translation, rotation, and scale components of this matrix.
|
|
717
757
|
|
|
718
758
|
:return: Tuple of translation, rotation, and scale.
|
|
719
|
-
:rtype: Quaternion
|
|
759
|
+
:rtype: tuple[Vector, Quaternion, Vector]
|
|
720
760
|
"""
|
|
721
761
|
|
|
722
762
|
def determinant(self) -> float:
|
|
@@ -756,12 +796,16 @@ class Matrix:
|
|
|
756
796
|
|
|
757
797
|
"""
|
|
758
798
|
|
|
759
|
-
def inverted(
|
|
799
|
+
def inverted(
|
|
800
|
+
self, fallback: typing.Any | None = None
|
|
801
|
+
) -> typing.Any | typing_extensions.Self:
|
|
760
802
|
"""Return an inverted copy of the matrix.
|
|
761
803
|
|
|
762
804
|
:param fallback: return this when the inverse can't be calculated
|
|
763
805
|
(instead of raising a `ValueError`).
|
|
806
|
+
:type fallback: typing.Any | None
|
|
764
807
|
:return: The inverted matrix or fallback when given.
|
|
808
|
+
:rtype: typing.Any | typing_extensions.Self
|
|
765
809
|
"""
|
|
766
810
|
|
|
767
811
|
def inverted_safe(self) -> typing_extensions.Self:
|
|
@@ -802,10 +846,18 @@ class Matrix:
|
|
|
802
846
|
def resize_4x4(self):
|
|
803
847
|
"""Resize the matrix to 4x4."""
|
|
804
848
|
|
|
805
|
-
def rotate(
|
|
849
|
+
def rotate(
|
|
850
|
+
self,
|
|
851
|
+
other: Euler
|
|
852
|
+
| Quaternion
|
|
853
|
+
| collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
854
|
+
| collections.abc.Sequence[float]
|
|
855
|
+
| typing_extensions.Self,
|
|
856
|
+
):
|
|
806
857
|
"""Rotates the matrix by another mathutils value.
|
|
807
858
|
|
|
808
859
|
:param other: rotation component of mathutils value
|
|
860
|
+
:type other: Euler | Quaternion | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[float] | typing_extensions.Self
|
|
809
861
|
"""
|
|
810
862
|
|
|
811
863
|
def to_2x2(self) -> typing_extensions.Self:
|
|
@@ -884,7 +936,7 @@ class Matrix:
|
|
|
884
936
|
|
|
885
937
|
def __init__(
|
|
886
938
|
self,
|
|
887
|
-
rows=(
|
|
939
|
+
rows: collections.abc.Sequence[collections.abc.Sequence[float]] = (
|
|
888
940
|
(1.0, 0.0, 0.0, 0.0),
|
|
889
941
|
(0.0, 1.0, 0.0, 0.0),
|
|
890
942
|
(0.0, 0.0, 1.0, 0.0),
|
|
@@ -894,6 +946,7 @@ class Matrix:
|
|
|
894
946
|
"""
|
|
895
947
|
|
|
896
948
|
:param rows:
|
|
949
|
+
:type rows: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
897
950
|
"""
|
|
898
951
|
|
|
899
952
|
def __get__(self, instance, owner) -> typing_extensions.Self:
|
|
@@ -952,14 +1005,15 @@ class Matrix:
|
|
|
952
1005
|
def __setitem__(
|
|
953
1006
|
self,
|
|
954
1007
|
key: slice,
|
|
955
|
-
value: collections.abc.Iterable[Vector | collections.abc.Iterable[float]]
|
|
1008
|
+
value: collections.abc.Iterable[Vector | collections.abc.Iterable[float]]
|
|
1009
|
+
| Matrix,
|
|
956
1010
|
):
|
|
957
1011
|
"""
|
|
958
1012
|
|
|
959
1013
|
:param key:
|
|
960
1014
|
:type key: slice
|
|
961
1015
|
:param value:
|
|
962
|
-
:type value: collections.abc.Iterable[Vector | collections.abc.Iterable[float]]
|
|
1016
|
+
:type value: collections.abc.Iterable[Vector | collections.abc.Iterable[float]] | Matrix
|
|
963
1017
|
"""
|
|
964
1018
|
|
|
965
1019
|
def __len__(self) -> int:
|
|
@@ -1217,10 +1271,18 @@ class Quaternion:
|
|
|
1217
1271
|
:rtype: typing_extensions.Self
|
|
1218
1272
|
"""
|
|
1219
1273
|
|
|
1220
|
-
def rotate(
|
|
1274
|
+
def rotate(
|
|
1275
|
+
self,
|
|
1276
|
+
other: Euler
|
|
1277
|
+
| Matrix
|
|
1278
|
+
| collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
1279
|
+
| collections.abc.Sequence[float]
|
|
1280
|
+
| typing_extensions.Self,
|
|
1281
|
+
):
|
|
1221
1282
|
"""Rotates the quaternion by another mathutils value.
|
|
1222
1283
|
|
|
1223
1284
|
:param other: rotation component of mathutils value
|
|
1285
|
+
:type other: Euler | Matrix | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[float] | typing_extensions.Self
|
|
1224
1286
|
"""
|
|
1225
1287
|
|
|
1226
1288
|
def rotation_difference(
|
|
@@ -1249,10 +1311,11 @@ class Quaternion:
|
|
|
1249
1311
|
:rtype: typing_extensions.Self
|
|
1250
1312
|
"""
|
|
1251
1313
|
|
|
1252
|
-
def to_axis_angle(self):
|
|
1314
|
+
def to_axis_angle(self) -> tuple[Vector, float]:
|
|
1253
1315
|
"""Return the axis, angle representation of the quaternion.
|
|
1254
1316
|
|
|
1255
1317
|
:return: Axis, angle.
|
|
1318
|
+
:rtype: tuple[Vector, float]
|
|
1256
1319
|
"""
|
|
1257
1320
|
|
|
1258
1321
|
def to_euler(
|
|
@@ -1287,19 +1350,27 @@ class Quaternion:
|
|
|
1287
1350
|
:rtype: Matrix
|
|
1288
1351
|
"""
|
|
1289
1352
|
|
|
1290
|
-
def to_swing_twist(self, axis: str):
|
|
1353
|
+
def to_swing_twist(self, axis: str) -> tuple[Quaternion, float]:
|
|
1291
1354
|
"""Split the rotation into a swing quaternion with the specified
|
|
1292
1355
|
axis fixed at zero, and the remaining twist rotation angle.
|
|
1293
1356
|
|
|
1294
1357
|
:param axis: Twist axis as a string in ['X', 'Y', 'Z'].
|
|
1295
1358
|
:type axis: str
|
|
1296
1359
|
:return: Swing, twist angle.
|
|
1360
|
+
:rtype: tuple[Quaternion, float]
|
|
1297
1361
|
"""
|
|
1298
1362
|
|
|
1299
|
-
def __init__(
|
|
1363
|
+
def __init__(
|
|
1364
|
+
self,
|
|
1365
|
+
seq: Vector | collections.abc.Sequence[float] = (1.0, 0.0, 0.0, 0.0),
|
|
1366
|
+
angle: float = 0.0,
|
|
1367
|
+
):
|
|
1300
1368
|
"""
|
|
1301
1369
|
|
|
1302
1370
|
:param seq:
|
|
1371
|
+
:type seq: Vector | collections.abc.Sequence[float]
|
|
1372
|
+
:param angle:
|
|
1373
|
+
:type angle: float
|
|
1303
1374
|
"""
|
|
1304
1375
|
|
|
1305
1376
|
def __get__(self, instance, owner) -> typing_extensions.Self:
|
|
@@ -1359,13 +1430,15 @@ class Quaternion:
|
|
|
1359
1430
|
"""
|
|
1360
1431
|
|
|
1361
1432
|
@typing.overload
|
|
1362
|
-
def __setitem__(
|
|
1433
|
+
def __setitem__(
|
|
1434
|
+
self, key: slice, value: collections.abc.Iterable[float] | Quaternion
|
|
1435
|
+
):
|
|
1363
1436
|
"""
|
|
1364
1437
|
|
|
1365
1438
|
:param key:
|
|
1366
1439
|
:type key: slice
|
|
1367
1440
|
:param value:
|
|
1368
|
-
:type value: collections.abc.Iterable[float]
|
|
1441
|
+
:type value: collections.abc.Iterable[float] | Quaternion
|
|
1369
1442
|
"""
|
|
1370
1443
|
|
|
1371
1444
|
def __add__(
|
|
@@ -3598,29 +3671,33 @@ class Vector:
|
|
|
3598
3671
|
def angle(
|
|
3599
3672
|
self,
|
|
3600
3673
|
other: collections.abc.Sequence[float] | typing_extensions.Self,
|
|
3601
|
-
fallback=None,
|
|
3602
|
-
):
|
|
3674
|
+
fallback: typing.Any | None = None,
|
|
3675
|
+
) -> float | typing.Any:
|
|
3603
3676
|
"""Return the angle between two vectors.
|
|
3604
3677
|
|
|
3605
3678
|
:param other: another vector to compare the angle with
|
|
3606
3679
|
:type other: collections.abc.Sequence[float] | typing_extensions.Self
|
|
3607
3680
|
:param fallback: return this when the angle can't be calculated (zero length vector),
|
|
3608
3681
|
(instead of raising a `ValueError`).
|
|
3682
|
+
:type fallback: typing.Any | None
|
|
3609
3683
|
:return: angle in radians or fallback when given
|
|
3684
|
+
:rtype: float | typing.Any
|
|
3610
3685
|
"""
|
|
3611
3686
|
|
|
3612
3687
|
def angle_signed(
|
|
3613
3688
|
self,
|
|
3614
3689
|
other: collections.abc.Sequence[float] | typing_extensions.Self,
|
|
3615
|
-
fallback=None,
|
|
3616
|
-
):
|
|
3690
|
+
fallback: typing.Any | None = None,
|
|
3691
|
+
) -> float | typing.Any:
|
|
3617
3692
|
"""Return the signed angle between two 2D vectors (clockwise is positive).
|
|
3618
3693
|
|
|
3619
3694
|
:param other: another vector to compare the angle with
|
|
3620
3695
|
:type other: collections.abc.Sequence[float] | typing_extensions.Self
|
|
3621
3696
|
:param fallback: return this when the angle can't be calculated (zero length vector),
|
|
3622
3697
|
(instead of raising a `ValueError`).
|
|
3698
|
+
:type fallback: typing.Any | None
|
|
3623
3699
|
:return: angle in radians or fallback when given
|
|
3700
|
+
:rtype: float | typing.Any
|
|
3624
3701
|
"""
|
|
3625
3702
|
|
|
3626
3703
|
def copy(self) -> typing_extensions.Self:
|
|
@@ -3630,12 +3707,15 @@ class Vector:
|
|
|
3630
3707
|
:rtype: typing_extensions.Self
|
|
3631
3708
|
"""
|
|
3632
3709
|
|
|
3633
|
-
def cross(
|
|
3710
|
+
def cross(
|
|
3711
|
+
self, other: collections.abc.Sequence[float] | typing_extensions.Self
|
|
3712
|
+
) -> float | typing_extensions.Self:
|
|
3634
3713
|
"""Return the cross product of this vector and another.
|
|
3635
3714
|
|
|
3636
3715
|
:param other: The other vector to perform the cross product with.
|
|
3637
3716
|
:type other: collections.abc.Sequence[float] | typing_extensions.Self
|
|
3638
3717
|
:return: The cross product as a vector or a float when 2D vectors are used.
|
|
3718
|
+
:rtype: float | typing_extensions.Self
|
|
3639
3719
|
"""
|
|
3640
3720
|
|
|
3641
3721
|
def dot(
|
|
@@ -3736,10 +3816,18 @@ class Vector:
|
|
|
3736
3816
|
:rtype: typing_extensions.Self
|
|
3737
3817
|
"""
|
|
3738
3818
|
|
|
3739
|
-
def rotate(
|
|
3819
|
+
def rotate(
|
|
3820
|
+
self,
|
|
3821
|
+
other: Euler
|
|
3822
|
+
| Matrix
|
|
3823
|
+
| Quaternion
|
|
3824
|
+
| collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
3825
|
+
| collections.abc.Sequence[float],
|
|
3826
|
+
):
|
|
3740
3827
|
"""Rotate the vector by a rotation value.
|
|
3741
3828
|
|
|
3742
3829
|
:param other: rotation component of mathutils value
|
|
3830
|
+
:type other: Euler | Matrix | Quaternion | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[float]
|
|
3743
3831
|
"""
|
|
3744
3832
|
|
|
3745
3833
|
def rotation_difference(
|
|
@@ -3758,7 +3846,7 @@ class Vector:
|
|
|
3758
3846
|
self,
|
|
3759
3847
|
other: collections.abc.Sequence[float] | typing_extensions.Self,
|
|
3760
3848
|
factor: float,
|
|
3761
|
-
fallback=None,
|
|
3849
|
+
fallback: typing.Any | None = None,
|
|
3762
3850
|
) -> typing_extensions.Self:
|
|
3763
3851
|
"""Returns the interpolation of two non-zero vectors (spherical coordinates).
|
|
3764
3852
|
|
|
@@ -3768,6 +3856,7 @@ class Vector:
|
|
|
3768
3856
|
:type factor: float
|
|
3769
3857
|
:param fallback: return this when the vector can't be calculated (zero length vector or direct opposites),
|
|
3770
3858
|
(instead of raising a `ValueError`).
|
|
3859
|
+
:type fallback: typing.Any | None
|
|
3771
3860
|
:return: The interpolated vector.
|
|
3772
3861
|
:rtype: typing_extensions.Self
|
|
3773
3862
|
"""
|
|
@@ -3804,21 +3893,23 @@ class Vector:
|
|
|
3804
3893
|
:rtype: Quaternion
|
|
3805
3894
|
"""
|
|
3806
3895
|
|
|
3807
|
-
def to_tuple(self, precision: int = -1):
|
|
3896
|
+
def to_tuple(self, precision: int = -1) -> tuple[float, ...]:
|
|
3808
3897
|
"""Return this vector as a tuple with.
|
|
3809
3898
|
|
|
3810
3899
|
:param precision: The number to round the value to in [-1, 21].
|
|
3811
3900
|
:type precision: int
|
|
3812
3901
|
:return: the values of the vector rounded by precision
|
|
3902
|
+
:rtype: tuple[float, ...]
|
|
3813
3903
|
"""
|
|
3814
3904
|
|
|
3815
3905
|
def zero(self):
|
|
3816
3906
|
"""Set all values to zero."""
|
|
3817
3907
|
|
|
3818
|
-
def __init__(self, seq=(0.0, 0.0, 0.0)):
|
|
3908
|
+
def __init__(self, seq: collections.abc.Sequence[float] = (0.0, 0.0, 0.0)):
|
|
3819
3909
|
"""
|
|
3820
3910
|
|
|
3821
3911
|
:param seq:
|
|
3912
|
+
:type seq: collections.abc.Sequence[float]
|
|
3822
3913
|
"""
|
|
3823
3914
|
|
|
3824
3915
|
def __get__(self, instance, owner) -> typing_extensions.Self:
|
|
@@ -3878,13 +3969,13 @@ class Vector:
|
|
|
3878
3969
|
"""
|
|
3879
3970
|
|
|
3880
3971
|
@typing.overload
|
|
3881
|
-
def __setitem__(self, key: slice, value: collections.abc.Iterable[float]):
|
|
3972
|
+
def __setitem__(self, key: slice, value: collections.abc.Iterable[float] | Vector):
|
|
3882
3973
|
"""
|
|
3883
3974
|
|
|
3884
3975
|
:param key:
|
|
3885
3976
|
:type key: slice
|
|
3886
3977
|
:param value:
|
|
3887
|
-
:type value: collections.abc.Iterable[float]
|
|
3978
|
+
:type value: collections.abc.Iterable[float] | Vector
|
|
3888
3979
|
"""
|
|
3889
3980
|
|
|
3890
3981
|
def __neg__(self) -> typing_extensions.Self:
|
mathutils/bvhtree/__init__.pyi
CHANGED
|
@@ -48,19 +48,29 @@ class BVHTree:
|
|
|
48
48
|
|
|
49
49
|
@classmethod
|
|
50
50
|
def FromPolygons(
|
|
51
|
-
cls,
|
|
51
|
+
cls,
|
|
52
|
+
vertices: collections.abc.Sequence[collections.abc.Sequence[float]],
|
|
53
|
+
polygons: collections.abc.Sequence[collections.abc.Sequence[int]],
|
|
54
|
+
all_triangles: bool = False,
|
|
55
|
+
epsilon: float = 0.0,
|
|
52
56
|
):
|
|
53
57
|
"""BVH tree constructed geometry passed in as arguments.
|
|
54
58
|
|
|
55
59
|
:param vertices: float triplets each representing (x, y, z)
|
|
60
|
+
:type vertices: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
56
61
|
:param polygons: Sequence of polygons, each containing indices to the vertices argument.
|
|
62
|
+
:type polygons: collections.abc.Sequence[collections.abc.Sequence[int]]
|
|
57
63
|
:param all_triangles: Use when all polygons are triangles for more efficient conversion.
|
|
58
64
|
:type all_triangles: bool
|
|
59
65
|
:param epsilon: Increase the threshold for detecting overlap and raycast hits.
|
|
60
66
|
:type epsilon: float
|
|
61
67
|
"""
|
|
62
68
|
|
|
63
|
-
def find_nearest(
|
|
69
|
+
def find_nearest(
|
|
70
|
+
self, origin, distance: float = 1.84467e19
|
|
71
|
+
) -> tuple[
|
|
72
|
+
mathutils.Vector | None, mathutils.Vector | None, int | None, float | None
|
|
73
|
+
]:
|
|
64
74
|
"""Find the nearest element (typically face index) to a point.
|
|
65
75
|
|
|
66
76
|
:param origin:
|
|
@@ -68,26 +78,28 @@ class BVHTree:
|
|
|
68
78
|
:type distance: float
|
|
69
79
|
:return: Returns a tuple: (position, normal, index, distance),
|
|
70
80
|
Values will all be None if no hit is found.
|
|
81
|
+
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None, int | None, float | None]
|
|
71
82
|
"""
|
|
72
83
|
|
|
73
84
|
def find_nearest_range(
|
|
74
85
|
self, origin, distance: float = 1.84467e19
|
|
75
|
-
) ->
|
|
86
|
+
) -> list[tuple[mathutils.Vector, mathutils.Vector, int, float]]:
|
|
76
87
|
"""Find the nearest elements (typically face index) to a point in the distance range.
|
|
77
88
|
|
|
78
89
|
:param origin:
|
|
79
90
|
:param distance: Maximum distance threshold.
|
|
80
91
|
:type distance: float
|
|
81
92
|
:return: Returns a list of tuples (position, normal, index, distance)
|
|
82
|
-
:rtype:
|
|
93
|
+
:rtype: list[tuple[mathutils.Vector, mathutils.Vector, int, float]]
|
|
83
94
|
"""
|
|
84
95
|
|
|
85
|
-
def overlap(self, other_tree: typing_extensions.Self):
|
|
96
|
+
def overlap(self, other_tree: typing_extensions.Self) -> list[tuple[int, int]]:
|
|
86
97
|
"""Find overlapping indices between 2 trees.
|
|
87
98
|
|
|
88
99
|
:param other_tree: Other tree to perform overlap test on.
|
|
89
100
|
:type other_tree: typing_extensions.Self
|
|
90
101
|
:return: Returns a list of unique index pairs, the first index referencing this tree, the second referencing the other_tree.
|
|
102
|
+
:rtype: list[tuple[int, int]]
|
|
91
103
|
"""
|
|
92
104
|
|
|
93
105
|
def ray_cast(
|
|
@@ -95,7 +107,9 @@ class BVHTree:
|
|
|
95
107
|
origin: collections.abc.Sequence[float] | mathutils.Vector,
|
|
96
108
|
direction: collections.abc.Sequence[float] | mathutils.Vector,
|
|
97
109
|
distance: float = sys.float_info.max,
|
|
98
|
-
)
|
|
110
|
+
) -> tuple[
|
|
111
|
+
mathutils.Vector | None, mathutils.Vector | None, int | None, float | None
|
|
112
|
+
]:
|
|
99
113
|
"""Cast a ray onto the mesh.
|
|
100
114
|
|
|
101
115
|
:param origin: Start location of the ray in object space.
|
|
@@ -106,6 +120,7 @@ class BVHTree:
|
|
|
106
120
|
:type distance: float
|
|
107
121
|
:return: Returns a tuple: (position, normal, index, distance),
|
|
108
122
|
Values will all be None if no hit is found.
|
|
123
|
+
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None, int | None, float | None]
|
|
109
124
|
"""
|
|
110
125
|
|
|
111
126
|
def __init__(self, size):
|