fake-bge-module 20250104__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.
Files changed (153) hide show
  1. addon_utils/__init__.pyi +11 -6
  2. aud/__init__.pyi +4 -0
  3. bge/types/__init__.pyi +66 -27
  4. bgl/__init__.pyi +2 -2
  5. bgui/image/__init__.pyi +3 -1
  6. bgui/system/__init__.pyi +12 -4
  7. bl_console_utils/autocomplete/complete_calltip/__init__.pyi +5 -2
  8. bl_console_utils/autocomplete/complete_import/__init__.pyi +6 -3
  9. bl_console_utils/autocomplete/complete_namespace/__init__.pyi +2 -1
  10. bl_console_utils/autocomplete/intellisense/__init__.pyi +8 -2
  11. bl_operators/node/__init__.pyi +78 -0
  12. bl_ui/anim/__init__.pyi +6 -0
  13. bl_ui/generic_ui_list/__init__.pyi +2 -2
  14. bl_ui/node_add_menu_shader/__init__.pyi +0 -1
  15. bl_ui/node_add_menu_texture/__init__.pyi +1 -0
  16. bl_ui/properties_data_camera/__init__.pyi +0 -2
  17. bl_ui/properties_mask_common/__init__.pyi +17 -0
  18. bl_ui/properties_material_gpencil/__init__.pyi +29 -0
  19. bl_ui/properties_scene/__init__.pyi +6 -0
  20. bl_ui/properties_view_layer/__init__.pyi +1 -0
  21. bl_ui/space_clip/__init__.pyi +53 -0
  22. bl_ui/space_graph/__init__.pyi +2 -0
  23. bl_ui/space_image/__init__.pyi +25 -0
  24. bl_ui/space_node/__init__.pyi +0 -1
  25. bl_ui/space_sequencer/__init__.pyi +2 -1
  26. blf/__init__.pyi +6 -3
  27. bmesh/ops/__init__.pyi +111 -54
  28. bmesh/types/__init__.pyi +134 -46
  29. bmesh/utils/__init__.pyi +17 -5
  30. bpy/__init__.pyi +1 -2
  31. bpy/_typing/__init__.pyi +4 -0
  32. bpy/{typing → _typing/rna_enums}/__init__.pyi +36 -36
  33. bpy/app/__init__.pyi +13 -5
  34. bpy/app/handlers/__init__.pyi +4 -2
  35. bpy/app/icons/__init__.pyi +6 -2
  36. bpy/app/translations/__init__.pyi +17 -8
  37. bpy/msgbus/__init__.pyi +14 -2
  38. bpy/ops/action/__init__.pyi +51 -151
  39. bpy/ops/anim/__init__.pyi +61 -179
  40. bpy/ops/armature/__init__.pyi +48 -147
  41. bpy/ops/asset/__init__.pyi +16 -71
  42. bpy/ops/boid/__init__.pyi +11 -44
  43. bpy/ops/brush/__init__.pyi +16 -42
  44. bpy/ops/buttons/__init__.pyi +6 -29
  45. bpy/ops/cachefile/__init__.pyi +5 -19
  46. bpy/ops/camera/__init__.pyi +2 -5
  47. bpy/ops/clip/__init__.pyi +95 -293
  48. bpy/ops/cloth/__init__.pyi +1 -3
  49. bpy/ops/collection/__init__.pyi +10 -26
  50. bpy/ops/console/__init__.pyi +21 -79
  51. bpy/ops/constraint/__init__.pyi +18 -45
  52. bpy/ops/curve/__init__.pyi +57 -186
  53. bpy/ops/curves/__init__.pyi +37 -109
  54. bpy/ops/cycles/__init__.pyi +3 -9
  55. bpy/ops/dpaint/__init__.pyi +8 -22
  56. bpy/ops/ed/__init__.pyi +20 -52
  57. bpy/ops/export_anim/__init__.pyi +1 -3
  58. bpy/ops/export_scene/__init__.pyi +55 -32
  59. bpy/ops/extensions/__init__.pyi +34 -110
  60. bpy/ops/file/__init__.pyi +40 -167
  61. bpy/ops/fluid/__init__.pyi +14 -77
  62. bpy/ops/font/__init__.pyi +23 -85
  63. bpy/ops/geometry/__init__.pyi +29 -46
  64. bpy/ops/gizmogroup/__init__.pyi +2 -9
  65. bpy/ops/gpencil/__init__.pyi +8 -32
  66. bpy/ops/graph/__init__.pyi +82 -201
  67. bpy/ops/grease_pencil/__init__.pyi +125 -324
  68. bpy/ops/image/__init__.pyi +61 -163
  69. bpy/ops/import_anim/__init__.pyi +1 -3
  70. bpy/ops/import_curve/__init__.pyi +1 -3
  71. bpy/ops/import_scene/__init__.pyi +4 -6
  72. bpy/ops/info/__init__.pyi +7 -29
  73. bpy/ops/lattice/__init__.pyi +11 -32
  74. bpy/ops/logic/__init__.pyi +26 -65
  75. bpy/ops/marker/__init__.pyi +11 -31
  76. bpy/ops/mask/__init__.pyi +39 -132
  77. bpy/ops/material/__init__.pyi +3 -19
  78. bpy/ops/mball/__init__.pyi +8 -19
  79. bpy/ops/mesh/__init__.pyi +223 -470
  80. bpy/ops/nla/__init__.pyi +42 -150
  81. bpy/ops/node/__init__.pyi +169 -393
  82. bpy/ops/object/__init__.pyi +320 -749
  83. bpy/ops/outliner/__init__.pyi +76 -268
  84. bpy/ops/paint/__init__.pyi +67 -147
  85. bpy/ops/paintcurve/__init__.pyi +8 -33
  86. bpy/ops/palette/__init__.pyi +7 -27
  87. bpy/ops/particle/__init__.pyi +39 -134
  88. bpy/ops/pose/__init__.pyi +64 -182
  89. bpy/ops/poselib/__init__.pyi +9 -33
  90. bpy/ops/preferences/__init__.pyi +35 -94
  91. bpy/ops/ptcache/__init__.pyi +7 -33
  92. bpy/ops/render/__init__.pyi +13 -37
  93. bpy/ops/rigidbody/__init__.pyi +22 -54
  94. bpy/ops/scene/__init__.pyi +47 -130
  95. bpy/ops/screen/__init__.pyi +46 -144
  96. bpy/ops/script/__init__.pyi +3 -11
  97. bpy/ops/sculpt/__init__.pyi +40 -94
  98. bpy/ops/sculpt_curves/__init__.pyi +4 -10
  99. bpy/ops/sequencer/__init__.pyi +104 -327
  100. bpy/ops/sound/__init__.pyi +17 -28
  101. bpy/ops/spreadsheet/__init__.pyi +4 -15
  102. bpy/ops/surface/__init__.pyi +6 -13
  103. bpy/ops/text/__init__.pyi +43 -175
  104. bpy/ops/text_editor/__init__.pyi +1 -3
  105. bpy/ops/texture/__init__.pyi +4 -21
  106. bpy/ops/transform/__init__.pyi +114 -134
  107. bpy/ops/ui/__init__.pyi +39 -120
  108. bpy/ops/uilist/__init__.pyi +3 -7
  109. bpy/ops/uv/__init__.pyi +58 -143
  110. bpy/ops/view2d/__init__.pyi +14 -39
  111. bpy/ops/view3d/__init__.pyi +68 -238
  112. bpy/ops/wm/__init__.pyi +178 -319
  113. bpy/ops/workspace/__init__.pyi +7 -33
  114. bpy/ops/world/__init__.pyi +2 -11
  115. bpy/path/__init__.pyi +16 -6
  116. bpy/props/__init__.pyi +157 -127
  117. bpy/types/__init__.pyi +35227 -34838
  118. bpy/utils/__init__.pyi +71 -25
  119. bpy/utils/previews/__init__.pyi +2 -1
  120. bpy/utils/units/__init__.pyi +2 -1
  121. bpy_extras/anim_utils/__init__.pyi +11 -3
  122. bpy_extras/bmesh_utils/__init__.pyi +2 -1
  123. bpy_extras/image_utils/__init__.pyi +5 -2
  124. bpy_extras/io_utils/__init__.pyi +12 -5
  125. bpy_extras/mesh_utils/__init__.pyi +27 -6
  126. bpy_extras/object_utils/__init__.pyi +6 -5
  127. bpy_extras/view3d_utils/__init__.pyi +9 -2
  128. {fake_bge_module-20250104.dist-info → fake_bge_module-20250201.dist-info}/METADATA +3 -3
  129. {fake_bge_module-20250104.dist-info → fake_bge_module-20250201.dist-info}/RECORD +153 -152
  130. {fake_bge_module-20250104.dist-info → fake_bge_module-20250201.dist-info}/WHEEL +1 -1
  131. freestyle/chainingiterators/__init__.pyi +7 -2
  132. freestyle/functions/__init__.pyi +16 -4
  133. freestyle/shaders/__init__.pyi +5 -1
  134. freestyle/types/__init__.pyi +103 -30
  135. freestyle/utils/ContextFunctions/__init__.pyi +2 -2
  136. freestyle/utils/__init__.pyi +2 -1
  137. gpu/capabilities/__init__.pyi +2 -1
  138. gpu/matrix/__init__.pyi +4 -2
  139. gpu/state/__init__.pyi +2 -2
  140. gpu/types/__init__.pyi +40 -8
  141. gpu_extras/batch/__init__.pyi +13 -1
  142. gpu_extras/presets/__init__.pyi +10 -1
  143. idprop/types/__init__.pyi +4 -2
  144. imbuf/__init__.pyi +6 -3
  145. imbuf/types/__init__.pyi +5 -2
  146. mathutils/__init__.pyi +126 -35
  147. mathutils/bvhtree/__init__.pyi +21 -6
  148. mathutils/geometry/__init__.pyi +68 -22
  149. mathutils/interpolate/__init__.pyi +5 -1
  150. mathutils/kdtree/__init__.pyi +21 -8
  151. mathutils/noise/__init__.pyi +2 -1
  152. rna_info/__init__.pyi +2 -1
  153. {fake_bge_module-20250104.dist-info → fake_bge_module-20250201.dist-info}/top_level.txt +0 -0
bpy/utils/__init__.pyi CHANGED
@@ -26,7 +26,9 @@ def app_template_paths(*, path: str | None = None):
26
26
  :return: App template paths.
27
27
  """
28
28
 
29
- def blend_paths(absolute: bool = False, packed: bool = False, local: bool = False):
29
+ def blend_paths(
30
+ absolute: bool = False, packed: bool = False, local: bool = False
31
+ ) -> list[str]:
30
32
  """Returns a list of paths to external files referenced by the loaded .blend file.
31
33
 
32
34
  :param absolute: When true the paths returned are made absolute.
@@ -36,6 +38,7 @@ def blend_paths(absolute: bool = False, packed: bool = False, local: bool = Fals
36
38
  :param local: When true skip linked library paths.
37
39
  :type local: bool
38
40
  :return: path list.
41
+ :rtype: list[str]
39
42
  """
40
43
 
41
44
  def escape_identifier(string: str) -> str:
@@ -47,15 +50,23 @@ def escape_identifier(string: str) -> str:
47
50
  :rtype: str
48
51
  """
49
52
 
50
- def execfile(filepath: str, *, mod=None):
53
+ def execfile(filepath: str, *, mod: None | None = None):
51
54
  """Execute a file path as a Python script.
52
55
 
53
56
  :param filepath: Path of the script to execute.
54
57
  :type filepath: str
55
58
  :param mod: Optional cached module, the result of a previous execution.
59
+ :type mod: None | None
56
60
  :return: The module which can be passed back in as mod.
57
61
  """
58
62
 
63
+ def expose_bundled_modules():
64
+ """For Blender as a Python module, add bundled VFX library python bindings
65
+ to sys.path. These may be used instead of dedicated packages, to ensure
66
+ the libraries are compatible with Blender.
67
+
68
+ """
69
+
59
70
  def extension_path_user(package: str, *, path: str = "", create: bool = False) -> str:
60
71
  """Return a user writable directory associated with an extension.
61
72
 
@@ -125,7 +136,9 @@ def load_scripts_extensions(*, reload_scripts: bool = False):
125
136
  :type reload_scripts: bool
126
137
  """
127
138
 
128
- def make_rna_paths(struct_name: str, prop_name: str, enum_name: str) -> str:
139
+ def make_rna_paths(
140
+ struct_name: str, prop_name: str, enum_name: str
141
+ ) -> tuple[str, str, str]:
129
142
  """Create RNA "paths" from given names.
130
143
 
131
144
  :param struct_name: Name of a RNA struct (like e.g. "Scene").
@@ -137,7 +150,7 @@ def make_rna_paths(struct_name: str, prop_name: str, enum_name: str) -> str:
137
150
  :return: A triple of three "RNA paths"
138
151
  (most_complete_path, "struct.prop", "struct.prop:'enum'").
139
152
  If no enum_name is given, the third element will always be void.
140
- :rtype: str
153
+ :rtype: tuple[str, str, str]
141
154
  """
142
155
 
143
156
  def manual_language_code(default="en") -> str:
@@ -149,7 +162,7 @@ def manual_language_code(default="en") -> str:
149
162
  """
150
163
 
151
164
  def manual_map(): ...
152
- def modules_from_path(path: str, loaded_modules):
165
+ def modules_from_path(path: str, loaded_modules) -> list:
153
166
  """Load all modules in a path and return them as a list.
154
167
 
155
168
  :param path: this path is scanned for scripts and packages.
@@ -157,30 +170,41 @@ def modules_from_path(path: str, loaded_modules):
157
170
  :param loaded_modules: already loaded module names, files matching these
158
171
  names will be ignored.
159
172
  :return: all loaded modules.
173
+ :rtype: list
160
174
  """
161
175
 
162
176
  def preset_find(name, preset_path, *, display_name=False, ext=".py"): ...
163
- def preset_paths(subdir: str):
177
+ def preset_paths(subdir: str) -> list[str]:
164
178
  """Returns a list of paths for a specific preset.
165
179
 
166
180
  :param subdir: preset subdirectory (must not be an absolute path).
167
181
  :type subdir: str
168
182
  :return: Script paths.
183
+ :rtype: list[str]
169
184
  """
170
185
 
171
186
  def refresh_script_paths():
172
187
  """Run this after creating new script paths to update sys.path"""
173
188
 
174
- def register_class(cls: typing.Any):
189
+ def register_class(
190
+ cls: type[
191
+ bpy.types.Panel
192
+ | bpy.types.UIList
193
+ | bpy.types.Menu
194
+ | bpy.types.Header
195
+ | bpy.types.Operator
196
+ | bpy.types.KeyingSetInfo
197
+ | bpy.types.RenderEngine
198
+ | bpy.types.AssetShelf
199
+ | bpy.types.FileHandler
200
+ | bpy.types.PropertyGroup
201
+ | bpy.types.AddonPreferences
202
+ ],
203
+ ):
175
204
  """Register a subclass of a Blender type class.
176
205
 
177
- :param cls: Blender type class in:
178
- `bpy.types.Panel`, `bpy.types.UIList`,
179
- `bpy.types.Menu`, `bpy.types.Header`,
180
- `bpy.types.Operator`, `bpy.types.KeyingSetInfo`,
181
- `bpy.types.RenderEngine`, `bpy.types.AssetShelf`,
182
- `bpy.types.FileHandler`
183
- :type cls: typing.Any
206
+ :param cls: Registerable Blender class type.
207
+ :type cls: type[bpy.types.Panel | bpy.types.UIList | bpy.types.Menu | bpy.types.Header | bpy.types.Operator | bpy.types.KeyingSetInfo | bpy.types.RenderEngine | bpy.types.AssetShelf | bpy.types.FileHandler | bpy.types.PropertyGroup | bpy.types.AddonPreferences]
184
208
  """
185
209
 
186
210
  def register_classes_factory(classes):
@@ -223,8 +247,8 @@ def register_preset_path(path: str) -> bool:
223
247
  """
224
248
 
225
249
  def register_submodule_factory(
226
- module_name: str, submodule_names
227
- ) -> collections.abc.Callable:
250
+ module_name: str, submodule_names: list[str]
251
+ ) -> tuple[collections.abc.Callable[None], collections.abc.Callable[None]]:
228
252
  """Utility function to create register and unregister functions
229
253
  which simply load submodules,
230
254
  calling their register & unregister functions.
@@ -232,14 +256,15 @@ def register_submodule_factory(
232
256
  :param module_name: The module name, typically __name__.
233
257
  :type module_name: str
234
258
  :param submodule_names: List of submodule names to load and unload.
259
+ :type submodule_names: list[str]
235
260
  :return: register and unregister functions.
236
- :rtype: collections.abc.Callable
261
+ :rtype: tuple[collections.abc.Callable[None], collections.abc.Callable[None]]
237
262
  """
238
263
 
239
264
  def register_tool(
240
265
  tool_cls: bpy.types.WorkSpaceTool,
241
266
  *,
242
- after=None,
267
+ after: None | collections.abc.Sequence[str] | None = None,
243
268
  separator: bool = False,
244
269
  group: bool = False,
245
270
  ):
@@ -248,6 +273,7 @@ def register_tool(
248
273
  :param tool_cls: A tool subclass.
249
274
  :type tool_cls: bpy.types.WorkSpaceTool
250
275
  :param after: Optional identifiers this tool will be added after.
276
+ :type after: None | collections.abc.Sequence[str] | None
251
277
  :param separator: When true, add a separator before this tool.
252
278
  :type separator: bool
253
279
  :param group: When true, add a new nested group of tools.
@@ -279,7 +305,7 @@ def script_paths(
279
305
  check_all: bool = False,
280
306
  use_user: bool = True,
281
307
  use_system_environment: bool = True,
282
- ):
308
+ ) -> list[str]:
283
309
  """Returns a list of valid script paths.
284
310
 
285
311
  :param subdir: Optional subdir.
@@ -293,6 +319,7 @@ def script_paths(
293
319
  :param use_system_environment: Include BLENDER_SYSTEM_SCRIPTS variable path
294
320
  :type use_system_environment: bool
295
321
  :return: script paths.
322
+ :rtype: list[str]
296
323
  """
297
324
 
298
325
  def script_paths_pref():
@@ -301,37 +328,42 @@ def script_paths_pref():
301
328
  def script_paths_system_environment():
302
329
  """Returns a list of system script directories from environment variables."""
303
330
 
304
- def smpte_from_frame(frame, *, fps=None, fps_base=None) -> str:
331
+ def smpte_from_frame(frame: float, *, fps=None, fps_base=None) -> str:
305
332
  """Returns an SMPTE formatted string from the frame:
306
333
  HH:MM:SS:FF.If fps and fps_base are not given the current scene is used.
307
334
 
308
335
  :param frame: frame number.
336
+ :type frame: float
309
337
  :return: the frame string.
310
338
  :rtype: str
311
339
  """
312
340
 
313
- def smpte_from_seconds(time, *, fps=None, fps_base=None) -> str:
341
+ def smpte_from_seconds(time: float, *, fps=None, fps_base=None) -> str:
314
342
  """Returns an SMPTE formatted string from the time:
315
343
  HH:MM:SS:FF.If fps and fps_base are not given the current scene is used.
316
344
 
317
345
  :param time: time in seconds.
346
+ :type time: float
318
347
  :return: the frame string.
319
348
  :rtype: str
320
349
  """
321
350
 
322
- def time_from_frame(frame, *, fps=None, fps_base=None):
351
+ def time_from_frame(frame: float, *, fps=None, fps_base=None):
323
352
  """Returns the time from a frame number .If fps and fps_base are not given the current scene is used.
324
353
 
325
354
  :param frame: number.
355
+ :type frame: float
326
356
  :return: the time in seconds.
327
357
  """
328
358
 
329
- def time_to_frame(time, *, fps=None, fps_base=None):
359
+ def time_to_frame(time: float, *, fps=None, fps_base=None) -> float:
330
360
  """Returns a float frame number from a time given in seconds or
331
361
  as a datetime.timedelta object.If fps and fps_base are not given the current scene is used.
332
362
 
333
363
  :param time: time in seconds.
364
+ :type time: float
334
365
  :return: The frame.
366
+ :rtype: float
335
367
  """
336
368
 
337
369
  def unescape_identifier(string: str) -> str:
@@ -344,13 +376,27 @@ def unescape_identifier(string: str) -> str:
344
376
  :rtype: str
345
377
  """
346
378
 
347
- def unregister_class(cls: typing.Any):
379
+ def unregister_class(
380
+ cls: type[
381
+ bpy.types.Panel
382
+ | bpy.types.UIList
383
+ | bpy.types.Menu
384
+ | bpy.types.Header
385
+ | bpy.types.Operator
386
+ | bpy.types.KeyingSetInfo
387
+ | bpy.types.RenderEngine
388
+ | bpy.types.AssetShelf
389
+ | bpy.types.FileHandler
390
+ | bpy.types.PropertyGroup
391
+ | bpy.types.AddonPreferences
392
+ ],
393
+ ):
348
394
  """Unload the Python class from blender.
349
395
 
350
396
  :param cls: Blender type class,
351
397
  see `bpy.utils.register_class` for classes which can
352
398
  be registered.
353
- :type cls: typing.Any
399
+ :type cls: type[bpy.types.Panel | bpy.types.UIList | bpy.types.Menu | bpy.types.Header | bpy.types.Operator | bpy.types.KeyingSetInfo | bpy.types.RenderEngine | bpy.types.AssetShelf | bpy.types.FileHandler | bpy.types.PropertyGroup | bpy.types.AddonPreferences]
354
400
  """
355
401
 
356
402
  def unregister_cli_command(handle):
@@ -32,7 +32,7 @@ class ImagePreviewCollection:
32
32
  def load(
33
33
  self,
34
34
  name: str | None,
35
- filepath,
35
+ filepath: bytes | str | None,
36
36
  filetype: str | None,
37
37
  force_reload: bool | None = False,
38
38
  ) -> bpy.types.ImagePreview:
@@ -41,6 +41,7 @@ class ImagePreviewCollection:
41
41
  :param name: The name (unique id) identifying the preview.
42
42
  :type name: str | None
43
43
  :param filepath: The file path to generate the preview from.
44
+ :type filepath: bytes | str | None
44
45
  :param filetype: The type of file, needed to generate the preview in ['IMAGE', 'MOVIE', 'BLEND', 'FONT'].
45
46
  :type filetype: str | None
46
47
  :param force_reload: If True, force running thumbnail manager even if preview already exists in cache.
@@ -38,7 +38,7 @@ def to_value(
38
38
  unit_system: str | None,
39
39
  unit_category: str | None,
40
40
  str_input: str | None,
41
- str_ref_unit=None,
41
+ str_ref_unit: None | str | None = None,
42
42
  ) -> float:
43
43
  """Convert a given input string into a float value.
44
44
 
@@ -50,6 +50,7 @@ def to_value(
50
50
  :param str_input: The string to convert to a float value.
51
51
  :type str_input: str | None
52
52
  :param str_ref_unit: A reference string from which to extract a default unit, if none is found in str_input.
53
+ :type str_ref_unit: None | str | None
53
54
  :return: The converted/interpreted value.
54
55
  :rtype: float
55
56
  """
@@ -63,21 +63,25 @@ class KeyframesCo:
63
63
  :type action_group_name: str
64
64
  """
65
65
 
66
- def bake_action(obj: bpy.types.Object, *, action, frames: int, bake_options):
66
+ def bake_action(
67
+ obj: bpy.types.Object, *, action: None | bpy.types.Action, frames: int, bake_options
68
+ ) -> None | bpy.types.Action:
67
69
  """
68
70
 
69
71
  :param obj: Object to bake.
70
72
  :type obj: bpy.types.Object
71
73
  :param action: An action to bake the data into, or None for a new action
72
74
  to be created.
75
+ :type action: None | bpy.types.Action
73
76
  :param frames: Frames to bake.
74
77
  :type frames: int
75
78
  :param bake_options: Options for baking.
76
79
  :return: Action or None.
80
+ :rtype: None | bpy.types.Action
77
81
  """
78
82
 
79
83
  def bake_action_iter(
80
- obj: bpy.types.Object, *, action, bake_options
84
+ obj: bpy.types.Object, *, action: None | bpy.types.Action, bake_options
81
85
  ) -> bpy.types.Action:
82
86
  """An coroutine that bakes action for a single object.
83
87
 
@@ -85,17 +89,21 @@ def bake_action_iter(
85
89
  :type obj: bpy.types.Object
86
90
  :param action: An action to bake the data into, or None for a new action
87
91
  to be created.
92
+ :type action: None | bpy.types.Action
88
93
  :param bake_options: Boolean options of what to include into the action bake.
89
94
  :return: an action or None
90
95
  :rtype: bpy.types.Action
91
96
  """
92
97
 
93
- def bake_action_objects(object_action_pairs, *, frames, bake_options):
98
+ def bake_action_objects(
99
+ object_action_pairs, *, frames, bake_options
100
+ ) -> collections.abc.Sequence[bpy.types.Action]:
94
101
  """A version of `bake_action_objects_iter` that takes frames and returns the output.
95
102
 
96
103
  :param frames: Frames to bake.
97
104
  :param bake_options: Options for baking.
98
105
  :return: A sequence of Action or None types (aligned with object_action_pairs)
106
+ :rtype: collections.abc.Sequence[bpy.types.Action]
99
107
  """
100
108
 
101
109
  def bake_action_objects_iter(object_action_pairs, bake_options):
@@ -2,12 +2,13 @@ import typing
2
2
  import collections.abc
3
3
  import typing_extensions
4
4
 
5
- def bmesh_linked_uv_islands(bm, uv_layer):
5
+ def bmesh_linked_uv_islands(bm, uv_layer) -> list[list[int]]:
6
6
  """Returns lists of faces connected by UV islands.For meshes use `bpy.types.Mesh.mesh_linked_uv_islands` instead.
7
7
 
8
8
  :param bm: the bmesh used to group with.
9
9
  :param uv_layer: the UV layer to source UVs from.
10
10
  :return: list of lists containing polygon indices
11
+ :rtype: list[list[int]]
11
12
  """
12
13
 
13
14
  def match_uv(face, vert, uv, uv_layer): ...
@@ -1,6 +1,7 @@
1
1
  import typing
2
2
  import collections.abc
3
3
  import typing_extensions
4
+ import bpy.types
4
5
 
5
6
  def load_image(
6
7
  imagepath,
@@ -10,10 +11,10 @@ def load_image(
10
11
  ncase_cmp: bool = True,
11
12
  convert_callback: typing.Any | None = None,
12
13
  verbose=False,
13
- relpath=None,
14
+ relpath: None | str | None = None,
14
15
  check_existing: bool = False,
15
16
  force_reload: bool = False,
16
- ):
17
+ ) -> None | bpy.types.Image:
17
18
  """Return an image from the file path with options to search multiple paths
18
19
  and return a placeholder if its not found.
19
20
 
@@ -36,6 +37,7 @@ def load_image(
36
37
  For formats blender can read, simply return the path that is given.
37
38
  :type convert_callback: typing.Any | None
38
39
  :param relpath: If not None, make the file relative to this path.
40
+ :type relpath: None | str | None
39
41
  :param check_existing: If true,
40
42
  returns already loaded image datablock if possible
41
43
  (based on file path).
@@ -45,4 +47,5 @@ def load_image(
45
47
  is also enabled).
46
48
  :type force_reload: bool
47
49
  :return: an image or None
50
+ :rtype: None | bpy.types.Image
48
51
  """
@@ -2,6 +2,7 @@ import typing
2
2
  import collections.abc
3
3
  import typing_extensions
4
4
  import bpy.types
5
+ import mathutils
5
6
 
6
7
  class ExportHelper:
7
8
  def check(self, _context):
@@ -60,14 +61,18 @@ def axis_conversion_ensure(
60
61
  :rtype: bool
61
62
  """
62
63
 
63
- def create_derived_objects(depsgraph: bpy.types.Depsgraph, objects):
64
+ def create_derived_objects(
65
+ depsgraph: bpy.types.Depsgraph, objects: collections.abc.Sequence[bpy.types.Object]
66
+ ) -> dict[bpy.types.Object, list[tuple[bpy.types.Object, mathutils.Matrix]]]:
64
67
  """This function takes a sequence of objects, returning their instances.
65
68
 
66
69
  :param depsgraph: The evaluated depsgraph.
67
70
  :type depsgraph: bpy.types.Depsgraph
68
71
  :param objects: A sequencer of objects.
72
+ :type objects: collections.abc.Sequence[bpy.types.Object]
69
73
  :return: A dictionary where each key is an object from objects,
70
74
  values are lists of (object, matrix) tuples representing instances.
75
+ :rtype: dict[bpy.types.Object, list[tuple[bpy.types.Object, mathutils.Matrix]]]
71
76
  """
72
77
 
73
78
  def orientation_helper(axis_forward="Y", axis_up="Z"):
@@ -83,7 +88,7 @@ def path_reference(
83
88
  mode: str = "AUTO",
84
89
  copy_subdir: str = "",
85
90
  copy_set=None,
86
- library=None,
91
+ library: None | bpy.types.Library | None = None,
87
92
  ) -> str:
88
93
  """Return a filepath relative to a destination directory, for use with
89
94
  exporters.
@@ -105,16 +110,17 @@ def path_reference(
105
110
  :param copy_set: collect from/to pairs when mode='COPY',
106
111
  pass to path_reference_copy when exporting is done.
107
112
  :param library: The library this path is relative to.
113
+ :type library: None | bpy.types.Library | None
108
114
  :return: the new filepath.
109
115
  :rtype: str
110
116
  """
111
117
 
112
- def path_reference_copy(copy_set, report: collections.abc.Callable = print):
118
+ def path_reference_copy(copy_set, report: collections.abc.Callable[str, None] = print):
113
119
  """Execute copying files of path_reference
114
120
 
115
121
  :param copy_set: set of (from, to) pairs to copy.
116
122
  :param report: function used for reporting warnings, takes a string argument.
117
- :type report: collections.abc.Callable
123
+ :type report: collections.abc.Callable[str, None]
118
124
  """
119
125
 
120
126
  def poll_file_object_drop(context):
@@ -124,7 +130,7 @@ def poll_file_object_drop(context):
124
130
  """
125
131
 
126
132
  def unique_name(
127
- key,
133
+ key: typing.Any,
128
134
  name: str,
129
135
  name_dict: dict,
130
136
  name_max=-1,
@@ -138,6 +144,7 @@ def unique_name(
138
144
  when available.
139
145
  This can be the object, mesh, material, etc instance itself.
140
146
  Any hashable object associated with the name.
147
+ :type key: typing.Any
141
148
  :param name: The name used to create a unique value in name_dict.
142
149
  :type name: str
143
150
  :param name_dict: This is used to cache namespace to ensure no collisions
@@ -2,17 +2,20 @@ import typing
2
2
  import collections.abc
3
3
  import typing_extensions
4
4
  import bpy.types
5
+ import mathutils
5
6
 
6
- def edge_face_count(mesh):
7
+ def edge_face_count(mesh) -> list[int]:
7
8
  """
8
9
 
9
10
  :return: list face users for each item in mesh.edges.
11
+ :rtype: list[int]
10
12
  """
11
13
 
12
- def edge_face_count_dict(mesh):
14
+ def edge_face_count_dict(mesh) -> dict[tuple[int, int], int]:
13
15
  """
14
16
 
15
17
  :return: Dictionary of edge keys with their value set to the number of faces using each edge.
18
+ :rtype: dict[tuple[int, int], int]
16
19
  """
17
20
 
18
21
  def edge_loops_from_edges(mesh, edges=None):
@@ -21,43 +24,61 @@ def edge_loops_from_edges(mesh, edges=None):
21
24
 
22
25
  """
23
26
 
24
- def mesh_linked_triangles(mesh: bpy.types.Mesh):
27
+ def mesh_linked_triangles(
28
+ mesh: bpy.types.Mesh,
29
+ ) -> list[list[bpy.types.MeshLoopTriangle]]:
25
30
  """Splits the mesh into connected triangles, use this for separating cubes from
26
31
  other mesh elements within 1 mesh data-block.
27
32
 
28
33
  :param mesh: the mesh used to group with.
29
34
  :type mesh: bpy.types.Mesh
30
35
  :return: Lists of lists containing triangles.
36
+ :rtype: list[list[bpy.types.MeshLoopTriangle]]
31
37
  """
32
38
 
33
- def mesh_linked_uv_islands(mesh: bpy.types.Mesh):
39
+ def mesh_linked_uv_islands(mesh: bpy.types.Mesh) -> list[list[int]]:
34
40
  """Returns lists of polygon indices connected by UV islands.
35
41
 
36
42
  :param mesh: the mesh used to group with.
37
43
  :type mesh: bpy.types.Mesh
38
44
  :return: list of lists containing polygon indices
45
+ :rtype: list[list[int]]
39
46
  """
40
47
 
41
- def ngon_tessellate(from_data, indices, fix_loops: bool = True, debug_print=True):
48
+ def ngon_tessellate(
49
+ from_data: bpy.types.Mesh
50
+ | list[collections.abc.Sequence[float]]
51
+ | tuple[collections.abc.Sequence[float]],
52
+ indices: list[int],
53
+ fix_loops: bool = True,
54
+ debug_print=True,
55
+ ):
42
56
  """Takes a poly-line of indices (ngon) and returns a list of face
43
57
  index lists. Designed to be used for importers that need indices for an
44
58
  ngon to create from existing verts.
45
59
 
46
60
  :param from_data: Either a mesh, or a list/tuple of 3D vectors.
61
+ :type from_data: bpy.types.Mesh | list[collections.abc.Sequence[float]] | tuple[collections.abc.Sequence[float]]
47
62
  :param indices: a list of indices to use this list
48
63
  is the ordered closed poly-line
49
64
  to fill, and can be a subset of the data given.
65
+ :type indices: list[int]
50
66
  :param fix_loops: If this is enabled poly-lines
51
67
  that use loops to make multiple
52
68
  poly-lines are dealt with correctly.
53
69
  :type fix_loops: bool
54
70
  """
55
71
 
56
- def triangle_random_points(num_points: int, loop_triangles):
72
+ def triangle_random_points(
73
+ num_points: int,
74
+ loop_triangles: collections.abc.Sequence[bpy.types.MeshLoopTriangle],
75
+ ) -> list[mathutils.Vector]:
57
76
  """Generates a list of random points over mesh loop triangles.
58
77
 
59
78
  :param num_points: The number of random points to generate on each triangle.
60
79
  :type num_points: int
61
80
  :param loop_triangles: Sequence of the triangles to generate points on.
81
+ :type loop_triangles: collections.abc.Sequence[bpy.types.MeshLoopTriangle]
62
82
  :return: List of random points over all triangles.
83
+ :rtype: list[mathutils.Vector]
63
84
  """
@@ -12,12 +12,12 @@ class AddObjectHelper:
12
12
  """
13
13
 
14
14
  def add_object_align_init(
15
- context: bpy.types.Context | None, operator: bpy.types.Operator
15
+ context: bpy.types.Context, operator: bpy.types.Operator
16
16
  ) -> mathutils.Matrix:
17
17
  """Return a matrix using the operator settings and view context.
18
18
 
19
19
  :param context: The context to use.
20
- :type context: bpy.types.Context | None
20
+ :type context: bpy.types.Context
21
21
  :param operator: The operator, checked for location and rotation properties.
22
22
  :type operator: bpy.types.Operator
23
23
  :return: the matrix from the context and settings.
@@ -34,8 +34,8 @@ def object_add_grid_scale_apply_operator(operator, context):
34
34
  """Scale an operators distance values by the grid size."""
35
35
 
36
36
  def object_data_add(
37
- context: bpy.types.Context | None,
38
- obdata,
37
+ context: bpy.types.Context,
38
+ obdata: None | bpy.types.ID,
39
39
  operator: bpy.types.Operator | None = None,
40
40
  name: str | None = None,
41
41
  ) -> bpy.types.Object:
@@ -43,8 +43,9 @@ def object_data_add(
43
43
  location, rotation and layer.
44
44
 
45
45
  :param context: The context to use.
46
- :type context: bpy.types.Context | None
46
+ :type context: bpy.types.Context
47
47
  :param obdata: Valid object data to used for the new object or None.
48
+ :type obdata: None | bpy.types.ID
48
49
  :param operator: The operator, checked for location and rotation properties.
49
50
  :type operator: bpy.types.Operator | None
50
51
  :param name: Optional name
@@ -10,7 +10,7 @@ def location_3d_to_region_2d(
10
10
  coord: collections.abc.Sequence[float] | mathutils.Vector,
11
11
  *,
12
12
  default=None,
13
- ):
13
+ ) -> mathutils.Vector | typing.Any:
14
14
  """Return the region relative 2d location of a 3d position.
15
15
 
16
16
  :param region: region of the 3D viewport, typically bpy.context.region.
@@ -22,6 +22,7 @@ def location_3d_to_region_2d(
22
22
  :param default: Return this value if coord
23
23
  is behind the origin of a perspective view.
24
24
  :return: 2d location
25
+ :rtype: mathutils.Vector | typing.Any
25
26
  """
26
27
 
27
28
  def region_2d_to_location_3d(
@@ -48,7 +49,11 @@ def region_2d_to_location_3d(
48
49
  """
49
50
 
50
51
  def region_2d_to_origin_3d(
51
- region: bpy.types.Region, rv3d: bpy.types.RegionView3D, coord, *, clamp=None
52
+ region: bpy.types.Region,
53
+ rv3d: bpy.types.RegionView3D,
54
+ coord: collections.abc.Sequence[float],
55
+ *,
56
+ clamp: None | float | None = None,
52
57
  ) -> mathutils.Vector:
53
58
  """Return the 3d view origin from the region relative 2d coords.
54
59
 
@@ -58,8 +63,10 @@ def region_2d_to_origin_3d(
58
63
  :type rv3d: bpy.types.RegionView3D
59
64
  :param coord: 2D coordinates relative to the region;
60
65
  (event.mouse_region_x, event.mouse_region_y) for example.
66
+ :type coord: collections.abc.Sequence[float]
61
67
  :param clamp: Clamp the maximum far-clip value used.
62
68
  (negative value will move the offset away from the view_location)
69
+ :type clamp: None | float | None
63
70
  :return: The origin of the viewpoint in 3d space.
64
71
  :rtype: mathutils.Vector
65
72
  """
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: fake-bge-module
3
- Version: 20250104
3
+ Version: 20250201
4
4
  Summary: Collection of the fake Blender Game Engine (BGE) Python API module for the code completion.
5
5
  Author: nutti
6
6
  Author-email: nutti.metro@gmail.com
@@ -21,7 +21,7 @@ Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE)
21
21
  Classifier: Programming Language :: Python
22
22
  Classifier: Programming Language :: Python :: 3
23
23
  Classifier: License :: OSI Approved :: MIT License
24
- Requires-Python: >=3.12
24
+ Requires-Python: >=3.8
25
25
  Description-Content-Type: text/markdown
26
26
 
27
27
  # Fake Blender Game Engine (BGE) Python API module collection: fake-bge-module