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/geometry/__init__.pyi
CHANGED
|
@@ -53,20 +53,26 @@ 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
|
"""
|
|
63
66
|
|
|
64
|
-
def box_pack_2d(
|
|
67
|
+
def box_pack_2d(
|
|
68
|
+
boxes: list[list[float, float, float, float, ...]],
|
|
69
|
+
) -> tuple[float, float]:
|
|
65
70
|
"""Returns a tuple with the width and height of the packed bounding box.
|
|
66
71
|
|
|
67
72
|
:param boxes: list of boxes, each box is a list where the first 4 items are [X, Y, width, height, ...] other items are ignored. The X & Y values in this list are modified to set the packed positions.
|
|
68
|
-
:type boxes: float
|
|
73
|
+
:type boxes: list[list[float, float, float, float, ...]]
|
|
69
74
|
:return: The width and height of the packed bounding box.
|
|
75
|
+
:rtype: tuple[float, float]
|
|
70
76
|
"""
|
|
71
77
|
|
|
72
78
|
def closest_point_on_tri(
|
|
@@ -89,16 +95,34 @@ def closest_point_on_tri(
|
|
|
89
95
|
:rtype: mathutils.Vector
|
|
90
96
|
"""
|
|
91
97
|
|
|
92
|
-
def convex_hull_2d(
|
|
98
|
+
def convex_hull_2d(
|
|
99
|
+
points: collections.abc.Sequence[collections.abc.Sequence[float]],
|
|
100
|
+
) -> list[int]:
|
|
93
101
|
"""Returns a list of indices into the list given
|
|
94
102
|
|
|
95
103
|
:param points: Sequence of 2D points.
|
|
104
|
+
:type points: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
96
105
|
:return: a list of indices
|
|
106
|
+
:rtype: list[int]
|
|
97
107
|
"""
|
|
98
108
|
|
|
99
109
|
def delaunay_2d_cdt(
|
|
100
|
-
vert_coords
|
|
101
|
-
|
|
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,
|
|
118
|
+
) -> tuple[
|
|
119
|
+
list[mathutils.Vector],
|
|
120
|
+
list[tuple[int, int]],
|
|
121
|
+
list[list[int]],
|
|
122
|
+
list[list[int]],
|
|
123
|
+
list[list[int]],
|
|
124
|
+
list[list[int]],
|
|
125
|
+
]:
|
|
102
126
|
"""Computes the Constrained Delaunay Triangulation of a set of vertices,
|
|
103
127
|
with edges and faces that must appear in the triangulation.
|
|
104
128
|
Some triangles may be eaten away, or combined with other triangles,
|
|
@@ -113,14 +137,18 @@ def delaunay_2d_cdt(
|
|
|
113
137
|
of the orig arrays, which may save some time.
|
|
114
138
|
|
|
115
139
|
:param vert_coords: Vertex coordinates (2d)
|
|
140
|
+
:type vert_coords: collections.abc.Sequence[collections.abc.Sequence[float] | mathutils.Vector]
|
|
116
141
|
:param edges: Edges, as pairs of indices in vert_coords
|
|
142
|
+
:type edges: collections.abc.Sequence[collections.abc.Sequence[int, int]]
|
|
117
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]]
|
|
118
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.
|
|
119
146
|
:type output_type: int
|
|
120
147
|
:param epsilon: For nearness tests; should not be zero
|
|
121
148
|
:type epsilon: float
|
|
122
149
|
:param need_ids: are the orig output arrays needed?
|
|
123
150
|
:return: Output tuple, (vert_coords, edges, faces, orig_verts, orig_edges, orig_faces)
|
|
151
|
+
:rtype: tuple[list[mathutils.Vector], list[tuple[int, int]], list[list[int]], list[list[int]], list[list[int]], list[list[int]]]
|
|
124
152
|
"""
|
|
125
153
|
|
|
126
154
|
def distance_point_to_plane(
|
|
@@ -145,7 +173,7 @@ def interpolate_bezier(
|
|
|
145
173
|
handle2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
146
174
|
knot2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
147
175
|
resolution: int,
|
|
148
|
-
):
|
|
176
|
+
) -> list[mathutils.Vector]:
|
|
149
177
|
"""Interpolate a bezier spline segment.
|
|
150
178
|
|
|
151
179
|
:param knot1: First bezier spline point.
|
|
@@ -159,6 +187,7 @@ def interpolate_bezier(
|
|
|
159
187
|
:param resolution: Number of points to return.
|
|
160
188
|
:type resolution: int
|
|
161
189
|
:return: The interpolated points.
|
|
190
|
+
:rtype: list[mathutils.Vector]
|
|
162
191
|
"""
|
|
163
192
|
|
|
164
193
|
def intersect_line_line(
|
|
@@ -166,7 +195,7 @@ def intersect_line_line(
|
|
|
166
195
|
v2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
167
196
|
v3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
168
197
|
v4: collections.abc.Sequence[float] | mathutils.Vector,
|
|
169
|
-
):
|
|
198
|
+
) -> None | tuple[mathutils.Vector, mathutils.Vector]:
|
|
170
199
|
"""Returns a tuple with the points on each line respectively closest to the other.
|
|
171
200
|
|
|
172
201
|
:param v1: First point of the first line
|
|
@@ -178,6 +207,7 @@ def intersect_line_line(
|
|
|
178
207
|
:param v4: Second point of the second line
|
|
179
208
|
:type v4: collections.abc.Sequence[float] | mathutils.Vector
|
|
180
209
|
:return: The intersection on each line or None when the lines are co-linear.
|
|
210
|
+
:rtype: None | tuple[mathutils.Vector, mathutils.Vector]
|
|
181
211
|
"""
|
|
182
212
|
|
|
183
213
|
def intersect_line_line_2d(
|
|
@@ -185,7 +215,7 @@ def intersect_line_line_2d(
|
|
|
185
215
|
lineA_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
186
216
|
lineB_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
187
217
|
lineB_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
188
|
-
):
|
|
218
|
+
) -> None | mathutils.Vector:
|
|
189
219
|
"""Takes 2 segments (defined by 4 vectors) and returns a vector for their point of intersection or None.
|
|
190
220
|
|
|
191
221
|
:param lineA_p1: First point of the first line
|
|
@@ -197,6 +227,7 @@ def intersect_line_line_2d(
|
|
|
197
227
|
:param lineB_p2: Second point of the second line
|
|
198
228
|
:type lineB_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
199
229
|
:return: The point of intersection or None when not found
|
|
230
|
+
:rtype: None | mathutils.Vector
|
|
200
231
|
"""
|
|
201
232
|
|
|
202
233
|
def intersect_line_plane(
|
|
@@ -205,7 +236,7 @@ def intersect_line_plane(
|
|
|
205
236
|
plane_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
206
237
|
plane_no: collections.abc.Sequence[float] | mathutils.Vector,
|
|
207
238
|
no_flip=False,
|
|
208
|
-
):
|
|
239
|
+
) -> None | mathutils.Vector:
|
|
209
240
|
"""Calculate the intersection between a line (as 2 vectors) and a plane.
|
|
210
241
|
Returns a vector for the intersection or None.
|
|
211
242
|
|
|
@@ -218,6 +249,7 @@ def intersect_line_plane(
|
|
|
218
249
|
:param plane_no: The direction the plane is facing
|
|
219
250
|
:type plane_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
220
251
|
:return: The point of intersection or None when not found
|
|
252
|
+
:rtype: None | mathutils.Vector
|
|
221
253
|
"""
|
|
222
254
|
|
|
223
255
|
def intersect_line_sphere(
|
|
@@ -226,7 +258,7 @@ def intersect_line_sphere(
|
|
|
226
258
|
sphere_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
227
259
|
sphere_radius: float,
|
|
228
260
|
clip=True,
|
|
229
|
-
):
|
|
261
|
+
) -> tuple[mathutils.Vector | None, mathutils.Vector | None]:
|
|
230
262
|
"""Takes a line (as 2 points) and a sphere (as a point and a radius) and
|
|
231
263
|
returns the intersection
|
|
232
264
|
|
|
@@ -239,6 +271,7 @@ def intersect_line_sphere(
|
|
|
239
271
|
:param sphere_radius: Radius of the sphere
|
|
240
272
|
:type sphere_radius: float
|
|
241
273
|
:return: The intersection points as a pair of vectors or None when there is no intersection
|
|
274
|
+
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None]
|
|
242
275
|
"""
|
|
243
276
|
|
|
244
277
|
def intersect_line_sphere_2d(
|
|
@@ -247,7 +280,7 @@ def intersect_line_sphere_2d(
|
|
|
247
280
|
sphere_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
248
281
|
sphere_radius: float,
|
|
249
282
|
clip=True,
|
|
250
|
-
):
|
|
283
|
+
) -> tuple[mathutils.Vector | None, mathutils.Vector | None]:
|
|
251
284
|
"""Takes a line (as 2 points) and a sphere (as a point and a radius) and
|
|
252
285
|
returns the intersection
|
|
253
286
|
|
|
@@ -260,6 +293,7 @@ def intersect_line_sphere_2d(
|
|
|
260
293
|
:param sphere_radius: Radius of the sphere
|
|
261
294
|
:type sphere_radius: float
|
|
262
295
|
:return: The intersection points as a pair of vectors or None when there is no intersection
|
|
296
|
+
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None]
|
|
263
297
|
"""
|
|
264
298
|
|
|
265
299
|
def intersect_plane_plane(
|
|
@@ -267,7 +301,7 @@ def intersect_plane_plane(
|
|
|
267
301
|
plane_a_no: collections.abc.Sequence[float] | mathutils.Vector,
|
|
268
302
|
plane_b_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
269
303
|
plane_b_no: collections.abc.Sequence[float] | mathutils.Vector,
|
|
270
|
-
):
|
|
304
|
+
) -> tuple[None, None] | tuple[mathutils.Vector, mathutils.Vector]:
|
|
271
305
|
"""Return the intersection between two planes
|
|
272
306
|
|
|
273
307
|
:param plane_a_co: Point on the first plane
|
|
@@ -279,19 +313,21 @@ def intersect_plane_plane(
|
|
|
279
313
|
:param plane_b_no: Normal of the second plane
|
|
280
314
|
:type plane_b_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
281
315
|
:return: The line of the intersection represented as a point and a vector or None if the intersection can't be calculated
|
|
316
|
+
:rtype: tuple[None, None] | tuple[mathutils.Vector, mathutils.Vector]
|
|
282
317
|
"""
|
|
283
318
|
|
|
284
319
|
def intersect_point_line(
|
|
285
320
|
pt: collections.abc.Sequence[float] | mathutils.Vector,
|
|
286
321
|
line_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
287
322
|
line_p2,
|
|
288
|
-
):
|
|
323
|
+
) -> tuple[mathutils.Vector, float]:
|
|
289
324
|
"""Takes a point and a line and returns a tuple with the closest point on the line and its distance from the first point of the line as a percentage of the length of the line.
|
|
290
325
|
|
|
291
326
|
:param pt: Point
|
|
292
327
|
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
293
328
|
:param line_p1: First point of the lineSecond point of the line
|
|
294
329
|
:type line_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
330
|
+
:rtype: tuple[mathutils.Vector, float]
|
|
295
331
|
"""
|
|
296
332
|
|
|
297
333
|
def intersect_point_quad_2d(
|
|
@@ -323,7 +359,7 @@ def intersect_point_tri(
|
|
|
323
359
|
tri_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
324
360
|
tri_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
325
361
|
tri_p3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
326
|
-
):
|
|
362
|
+
) -> None | mathutils.Vector:
|
|
327
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.
|
|
328
364
|
|
|
329
365
|
:param pt: Point
|
|
@@ -335,6 +371,7 @@ def intersect_point_tri(
|
|
|
335
371
|
:param tri_p3: Third point of the triangle
|
|
336
372
|
:type tri_p3: collections.abc.Sequence[float] | mathutils.Vector
|
|
337
373
|
:return: Point on the triangles plane or None if its outside the triangle
|
|
374
|
+
:rtype: None | mathutils.Vector
|
|
338
375
|
"""
|
|
339
376
|
|
|
340
377
|
def intersect_point_tri_2d(
|
|
@@ -363,7 +400,7 @@ def intersect_ray_tri(
|
|
|
363
400
|
ray: collections.abc.Sequence[float] | mathutils.Vector,
|
|
364
401
|
orig: collections.abc.Sequence[float] | mathutils.Vector,
|
|
365
402
|
clip: bool = True,
|
|
366
|
-
):
|
|
403
|
+
) -> None | mathutils.Vector:
|
|
367
404
|
"""Returns the intersection between a ray and a triangle, if possible, returns None otherwise.
|
|
368
405
|
|
|
369
406
|
:param v1: Point1
|
|
@@ -379,6 +416,7 @@ def intersect_ray_tri(
|
|
|
379
416
|
:param clip: When False, don't restrict the intersection to the area of the triangle, use the infinite plane defined by the triangle.
|
|
380
417
|
:type clip: bool
|
|
381
418
|
:return: The point of intersection or None if no intersection is found
|
|
419
|
+
:rtype: None | mathutils.Vector
|
|
382
420
|
"""
|
|
383
421
|
|
|
384
422
|
def intersect_sphere_sphere_2d(
|
|
@@ -386,7 +424,7 @@ def intersect_sphere_sphere_2d(
|
|
|
386
424
|
radius_a: float,
|
|
387
425
|
p_b: collections.abc.Sequence[float] | mathutils.Vector,
|
|
388
426
|
radius_b: float,
|
|
389
|
-
):
|
|
427
|
+
) -> tuple[None, None] | tuple[mathutils.Vector, mathutils.Vector]:
|
|
390
428
|
"""Returns 2 points on between intersecting circles.
|
|
391
429
|
|
|
392
430
|
:param p_a: Center of the first circle
|
|
@@ -398,6 +436,7 @@ def intersect_sphere_sphere_2d(
|
|
|
398
436
|
:param radius_b: Radius of the second circle
|
|
399
437
|
:type radius_b: float
|
|
400
438
|
:return: 2 points on between intersecting circles or None when there is no intersection.
|
|
439
|
+
:rtype: tuple[None, None] | tuple[mathutils.Vector, mathutils.Vector]
|
|
401
440
|
"""
|
|
402
441
|
|
|
403
442
|
def intersect_tri_tri_2d(tri_a1, tri_a2, tri_a3, tri_b1, tri_b2, tri_b3) -> bool:
|
|
@@ -406,31 +445,38 @@ def intersect_tri_tri_2d(tri_a1, tri_a2, tri_a3, tri_b1, tri_b2, tri_b3) -> bool
|
|
|
406
445
|
:rtype: bool
|
|
407
446
|
"""
|
|
408
447
|
|
|
409
|
-
def normal(
|
|
448
|
+
def normal(
|
|
449
|
+
vectors: collections.abc.Sequence[collections.abc.Sequence[float]],
|
|
450
|
+
) -> mathutils.Vector:
|
|
410
451
|
"""Returns the normal of a 3D polygon.
|
|
411
452
|
|
|
412
453
|
:param vectors: 3 or more vectors to calculate normals.
|
|
454
|
+
:type vectors: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
413
455
|
:rtype: mathutils.Vector
|
|
414
456
|
"""
|
|
415
457
|
|
|
416
458
|
def points_in_planes(
|
|
417
|
-
planes
|
|
418
|
-
|
|
459
|
+
planes: list[collections.abc.Sequence[float] | mathutils.Vector],
|
|
460
|
+
epsilon_coplanar: float = 0.0001,
|
|
461
|
+
epsilon_isect: float = 1e-06,
|
|
462
|
+
) -> tuple[list[mathutils.Vector], list[int]]:
|
|
419
463
|
"""Returns a list of points inside all planes given and a list of index values for the planes used.
|
|
420
464
|
|
|
421
465
|
:param planes: List of planes (4D vectors).
|
|
466
|
+
:type planes: list[collections.abc.Sequence[float] | mathutils.Vector]
|
|
422
467
|
:param epsilon_coplanar: Epsilon value for interpreting plane pairs as co-plannar.
|
|
423
468
|
:type epsilon_coplanar: float
|
|
424
469
|
:param epsilon_isect: Epsilon value for intersection.
|
|
425
470
|
:type epsilon_isect: float
|
|
426
471
|
:return: Two lists, once containing the 3D coordinates inside the planes, another containing the plane indices used.
|
|
472
|
+
:rtype: tuple[list[mathutils.Vector], list[int]]
|
|
427
473
|
"""
|
|
428
474
|
|
|
429
|
-
def tessellate_polygon(polylines) -> int:
|
|
475
|
+
def tessellate_polygon(polylines) -> list[tuple[int, int, int]]:
|
|
430
476
|
"""Takes a list of polylines (each point a pair or triplet of numbers) and returns the point indices for a polyline filled with triangles. Does not handle degenerate geometry (such as zero-length lines due to consecutive identical points).
|
|
431
477
|
|
|
432
478
|
:param polylines: Polygons where each polygon is a sequence of 2D or 3D points.
|
|
433
|
-
:rtype: int
|
|
479
|
+
:rtype: list[tuple[int, int, int]]
|
|
434
480
|
"""
|
|
435
481
|
|
|
436
482
|
def volume_tetrahedron(
|
|
@@ -7,9 +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.
|
|
18
|
+
:rtype: list[float]
|
|
15
19
|
"""
|
mathutils/kdtree/__init__.pyi
CHANGED
|
@@ -8,6 +8,7 @@ Generic 3-dimensional kd-tree to perform spatial searches.
|
|
|
8
8
|
import typing
|
|
9
9
|
import collections.abc
|
|
10
10
|
import typing_extensions
|
|
11
|
+
import mathutils
|
|
11
12
|
|
|
12
13
|
class KDTree:
|
|
13
14
|
"""KdTree(size) -> new kd-tree initialized to hold size items."""
|
|
@@ -15,40 +16,52 @@ class KDTree:
|
|
|
15
16
|
def balance(self):
|
|
16
17
|
"""Balance the tree."""
|
|
17
18
|
|
|
18
|
-
def find(
|
|
19
|
+
def find(
|
|
20
|
+
self,
|
|
21
|
+
co: collections.abc.Sequence[float],
|
|
22
|
+
filter: collections.abc.Callable[int, bool] | None = None,
|
|
23
|
+
) -> tuple[mathutils.Vector, int, float]:
|
|
19
24
|
"""Find nearest point to co.
|
|
20
25
|
|
|
21
26
|
:param co: 3D coordinates.
|
|
27
|
+
:type co: collections.abc.Sequence[float]
|
|
22
28
|
:param filter: function which takes an index and returns True for indices to include in the search.
|
|
23
|
-
:type filter: collections.abc.Callable | None
|
|
29
|
+
:type filter: collections.abc.Callable[int, bool] | None
|
|
24
30
|
:return: Returns (position, index, distance).
|
|
25
|
-
:rtype: int
|
|
31
|
+
:rtype: tuple[mathutils.Vector, int, float]
|
|
26
32
|
"""
|
|
27
33
|
|
|
28
|
-
def find_n(
|
|
34
|
+
def find_n(
|
|
35
|
+
self, co: collections.abc.Sequence[float], n: int
|
|
36
|
+
) -> list[tuple[mathutils.Vector, int, float]]:
|
|
29
37
|
"""Find nearest n points to co.
|
|
30
38
|
|
|
31
39
|
:param co: 3D coordinates.
|
|
40
|
+
:type co: collections.abc.Sequence[float]
|
|
32
41
|
:param n: Number of points to find.
|
|
33
42
|
:type n: int
|
|
34
43
|
:return: Returns a list of tuples (position, index, distance).
|
|
35
|
-
:rtype: int
|
|
44
|
+
:rtype: list[tuple[mathutils.Vector, int, float]]
|
|
36
45
|
"""
|
|
37
46
|
|
|
38
|
-
def find_range(
|
|
47
|
+
def find_range(
|
|
48
|
+
self, co: collections.abc.Sequence[float], radius: float
|
|
49
|
+
) -> list[tuple[mathutils.Vector, int, float]]:
|
|
39
50
|
"""Find all points within radius of co.
|
|
40
51
|
|
|
41
52
|
:param co: 3D coordinates.
|
|
53
|
+
:type co: collections.abc.Sequence[float]
|
|
42
54
|
:param radius: Distance to search for points.
|
|
43
55
|
:type radius: float
|
|
44
56
|
:return: Returns a list of tuples (position, index, distance).
|
|
45
|
-
:rtype: int
|
|
57
|
+
:rtype: list[tuple[mathutils.Vector, int, float]]
|
|
46
58
|
"""
|
|
47
59
|
|
|
48
|
-
def insert(self, co, index: int):
|
|
60
|
+
def insert(self, co: collections.abc.Sequence[float], index: int):
|
|
49
61
|
"""Insert a point into the KDTree.
|
|
50
62
|
|
|
51
63
|
:param co: Point 3d position.
|
|
64
|
+
:type co: collections.abc.Sequence[float]
|
|
52
65
|
:param index: The index of the point.
|
|
53
66
|
:type index: int
|
|
54
67
|
"""
|
mathutils/noise/__init__.pyi
CHANGED
|
@@ -295,7 +295,7 @@ def voronoi(
|
|
|
295
295
|
position: collections.abc.Sequence[float] | mathutils.Vector,
|
|
296
296
|
distance_metric: str = "DISTANCE",
|
|
297
297
|
exponent: float = 2.5,
|
|
298
|
-
):
|
|
298
|
+
) -> list[list[float], list[mathutils.Vector]]:
|
|
299
299
|
"""Returns a list of distances to the four closest features and their locations.
|
|
300
300
|
|
|
301
301
|
:param position: The position to evaluate the selected noise function.
|
|
@@ -305,4 +305,5 @@ def voronoi(
|
|
|
305
305
|
:param exponent: The exponent for Minkowski distance metric.
|
|
306
306
|
:type exponent: float
|
|
307
307
|
:return: A list of distances to the four closest features and their locations.
|
|
308
|
+
:rtype: list[list[float], list[mathutils.Vector]]
|
|
308
309
|
"""
|
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: None | 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: None | str | None
|
|
80
81
|
"""
|
|
81
82
|
|
|
82
83
|
class InfoStructRNA:
|
|
File without changes
|