fake-bpy-module 20241229__py3-none-any.whl → 20241230__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.
- addon_utils/__init__.pyi +9 -5
- bmesh/types/__init__.pyi +52 -23
- bmesh/utils/__init__.pyi +4 -2
- bpy/app/translations/__init__.pyi +12 -12
- bpy/path/__init__.pyi +2 -1
- bpy/props/__init__.pyi +87 -63
- bpy/types/__init__.pyi +70 -52
- bpy/utils/__init__.pyi +6 -4
- bpy/utils/units/__init__.pyi +2 -2
- bpy_extras/anim_utils/__init__.pyi +10 -7
- bpy_extras/image_utils/__init__.pyi +4 -4
- bpy_extras/io_utils/__init__.pyi +6 -5
- bpy_extras/mesh_utils/__init__.pyi +9 -3
- bpy_extras/object_utils/__init__.pyi +2 -2
- bpy_extras/view3d_utils/__init__.pyi +4 -3
- {fake_bpy_module-20241229.dist-info → fake_bpy_module-20241230.dist-info}/METADATA +1 -1
- {fake_bpy_module-20241229.dist-info → fake_bpy_module-20241230.dist-info}/RECORD +32 -32
- freestyle/chainingiterators/__init__.pyi +4 -4
- freestyle/types/__init__.pyi +6 -6
- gpu/matrix/__init__.pyi +4 -2
- gpu/types/__init__.pyi +39 -12
- gpu_extras/batch/__init__.pyi +10 -2
- gpu_extras/presets/__init__.pyi +10 -2
- imbuf/__init__.pyi +2 -2
- mathutils/__init__.pyi +31 -12
- mathutils/bvhtree/__init__.pyi +15 -5
- mathutils/geometry/__init__.pyi +41 -22
- mathutils/interpolate/__init__.pyi +4 -1
- mathutils/kdtree/__init__.pyi +13 -5
- rna_info/__init__.pyi +2 -2
- {fake_bpy_module-20241229.dist-info → fake_bpy_module-20241230.dist-info}/WHEEL +0 -0
- {fake_bpy_module-20241229.dist-info → fake_bpy_module-20241230.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:
|
|
@@ -463,11 +464,17 @@ class Euler:
|
|
|
463
464
|
def zero(self):
|
|
464
465
|
"""Set all values to zero."""
|
|
465
466
|
|
|
466
|
-
def __init__(
|
|
467
|
+
def __init__(
|
|
468
|
+
self,
|
|
469
|
+
angles: collections.abc.Sequence[float] = (0.0, 0.0, 0.0),
|
|
470
|
+
order: str = "XYZ",
|
|
471
|
+
):
|
|
467
472
|
"""
|
|
468
473
|
|
|
469
474
|
:param angles:
|
|
475
|
+
:type angles: collections.abc.Sequence[float]
|
|
470
476
|
:param order:
|
|
477
|
+
:type order: str
|
|
471
478
|
"""
|
|
472
479
|
|
|
473
480
|
def __get__(self, instance, owner) -> typing_extensions.Self:
|
|
@@ -622,23 +629,24 @@ class Matrix:
|
|
|
622
629
|
@classmethod
|
|
623
630
|
def LocRotScale(
|
|
624
631
|
cls,
|
|
625
|
-
location: Vector | collections.abc.Sequence[float],
|
|
632
|
+
location: None | Vector | collections.abc.Sequence[float],
|
|
626
633
|
rotation: Euler
|
|
634
|
+
| None
|
|
627
635
|
| Quaternion
|
|
628
636
|
| collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
629
637
|
| collections.abc.Sequence[float]
|
|
630
638
|
| typing_extensions.Self,
|
|
631
|
-
scale: Vector | collections.abc.Sequence[float],
|
|
639
|
+
scale: None | Vector | collections.abc.Sequence[float],
|
|
632
640
|
) -> typing_extensions.Self:
|
|
633
641
|
"""Create a matrix combining translation, rotation and scale,
|
|
634
642
|
acting as the inverse of the decompose() method.Any of the inputs may be replaced with None if not needed.
|
|
635
643
|
|
|
636
644
|
:param location: The translation component.
|
|
637
|
-
:type location: Vector | collections.abc.Sequence[float]
|
|
645
|
+
:type location: None | Vector | collections.abc.Sequence[float]
|
|
638
646
|
: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
|
|
647
|
+
:type rotation: Euler | None | Quaternion | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[float] | typing_extensions.Self
|
|
640
648
|
:param scale: The scale component.
|
|
641
|
-
:type scale: Vector | collections.abc.Sequence[float]
|
|
649
|
+
:type scale: None | Vector | collections.abc.Sequence[float]
|
|
642
650
|
:return: Combined transformation as a 4x4 matrix.
|
|
643
651
|
:rtype: typing_extensions.Self
|
|
644
652
|
"""
|
|
@@ -699,7 +707,9 @@ class Matrix:
|
|
|
699
707
|
"""
|
|
700
708
|
|
|
701
709
|
@classmethod
|
|
702
|
-
def Shear(
|
|
710
|
+
def Shear(
|
|
711
|
+
cls, plane: str, size: int, factor: collections.abc.Sequence[float] | float
|
|
712
|
+
) -> typing_extensions.Self:
|
|
703
713
|
"""Create a matrix to represent an shear transformation.
|
|
704
714
|
|
|
705
715
|
:param plane: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],
|
|
@@ -708,7 +718,7 @@ class Matrix:
|
|
|
708
718
|
:param size: The size of the shear matrix to construct [2, 4].
|
|
709
719
|
:type size: int
|
|
710
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.
|
|
711
|
-
:type factor: float
|
|
721
|
+
:type factor: collections.abc.Sequence[float] | float
|
|
712
722
|
:return: A new shear matrix.
|
|
713
723
|
:rtype: typing_extensions.Self
|
|
714
724
|
"""
|
|
@@ -926,7 +936,7 @@ class Matrix:
|
|
|
926
936
|
|
|
927
937
|
def __init__(
|
|
928
938
|
self,
|
|
929
|
-
rows=(
|
|
939
|
+
rows: collections.abc.Sequence[collections.abc.Sequence[float]] = (
|
|
930
940
|
(1.0, 0.0, 0.0, 0.0),
|
|
931
941
|
(0.0, 1.0, 0.0, 0.0),
|
|
932
942
|
(0.0, 0.0, 1.0, 0.0),
|
|
@@ -936,6 +946,7 @@ class Matrix:
|
|
|
936
946
|
"""
|
|
937
947
|
|
|
938
948
|
:param rows:
|
|
949
|
+
:type rows: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
939
950
|
"""
|
|
940
951
|
|
|
941
952
|
def __get__(self, instance, owner) -> typing_extensions.Self:
|
|
@@ -1348,10 +1359,17 @@ class Quaternion:
|
|
|
1348
1359
|
:rtype: tuple[Quaternion, float]
|
|
1349
1360
|
"""
|
|
1350
1361
|
|
|
1351
|
-
def __init__(
|
|
1362
|
+
def __init__(
|
|
1363
|
+
self,
|
|
1364
|
+
seq: Vector | collections.abc.Sequence[float] = (1.0, 0.0, 0.0, 0.0),
|
|
1365
|
+
angle: float = 0.0,
|
|
1366
|
+
):
|
|
1352
1367
|
"""
|
|
1353
1368
|
|
|
1354
1369
|
:param seq:
|
|
1370
|
+
:type seq: Vector | collections.abc.Sequence[float]
|
|
1371
|
+
:param angle:
|
|
1372
|
+
:type angle: float
|
|
1355
1373
|
"""
|
|
1356
1374
|
|
|
1357
1375
|
def __get__(self, instance, owner) -> typing_extensions.Self:
|
|
@@ -3884,10 +3902,11 @@ class Vector:
|
|
|
3884
3902
|
def zero(self):
|
|
3885
3903
|
"""Set all values to zero."""
|
|
3886
3904
|
|
|
3887
|
-
def __init__(self, seq=(0.0, 0.0, 0.0)):
|
|
3905
|
+
def __init__(self, seq: collections.abc.Sequence[float] = (0.0, 0.0, 0.0)):
|
|
3888
3906
|
"""
|
|
3889
3907
|
|
|
3890
3908
|
:param seq:
|
|
3909
|
+
:type seq: collections.abc.Sequence[float]
|
|
3891
3910
|
"""
|
|
3892
3911
|
|
|
3893
3912
|
def __get__(self, instance, owner) -> typing_extensions.Self:
|
mathutils/bvhtree/__init__.pyi
CHANGED
|
@@ -48,12 +48,18 @@ 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.
|
|
@@ -62,7 +68,9 @@ class BVHTree:
|
|
|
62
68
|
|
|
63
69
|
def find_nearest(
|
|
64
70
|
self, origin, distance: float = 1.84467e19
|
|
65
|
-
) -> tuple[
|
|
71
|
+
) -> tuple[
|
|
72
|
+
mathutils.Vector | None, mathutils.Vector | None, int | None, float | None
|
|
73
|
+
]:
|
|
66
74
|
"""Find the nearest element (typically face index) to a point.
|
|
67
75
|
|
|
68
76
|
:param origin:
|
|
@@ -70,7 +78,7 @@ class BVHTree:
|
|
|
70
78
|
:type distance: float
|
|
71
79
|
:return: Returns a tuple: (position, normal, index, distance),
|
|
72
80
|
Values will all be None if no hit is found.
|
|
73
|
-
:rtype: tuple[mathutils.Vector, mathutils.Vector, int, float]
|
|
81
|
+
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None, int | None, float | None]
|
|
74
82
|
"""
|
|
75
83
|
|
|
76
84
|
def find_nearest_range(
|
|
@@ -99,7 +107,9 @@ class BVHTree:
|
|
|
99
107
|
origin: collections.abc.Sequence[float] | mathutils.Vector,
|
|
100
108
|
direction: collections.abc.Sequence[float] | mathutils.Vector,
|
|
101
109
|
distance: float = sys.float_info.max,
|
|
102
|
-
) -> tuple[
|
|
110
|
+
) -> tuple[
|
|
111
|
+
mathutils.Vector | None, mathutils.Vector | None, int | None, float | None
|
|
112
|
+
]:
|
|
103
113
|
"""Cast a ray onto the mesh.
|
|
104
114
|
|
|
105
115
|
:param origin: Start location of the ray in object space.
|
|
@@ -110,7 +120,7 @@ class BVHTree:
|
|
|
110
120
|
:type distance: float
|
|
111
121
|
:return: Returns a tuple: (position, normal, index, distance),
|
|
112
122
|
Values will all be None if no hit is found.
|
|
113
|
-
:rtype: tuple[mathutils.Vector, mathutils.Vector, int, float]
|
|
123
|
+
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None, int | None, float | None]
|
|
114
124
|
"""
|
|
115
125
|
|
|
116
126
|
def __init__(self, size):
|
mathutils/geometry/__init__.pyi
CHANGED
|
@@ -53,10 +53,13 @@ def barycentric_transform(
|
|
|
53
53
|
:rtype: mathutils.Vector
|
|
54
54
|
"""
|
|
55
55
|
|
|
56
|
-
def box_fit_2d(
|
|
56
|
+
def box_fit_2d(
|
|
57
|
+
points: collections.abc.Sequence[collections.abc.Sequence[float]],
|
|
58
|
+
) -> float:
|
|
57
59
|
"""Returns an angle that best fits the points to an axis aligned rectangle
|
|
58
60
|
|
|
59
61
|
:param points: Sequence of 2D points.
|
|
62
|
+
:type points: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
60
63
|
:return: angle
|
|
61
64
|
:rtype: float
|
|
62
65
|
"""
|
|
@@ -92,16 +95,26 @@ def closest_point_on_tri(
|
|
|
92
95
|
:rtype: mathutils.Vector
|
|
93
96
|
"""
|
|
94
97
|
|
|
95
|
-
def convex_hull_2d(
|
|
98
|
+
def convex_hull_2d(
|
|
99
|
+
points: collections.abc.Sequence[collections.abc.Sequence[float]],
|
|
100
|
+
) -> list[int]:
|
|
96
101
|
"""Returns a list of indices into the list given
|
|
97
102
|
|
|
98
103
|
:param points: Sequence of 2D points.
|
|
104
|
+
:type points: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
99
105
|
:return: a list of indices
|
|
100
106
|
:rtype: list[int]
|
|
101
107
|
"""
|
|
102
108
|
|
|
103
109
|
def delaunay_2d_cdt(
|
|
104
|
-
vert_coords
|
|
110
|
+
vert_coords: collections.abc.Sequence[
|
|
111
|
+
collections.abc.Sequence[float] | mathutils.Vector
|
|
112
|
+
],
|
|
113
|
+
edges: collections.abc.Sequence[collections.abc.Sequence[int, int]],
|
|
114
|
+
faces: collections.abc.Sequence[collections.abc.Sequence[int]],
|
|
115
|
+
output_type: int,
|
|
116
|
+
epsilon: float,
|
|
117
|
+
need_ids=True,
|
|
105
118
|
) -> tuple[
|
|
106
119
|
list[mathutils.Vector],
|
|
107
120
|
list[tuple[int, int]],
|
|
@@ -124,8 +137,11 @@ def delaunay_2d_cdt(
|
|
|
124
137
|
of the orig arrays, which may save some time.
|
|
125
138
|
|
|
126
139
|
:param vert_coords: Vertex coordinates (2d)
|
|
140
|
+
:type vert_coords: collections.abc.Sequence[collections.abc.Sequence[float] | mathutils.Vector]
|
|
127
141
|
:param edges: Edges, as pairs of indices in vert_coords
|
|
142
|
+
:type edges: collections.abc.Sequence[collections.abc.Sequence[int, int]]
|
|
128
143
|
:param faces: Faces, each sublist is a face, as indices in vert_coords (CCW oriented)
|
|
144
|
+
:type faces: collections.abc.Sequence[collections.abc.Sequence[int]]
|
|
129
145
|
: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.
|
|
130
146
|
:type output_type: int
|
|
131
147
|
:param epsilon: For nearness tests; should not be zero
|
|
@@ -179,7 +195,7 @@ def intersect_line_line(
|
|
|
179
195
|
v2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
180
196
|
v3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
181
197
|
v4: collections.abc.Sequence[float] | mathutils.Vector,
|
|
182
|
-
) -> tuple[mathutils.Vector, mathutils.Vector]:
|
|
198
|
+
) -> None | tuple[mathutils.Vector, mathutils.Vector]:
|
|
183
199
|
"""Returns a tuple with the points on each line respectively closest to the other.
|
|
184
200
|
|
|
185
201
|
:param v1: First point of the first line
|
|
@@ -191,7 +207,7 @@ def intersect_line_line(
|
|
|
191
207
|
:param v4: Second point of the second line
|
|
192
208
|
:type v4: collections.abc.Sequence[float] | mathutils.Vector
|
|
193
209
|
:return: The intersection on each line or None when the lines are co-linear.
|
|
194
|
-
:rtype: tuple[mathutils.Vector, mathutils.Vector]
|
|
210
|
+
:rtype: None | tuple[mathutils.Vector, mathutils.Vector]
|
|
195
211
|
"""
|
|
196
212
|
|
|
197
213
|
def intersect_line_line_2d(
|
|
@@ -199,7 +215,7 @@ def intersect_line_line_2d(
|
|
|
199
215
|
lineA_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
200
216
|
lineB_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
201
217
|
lineB_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
202
|
-
) -> mathutils.Vector:
|
|
218
|
+
) -> None | mathutils.Vector:
|
|
203
219
|
"""Takes 2 segments (defined by 4 vectors) and returns a vector for their point of intersection or None.
|
|
204
220
|
|
|
205
221
|
:param lineA_p1: First point of the first line
|
|
@@ -211,7 +227,7 @@ def intersect_line_line_2d(
|
|
|
211
227
|
:param lineB_p2: Second point of the second line
|
|
212
228
|
:type lineB_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
213
229
|
:return: The point of intersection or None when not found
|
|
214
|
-
:rtype: mathutils.Vector
|
|
230
|
+
:rtype: None | mathutils.Vector
|
|
215
231
|
"""
|
|
216
232
|
|
|
217
233
|
def intersect_line_plane(
|
|
@@ -220,7 +236,7 @@ def intersect_line_plane(
|
|
|
220
236
|
plane_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
221
237
|
plane_no: collections.abc.Sequence[float] | mathutils.Vector,
|
|
222
238
|
no_flip=False,
|
|
223
|
-
) -> mathutils.Vector:
|
|
239
|
+
) -> None | mathutils.Vector:
|
|
224
240
|
"""Calculate the intersection between a line (as 2 vectors) and a plane.
|
|
225
241
|
Returns a vector for the intersection or None.
|
|
226
242
|
|
|
@@ -233,7 +249,7 @@ def intersect_line_plane(
|
|
|
233
249
|
:param plane_no: The direction the plane is facing
|
|
234
250
|
:type plane_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
235
251
|
:return: The point of intersection or None when not found
|
|
236
|
-
:rtype: mathutils.Vector
|
|
252
|
+
:rtype: None | mathutils.Vector
|
|
237
253
|
"""
|
|
238
254
|
|
|
239
255
|
def intersect_line_sphere(
|
|
@@ -242,7 +258,7 @@ def intersect_line_sphere(
|
|
|
242
258
|
sphere_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
243
259
|
sphere_radius: float,
|
|
244
260
|
clip=True,
|
|
245
|
-
) -> tuple[mathutils.Vector, mathutils.Vector]:
|
|
261
|
+
) -> tuple[mathutils.Vector | None, mathutils.Vector | None]:
|
|
246
262
|
"""Takes a line (as 2 points) and a sphere (as a point and a radius) and
|
|
247
263
|
returns the intersection
|
|
248
264
|
|
|
@@ -255,7 +271,7 @@ def intersect_line_sphere(
|
|
|
255
271
|
:param sphere_radius: Radius of the sphere
|
|
256
272
|
:type sphere_radius: float
|
|
257
273
|
:return: The intersection points as a pair of vectors or None when there is no intersection
|
|
258
|
-
:rtype: tuple[mathutils.Vector, mathutils.Vector]
|
|
274
|
+
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None]
|
|
259
275
|
"""
|
|
260
276
|
|
|
261
277
|
def intersect_line_sphere_2d(
|
|
@@ -264,7 +280,7 @@ def intersect_line_sphere_2d(
|
|
|
264
280
|
sphere_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
265
281
|
sphere_radius: float,
|
|
266
282
|
clip=True,
|
|
267
|
-
) -> tuple[mathutils.Vector, mathutils.Vector]:
|
|
283
|
+
) -> tuple[mathutils.Vector | None, mathutils.Vector | None]:
|
|
268
284
|
"""Takes a line (as 2 points) and a sphere (as a point and a radius) and
|
|
269
285
|
returns the intersection
|
|
270
286
|
|
|
@@ -277,7 +293,7 @@ def intersect_line_sphere_2d(
|
|
|
277
293
|
:param sphere_radius: Radius of the sphere
|
|
278
294
|
:type sphere_radius: float
|
|
279
295
|
:return: The intersection points as a pair of vectors or None when there is no intersection
|
|
280
|
-
:rtype: tuple[mathutils.Vector, mathutils.Vector]
|
|
296
|
+
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None]
|
|
281
297
|
"""
|
|
282
298
|
|
|
283
299
|
def intersect_plane_plane(
|
|
@@ -285,7 +301,7 @@ def intersect_plane_plane(
|
|
|
285
301
|
plane_a_no: collections.abc.Sequence[float] | mathutils.Vector,
|
|
286
302
|
plane_b_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
287
303
|
plane_b_no: collections.abc.Sequence[float] | mathutils.Vector,
|
|
288
|
-
) -> tuple | tuple[mathutils.Vector, mathutils.Vector]:
|
|
304
|
+
) -> tuple[None, None] | tuple[mathutils.Vector, mathutils.Vector]:
|
|
289
305
|
"""Return the intersection between two planes
|
|
290
306
|
|
|
291
307
|
:param plane_a_co: Point on the first plane
|
|
@@ -297,7 +313,7 @@ def intersect_plane_plane(
|
|
|
297
313
|
:param plane_b_no: Normal of the second plane
|
|
298
314
|
:type plane_b_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
299
315
|
:return: The line of the intersection represented as a point and a vector or None if the intersection can't be calculated
|
|
300
|
-
:rtype: tuple | tuple[mathutils.Vector, mathutils.Vector]
|
|
316
|
+
:rtype: tuple[None, None] | tuple[mathutils.Vector, mathutils.Vector]
|
|
301
317
|
"""
|
|
302
318
|
|
|
303
319
|
def intersect_point_line(
|
|
@@ -343,7 +359,7 @@ def intersect_point_tri(
|
|
|
343
359
|
tri_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
344
360
|
tri_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
345
361
|
tri_p3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
346
|
-
) -> mathutils.Vector:
|
|
362
|
+
) -> None | mathutils.Vector:
|
|
347
363
|
"""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.
|
|
348
364
|
|
|
349
365
|
:param pt: Point
|
|
@@ -355,7 +371,7 @@ def intersect_point_tri(
|
|
|
355
371
|
:param tri_p3: Third point of the triangle
|
|
356
372
|
:type tri_p3: collections.abc.Sequence[float] | mathutils.Vector
|
|
357
373
|
:return: Point on the triangles plane or None if its outside the triangle
|
|
358
|
-
:rtype: mathutils.Vector
|
|
374
|
+
:rtype: None | mathutils.Vector
|
|
359
375
|
"""
|
|
360
376
|
|
|
361
377
|
def intersect_point_tri_2d(
|
|
@@ -384,7 +400,7 @@ def intersect_ray_tri(
|
|
|
384
400
|
ray: collections.abc.Sequence[float] | mathutils.Vector,
|
|
385
401
|
orig: collections.abc.Sequence[float] | mathutils.Vector,
|
|
386
402
|
clip: bool = True,
|
|
387
|
-
) -> mathutils.Vector:
|
|
403
|
+
) -> None | mathutils.Vector:
|
|
388
404
|
"""Returns the intersection between a ray and a triangle, if possible, returns None otherwise.
|
|
389
405
|
|
|
390
406
|
:param v1: Point1
|
|
@@ -400,7 +416,7 @@ def intersect_ray_tri(
|
|
|
400
416
|
:param clip: When False, don't restrict the intersection to the area of the triangle, use the infinite plane defined by the triangle.
|
|
401
417
|
:type clip: bool
|
|
402
418
|
:return: The point of intersection or None if no intersection is found
|
|
403
|
-
:rtype: mathutils.Vector
|
|
419
|
+
:rtype: None | mathutils.Vector
|
|
404
420
|
"""
|
|
405
421
|
|
|
406
422
|
def intersect_sphere_sphere_2d(
|
|
@@ -408,7 +424,7 @@ def intersect_sphere_sphere_2d(
|
|
|
408
424
|
radius_a: float,
|
|
409
425
|
p_b: collections.abc.Sequence[float] | mathutils.Vector,
|
|
410
426
|
radius_b: float,
|
|
411
|
-
) -> tuple | tuple[mathutils.Vector, mathutils.Vector]:
|
|
427
|
+
) -> tuple[None, None] | tuple[mathutils.Vector, mathutils.Vector]:
|
|
412
428
|
"""Returns 2 points on between intersecting circles.
|
|
413
429
|
|
|
414
430
|
:param p_a: Center of the first circle
|
|
@@ -420,7 +436,7 @@ def intersect_sphere_sphere_2d(
|
|
|
420
436
|
:param radius_b: Radius of the second circle
|
|
421
437
|
:type radius_b: float
|
|
422
438
|
:return: 2 points on between intersecting circles or None when there is no intersection.
|
|
423
|
-
:rtype: tuple | tuple[mathutils.Vector, mathutils.Vector]
|
|
439
|
+
:rtype: tuple[None, None] | tuple[mathutils.Vector, mathutils.Vector]
|
|
424
440
|
"""
|
|
425
441
|
|
|
426
442
|
def intersect_tri_tri_2d(tri_a1, tri_a2, tri_a3, tri_b1, tri_b2, tri_b3) -> bool:
|
|
@@ -429,10 +445,13 @@ def intersect_tri_tri_2d(tri_a1, tri_a2, tri_a3, tri_b1, tri_b2, tri_b3) -> bool
|
|
|
429
445
|
:rtype: bool
|
|
430
446
|
"""
|
|
431
447
|
|
|
432
|
-
def normal(
|
|
448
|
+
def normal(
|
|
449
|
+
vectors: collections.abc.Sequence[collections.abc.Sequence[float]],
|
|
450
|
+
) -> mathutils.Vector:
|
|
433
451
|
"""Returns the normal of a 3D polygon.
|
|
434
452
|
|
|
435
453
|
:param vectors: 3 or more vectors to calculate normals.
|
|
454
|
+
:type vectors: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
436
455
|
:rtype: mathutils.Vector
|
|
437
456
|
"""
|
|
438
457
|
|
|
@@ -7,10 +7,13 @@ import typing
|
|
|
7
7
|
import collections.abc
|
|
8
8
|
import typing_extensions
|
|
9
9
|
|
|
10
|
-
def poly_3d_calc(
|
|
10
|
+
def poly_3d_calc(
|
|
11
|
+
veclist: collections.abc.Sequence[collections.abc.Sequence[float]], pt
|
|
12
|
+
) -> list[float]:
|
|
11
13
|
"""Calculate barycentric weights for a point on a polygon.
|
|
12
14
|
|
|
13
15
|
:param veclist: Sequence of 3D positions.
|
|
16
|
+
:type veclist: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
14
17
|
:param pt: 2D or 3D position. :type pt: Sequence[float] :return: list of per-vector weights.
|
|
15
18
|
:rtype: list[float]
|
|
16
19
|
"""
|
mathutils/kdtree/__init__.pyi
CHANGED
|
@@ -17,21 +17,27 @@ class KDTree:
|
|
|
17
17
|
"""Balance the tree."""
|
|
18
18
|
|
|
19
19
|
def find(
|
|
20
|
-
self,
|
|
20
|
+
self,
|
|
21
|
+
co: collections.abc.Sequence[float],
|
|
22
|
+
filter: collections.abc.Callable[int, bool] | None = None,
|
|
21
23
|
) -> tuple[mathutils.Vector, int, float]:
|
|
22
24
|
"""Find nearest point to co.
|
|
23
25
|
|
|
24
26
|
:param co: 3D coordinates.
|
|
27
|
+
:type co: collections.abc.Sequence[float]
|
|
25
28
|
:param filter: function which takes an index and returns True for indices to include in the search.
|
|
26
|
-
:type filter: collections.abc.Callable | None
|
|
29
|
+
:type filter: collections.abc.Callable[int, bool] | None
|
|
27
30
|
:return: Returns (position, index, distance).
|
|
28
31
|
:rtype: tuple[mathutils.Vector, int, float]
|
|
29
32
|
"""
|
|
30
33
|
|
|
31
|
-
def find_n(
|
|
34
|
+
def find_n(
|
|
35
|
+
self, co: collections.abc.Sequence[float], n: int
|
|
36
|
+
) -> list[tuple[mathutils.Vector, int, float]]:
|
|
32
37
|
"""Find nearest n points to co.
|
|
33
38
|
|
|
34
39
|
:param co: 3D coordinates.
|
|
40
|
+
:type co: collections.abc.Sequence[float]
|
|
35
41
|
:param n: Number of points to find.
|
|
36
42
|
:type n: int
|
|
37
43
|
:return: Returns a list of tuples (position, index, distance).
|
|
@@ -39,21 +45,23 @@ class KDTree:
|
|
|
39
45
|
"""
|
|
40
46
|
|
|
41
47
|
def find_range(
|
|
42
|
-
self, co, radius: float
|
|
48
|
+
self, co: collections.abc.Sequence[float], radius: float
|
|
43
49
|
) -> list[tuple[mathutils.Vector, int, float]]:
|
|
44
50
|
"""Find all points within radius of co.
|
|
45
51
|
|
|
46
52
|
:param co: 3D coordinates.
|
|
53
|
+
:type co: collections.abc.Sequence[float]
|
|
47
54
|
:param radius: Distance to search for points.
|
|
48
55
|
:type radius: float
|
|
49
56
|
:return: Returns a list of tuples (position, index, distance).
|
|
50
57
|
:rtype: list[tuple[mathutils.Vector, int, float]]
|
|
51
58
|
"""
|
|
52
59
|
|
|
53
|
-
def insert(self, co, index: int):
|
|
60
|
+
def insert(self, co: collections.abc.Sequence[float], index: int):
|
|
54
61
|
"""Insert a point into the KDTree.
|
|
55
62
|
|
|
56
63
|
:param co: Point 3d position.
|
|
64
|
+
:type co: collections.abc.Sequence[float]
|
|
57
65
|
:param index: The index of the point.
|
|
58
66
|
:type index: int
|
|
59
67
|
"""
|
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: str | None = None,
|
|
69
|
+
enum_descr_override: None | str | None = None,
|
|
70
70
|
):
|
|
71
71
|
"""
|
|
72
72
|
|
|
@@ -77,7 +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
|
+
:type enum_descr_override: None | str | None
|
|
81
81
|
"""
|
|
82
82
|
|
|
83
83
|
class InfoStructRNA:
|
|
File without changes
|
|
File without changes
|