fake-bpy-module 20240421__py3-none-any.whl → 20240423__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.
- bl_operators/add_mesh_torus/__init__.pyi +2 -1
- bl_operators/assets/__init__.pyi +12 -12
- bl_operators/geometry_nodes/__init__.pyi +256 -238
- bl_operators/node/__init__.pyi +262 -260
- bl_operators/object_quick_effects/__init__.pyi +19 -19
- bl_operators/presets/__init__.pyi +371 -368
- bl_operators/wm/__init__.pyi +4 -4
- bl_ui/__init__.pyi +3 -3
- bl_ui/anim/__init__.pyi +1 -1
- bl_ui/asset_shelf/__init__.pyi +1 -1
- bl_ui/generic_ui_list/__init__.pyi +3 -3
- bl_ui/node_add_menu/__init__.pyi +1 -1
- bl_ui/node_add_menu_compositor/__init__.pyi +18 -18
- bl_ui/node_add_menu_geometry/__init__.pyi +50 -48
- bl_ui/node_add_menu_shader/__init__.pyi +10 -10
- bl_ui/node_add_menu_texture/__init__.pyi +9 -9
- bl_ui/properties_collection/__init__.pyi +39 -25
- bl_ui/properties_constraint/__init__.pyi +1257 -1041
- bl_ui/properties_data_armature/__init__.pyi +120 -96
- bl_ui/properties_data_bone/__init__.pyi +36 -29
- bl_ui/properties_data_camera/__init__.pyi +32 -14
- bl_ui/properties_data_curve/__init__.pyi +143 -116
- bl_ui/properties_data_curves/__init__.pyi +30 -25
- bl_ui/properties_data_empty/__init__.pyi +21 -21
- bl_ui/properties_data_gpencil/__init__.pyi +297 -260
- bl_ui/properties_data_grease_pencil/__init__.pyi +228 -205
- bl_ui/properties_data_lattice/__init__.pyi +25 -22
- bl_ui/properties_data_light/__init__.pyi +44 -31
- bl_ui/properties_data_lightprobe/__init__.pyi +54 -32
- bl_ui/properties_data_mesh/__init__.pyi +579 -570
- bl_ui/properties_data_metaball/__init__.pyi +29 -24
- bl_ui/properties_data_modifier/__init__.pyi +55 -43
- bl_ui/properties_data_pointcloud/__init__.pyi +146 -139
- bl_ui/properties_data_shaderfx/__init__.pyi +13 -13
- bl_ui/properties_data_speaker/__init__.pyi +27 -24
- bl_ui/properties_data_volume/__init__.pyi +75 -68
- bl_ui/properties_freestyle/__init__.pyi +407 -284
- bl_ui/properties_grease_pencil_common/__init__.pyi +13 -13
- bl_ui/properties_mask_common/__init__.pyi +7 -7
- bl_ui/properties_material/__init__.pyi +186 -162
- bl_ui/properties_material_gpencil/__init__.pyi +111 -87
- bl_ui/properties_object/__init__.pyi +102 -84
- bl_ui/properties_output/__init__.pyi +255 -228
- bl_ui/properties_paint_common/__init__.pyi +9 -9
- bl_ui/properties_particle/__init__.pyi +341 -254
- bl_ui/properties_physics_cloth/__init__.pyi +54 -33
- bl_ui/properties_physics_common/__init__.pyi +20 -20
- bl_ui/properties_physics_dynamicpaint/__init__.pyi +231 -193
- bl_ui/properties_physics_field/__init__.pyi +52 -36
- bl_ui/properties_physics_fluid/__init__.pyi +119 -96
- bl_ui/properties_physics_geometry_nodes/__init__.pyi +1 -1
- bl_ui/properties_physics_rigidbody/__init__.pyi +36 -20
- bl_ui/properties_physics_rigidbody_constraint/__init__.pyi +51 -25
- bl_ui/properties_physics_softbody/__init__.pyi +62 -34
- bl_ui/properties_render/__init__.pyi +275 -187
- bl_ui/properties_scene/__init__.pyi +173 -154
- bl_ui/properties_texture/__init__.pyi +251 -205
- bl_ui/properties_view_layer/__init__.pyi +126 -93
- bl_ui/properties_workspace/__init__.pyi +82 -76
- bl_ui/properties_world/__init__.pyi +31 -26
- bl_ui/space_clip/__init__.pyi +495 -433
- bl_ui/space_console/__init__.pyi +6 -6
- bl_ui/space_dopesheet/__init__.pyi +209 -174
- bl_ui/space_filebrowser/__init__.pyi +691 -679
- bl_ui/space_graph/__init__.pyi +25 -20
- bl_ui/space_image/__init__.pyi +959 -845
- bl_ui/space_info/__init__.pyi +6 -6
- bl_ui/space_nla/__init__.pyi +26 -17
- bl_ui/space_node/__init__.pyi +49 -36
- bl_ui/space_outliner/__init__.pyi +14 -14
- bl_ui/space_properties/__init__.pyi +3 -3
- bl_ui/space_sequencer/__init__.pyi +510 -444
- bl_ui/space_spreadsheet/__init__.pyi +1 -1
- bl_ui/space_statusbar/__init__.pyi +1 -1
- bl_ui/space_text/__init__.pyi +16 -16
- bl_ui/space_time/__init__.pyi +27 -23
- bl_ui/space_toolsystem_common/__init__.pyi +1 -1
- bl_ui/space_toolsystem_toolbar/__init__.pyi +52 -4
- bl_ui/space_topbar/__init__.pyi +26 -26
- bl_ui/space_userpref/__init__.pyi +795 -658
- bl_ui/space_view3d/__init__.pyi +1460 -1428
- bl_ui/space_view3d_toolbar/__init__.pyi +2968 -2657
- bl_ui/temp_anim_layers/__init__.pyi +1 -1
- bmesh/types/__init__.pyi +13 -6
- bpy/app/__init__.pyi +4 -4
- bpy/app/icons/__init__.pyi +8 -6
- bpy/app/timers/__init__.pyi +10 -8
- bpy/app/translations/__init__.pyi +22 -20
- bpy/msgbus/__init__.pyi +4 -2
- bpy/ops/action/__init__.pyi +319 -316
- bpy/ops/anim/__init__.pyi +428 -428
- bpy/ops/armature/__init__.pyi +359 -358
- bpy/ops/asset/__init__.pyi +146 -146
- bpy/ops/boid/__init__.pyi +50 -50
- bpy/ops/brush/__init__.pyi +72 -72
- bpy/ops/buttons/__init__.pyi +128 -128
- bpy/ops/cachefile/__init__.pyi +124 -124
- bpy/ops/camera/__init__.pyi +22 -22
- bpy/ops/clip/__init__.pyi +773 -768
- bpy/ops/cloth/__init__.pyi +10 -10
- bpy/ops/collection/__init__.pyi +64 -64
- bpy/ops/console/__init__.pyi +150 -150
- bpy/ops/constraint/__init__.pyi +150 -150
- bpy/ops/curve/__init__.pyi +475 -472
- bpy/ops/curves/__init__.pyi +247 -244
- bpy/ops/cycles/__init__.pyi +18 -18
- bpy/ops/dpaint/__init__.pyi +34 -34
- bpy/ops/ed/__init__.pyi +122 -122
- bpy/ops/export_anim/__init__.pyi +18 -18
- bpy/ops/export_mesh/__init__.pyi +26 -26
- bpy/ops/export_scene/__init__.pyi +333 -307
- bpy/ops/file/__init__.pyi +340 -340
- bpy/ops/fluid/__init__.pyi +88 -88
- bpy/ops/font/__init__.pyi +252 -252
- bpy/ops/geometry/__init__.pyi +86 -86
- bpy/ops/gizmogroup/__init__.pyi +22 -22
- bpy/ops/gpencil/__init__.pyi +1459 -1444
- bpy/ops/graph/__init__.pyi +645 -642
- bpy/ops/grease_pencil/__init__.pyi +580 -436
- bpy/ops/image/__init__.pyi +614 -612
- bpy/ops/import_anim/__init__.pyi +26 -26
- bpy/ops/import_curve/__init__.pyi +6 -6
- bpy/ops/import_mesh/__init__.pyi +20 -18
- bpy/ops/import_scene/__init__.pyi +92 -86
- bpy/ops/info/__init__.pyi +60 -60
- bpy/ops/lattice/__init__.pyi +64 -64
- bpy/ops/marker/__init__.pyi +106 -106
- bpy/ops/mask/__init__.pyi +321 -318
- bpy/ops/material/__init__.pyi +18 -18
- bpy/ops/mball/__init__.pyi +71 -70
- bpy/ops/mesh/__init__.pyi +1997 -1990
- bpy/ops/nla/__init__.pyi +331 -330
- bpy/ops/node/__init__.pyi +867 -852
- bpy/ops/object/__init__.pyi +2433 -2430
- bpy/ops/outliner/__init__.pyi +498 -498
- bpy/ops/paint/__init__.pyi +554 -544
- bpy/ops/paintcurve/__init__.pyi +64 -64
- bpy/ops/palette/__init__.pyi +48 -48
- bpy/ops/particle/__init__.pyi +266 -264
- bpy/ops/pose/__init__.pyi +336 -336
- bpy/ops/poselib/__init__.pyi +70 -70
- bpy/ops/preferences/__init__.pyi +338 -336
- bpy/ops/ptcache/__init__.pyi +46 -46
- bpy/ops/render/__init__.pyi +114 -114
- bpy/ops/rigidbody/__init__.pyi +102 -102
- bpy/ops/scene/__init__.pyi +270 -270
- bpy/ops/screen/__init__.pyi +378 -378
- bpy/ops/script/__init__.pyi +18 -18
- bpy/ops/sculpt/__init__.pyi +411 -405
- bpy/ops/sculpt_curves/__init__.pyi +42 -40
- bpy/ops/sequencer/__init__.pyi +1053 -1040
- bpy/ops/sound/__init__.pyi +208 -208
- bpy/ops/spreadsheet/__init__.pyi +30 -30
- bpy/ops/surface/__init__.pyi +108 -108
- bpy/ops/text/__init__.pyi +382 -382
- bpy/ops/text_editor/__init__.pyi +10 -10
- bpy/ops/texture/__init__.pyi +26 -26
- bpy/ops/transform/__init__.pyi +826 -790
- bpy/ops/ui/__init__.pyi +216 -216
- bpy/ops/uilist/__init__.pyi +20 -20
- bpy/ops/uv/__init__.pyi +605 -600
- bpy/ops/view2d/__init__.pyi +156 -156
- bpy/ops/view3d/__init__.pyi +578 -576
- bpy/ops/wm/__init__.pyi +2418 -2376
- bpy/ops/workspace/__init__.pyi +42 -42
- bpy/ops/world/__init__.pyi +6 -6
- bpy/path/__init__.pyi +48 -33
- bpy/props/__init__.pyi +263 -261
- bpy/types/__init__.pyi +105733 -102298
- bpy/utils/__init__.pyi +87 -52
- bpy/utils/previews/__init__.pyi +2 -2
- bpy/utils/units/__init__.pyi +21 -18
- bpy_extras/anim_utils/__init__.pyi +9 -2
- bpy_extras/io_utils/__init__.pyi +2 -1
- bpy_extras/view3d_utils/__init__.pyi +2 -1
- bpy_types/__init__.pyi +236 -236
- {fake_bpy_module-20240421.dist-info → fake_bpy_module-20240423.dist-info}/METADATA +1 -1
- {fake_bpy_module-20240421.dist-info → fake_bpy_module-20240423.dist-info}/RECORD +187 -187
- freestyle/chainingiterators/__init__.pyi +7 -2
- freestyle/types/__init__.pyi +8 -3
- gpu_extras/presets/__init__.pyi +14 -2
- keyingsets_builtins/__init__.pyi +92 -92
- mathutils/__init__.pyi +9 -5
- mathutils/geometry/__init__.pyi +8 -4
- nodeitems_builtins/__init__.pyi +7 -7
- {fake_bpy_module-20240421.dist-info → fake_bpy_module-20240423.dist-info}/WHEEL +0 -0
- {fake_bpy_module-20240421.dist-info → fake_bpy_module-20240423.dist-info}/top_level.txt +0 -0
bpy/utils/__init__.pyi
CHANGED
|
@@ -16,11 +16,11 @@ from . import units
|
|
|
16
16
|
|
|
17
17
|
GenericType = typing.TypeVar("GenericType")
|
|
18
18
|
|
|
19
|
-
def app_template_paths(path: str = None):
|
|
19
|
+
def app_template_paths(path: typing.Optional[str] = None):
|
|
20
20
|
"""Returns valid application template paths.
|
|
21
21
|
|
|
22
22
|
:param path: Optional subdir.
|
|
23
|
-
:type path: str
|
|
23
|
+
:type path: typing.Optional[str]
|
|
24
24
|
:return: app template paths.
|
|
25
25
|
"""
|
|
26
26
|
|
|
@@ -32,38 +32,40 @@ def app_template_paths(path):
|
|
|
32
32
|
...
|
|
33
33
|
|
|
34
34
|
def blend_paths(
|
|
35
|
-
absolute: bool = False,
|
|
35
|
+
absolute: typing.Optional[bool] = False,
|
|
36
|
+
packed: typing.Optional[bool] = False,
|
|
37
|
+
local: typing.Optional[bool] = False,
|
|
36
38
|
) -> typing.List[str]:
|
|
37
39
|
"""Returns a list of paths to external files referenced by the loaded .blend file.
|
|
38
40
|
|
|
39
41
|
:param absolute: When true the paths returned are made absolute.
|
|
40
|
-
:type absolute: bool
|
|
42
|
+
:type absolute: typing.Optional[bool]
|
|
41
43
|
:param packed: When true skip file paths for packed data.
|
|
42
|
-
:type packed: bool
|
|
44
|
+
:type packed: typing.Optional[bool]
|
|
43
45
|
:param local: When true skip linked library paths.
|
|
44
|
-
:type local: bool
|
|
46
|
+
:type local: typing.Optional[bool]
|
|
45
47
|
:return: path list.
|
|
46
48
|
:rtype: typing.List[str]
|
|
47
49
|
"""
|
|
48
50
|
|
|
49
51
|
...
|
|
50
52
|
|
|
51
|
-
def escape_identifier(string: str) -> str:
|
|
53
|
+
def escape_identifier(string: typing.Optional[str]) -> str:
|
|
52
54
|
"""Simple string escaping function used for animation paths.
|
|
53
55
|
|
|
54
56
|
:param string: text
|
|
55
|
-
:type string: str
|
|
57
|
+
:type string: typing.Optional[str]
|
|
56
58
|
:return: The escaped string.
|
|
57
59
|
:rtype: str
|
|
58
60
|
"""
|
|
59
61
|
|
|
60
62
|
...
|
|
61
63
|
|
|
62
|
-
def execfile(filepath: str, mod=None):
|
|
64
|
+
def execfile(filepath: typing.Optional[str], mod=None):
|
|
63
65
|
"""Execute a file path as a Python script.
|
|
64
66
|
|
|
65
67
|
:param filepath: Path of the script to execute.
|
|
66
|
-
:type filepath: str
|
|
68
|
+
:type filepath: typing.Optional[str]
|
|
67
69
|
:param mod: Optional cached module, the result of a previous execution.
|
|
68
70
|
:return: The module which can be passed back in as mod.
|
|
69
71
|
"""
|
|
@@ -75,14 +77,16 @@ def execfile(filepath, mod):
|
|
|
75
77
|
|
|
76
78
|
...
|
|
77
79
|
|
|
78
|
-
def flip_name(
|
|
80
|
+
def flip_name(
|
|
81
|
+
name: typing.Optional[str], strip_digits: typing.Optional[bool] = False
|
|
82
|
+
) -> str:
|
|
79
83
|
"""Flip a name between left/right sides, useful for
|
|
80
84
|
mirroring bone names.
|
|
81
85
|
|
|
82
86
|
:param name: Bone name to flip.
|
|
83
|
-
:type name: str
|
|
87
|
+
:type name: typing.Optional[str]
|
|
84
88
|
:param strip_digits: Whether to remove .### suffix.
|
|
85
|
-
:type strip_digits: bool
|
|
89
|
+
:type strip_digits: typing.Optional[bool]
|
|
86
90
|
:return: The flipped name.
|
|
87
91
|
:rtype: str
|
|
88
92
|
"""
|
|
@@ -115,18 +119,20 @@ def keyconfig_set(filepath, report):
|
|
|
115
119
|
...
|
|
116
120
|
|
|
117
121
|
def load_scripts(
|
|
118
|
-
reload_scripts: bool = False,
|
|
122
|
+
reload_scripts: typing.Optional[bool] = False,
|
|
123
|
+
refresh_scripts: typing.Optional[bool] = False,
|
|
124
|
+
extensions: typing.Optional[bool] = True,
|
|
119
125
|
):
|
|
120
126
|
"""Load scripts and run each modules register function.
|
|
121
127
|
|
|
122
128
|
:param reload_scripts: Causes all scripts to have their unregister method
|
|
123
129
|
called before loading.
|
|
124
|
-
:type reload_scripts: bool
|
|
130
|
+
:type reload_scripts: typing.Optional[bool]
|
|
125
131
|
:param refresh_scripts: only load scripts which are not already loaded
|
|
126
132
|
as modules.
|
|
127
|
-
:type refresh_scripts: bool
|
|
133
|
+
:type refresh_scripts: typing.Optional[bool]
|
|
128
134
|
:param extensions: Loads additional scripts (add-ons & app-templates).
|
|
129
|
-
:type extensions: bool
|
|
135
|
+
:type extensions: typing.Optional[bool]
|
|
130
136
|
"""
|
|
131
137
|
|
|
132
138
|
...
|
|
@@ -141,15 +147,19 @@ def load_scripts_extensions(reload_scripts):
|
|
|
141
147
|
|
|
142
148
|
...
|
|
143
149
|
|
|
144
|
-
def make_rna_paths(
|
|
150
|
+
def make_rna_paths(
|
|
151
|
+
struct_name: typing.Optional[str],
|
|
152
|
+
prop_name: typing.Optional[str],
|
|
153
|
+
enum_name: typing.Optional[str],
|
|
154
|
+
):
|
|
145
155
|
"""Create RNA "paths" from given names.
|
|
146
156
|
|
|
147
157
|
:param struct_name: Name of a RNA struct (like e.g. "Scene").
|
|
148
|
-
:type struct_name: str
|
|
158
|
+
:type struct_name: typing.Optional[str]
|
|
149
159
|
:param prop_name: Name of a RNA struct's property.
|
|
150
|
-
:type prop_name: str
|
|
160
|
+
:type prop_name: typing.Optional[str]
|
|
151
161
|
:param enum_name: Name of a RNA enum identifier.
|
|
152
|
-
:type enum_name: str
|
|
162
|
+
:type enum_name: typing.Optional[str]
|
|
153
163
|
:return: A triple of three "RNA paths"
|
|
154
164
|
(most_complete_path, "struct.prop", "struct.prop:'enum'").
|
|
155
165
|
If no enum_name is given, the third element will always be void.
|
|
@@ -187,14 +197,16 @@ def manual_map():
|
|
|
187
197
|
|
|
188
198
|
...
|
|
189
199
|
|
|
190
|
-
def modules_from_path(
|
|
200
|
+
def modules_from_path(
|
|
201
|
+
path: typing.Optional[str], loaded_modules: typing.Optional[set]
|
|
202
|
+
) -> list:
|
|
191
203
|
"""Load all modules in a path and return them as a list.
|
|
192
204
|
|
|
193
205
|
:param path: this path is scanned for scripts and packages.
|
|
194
|
-
:type path: str
|
|
206
|
+
:type path: typing.Optional[str]
|
|
195
207
|
:param loaded_modules: already loaded module names, files matching these
|
|
196
208
|
names will be ignored.
|
|
197
|
-
:type loaded_modules: set
|
|
209
|
+
:type loaded_modules: typing.Optional[set]
|
|
198
210
|
:return: all loaded modules.
|
|
199
211
|
:rtype: list
|
|
200
212
|
"""
|
|
@@ -216,11 +228,11 @@ def preset_find(name, preset_path, display_name, ext):
|
|
|
216
228
|
|
|
217
229
|
...
|
|
218
230
|
|
|
219
|
-
def preset_paths(subdir: str) -> list:
|
|
231
|
+
def preset_paths(subdir: typing.Optional[str]) -> list:
|
|
220
232
|
"""Returns a list of paths for a specific preset.
|
|
221
233
|
|
|
222
234
|
:param subdir: preset subdirectory (must not be an absolute path).
|
|
223
|
-
:type subdir: str
|
|
235
|
+
:type subdir: typing.Optional[str]
|
|
224
236
|
:return: script paths.
|
|
225
237
|
:rtype: list
|
|
226
238
|
"""
|
|
@@ -268,7 +280,9 @@ def register_classes_factory(classes):
|
|
|
268
280
|
|
|
269
281
|
...
|
|
270
282
|
|
|
271
|
-
def register_cli_command(
|
|
283
|
+
def register_cli_command(
|
|
284
|
+
id: typing.Optional[str], execute: typing.Optional[typing.Callable]
|
|
285
|
+
):
|
|
272
286
|
"""Register a command, accessible via the (-c / --command) command-line argument.Custom CommandsRegistering commands makes it possible to conveniently expose command line
|
|
273
287
|
functionality via commands passed to (-c / --command).Using Python Argument ParsingThis example shows how the Python argparse module can be used with a custom command.Using argparse is generally recommended as it has many useful utilities and
|
|
274
288
|
generates a --help message for your command.
|
|
@@ -276,11 +290,11 @@ def register_cli_command(id: str, execute: typing.Callable):
|
|
|
276
290
|
:param id: The command identifier (must pass an str.isidentifier check).
|
|
277
291
|
|
|
278
292
|
If the id is already registered, a warning is printed and the command is inaccessible to prevent accidents invoking the wrong command.
|
|
279
|
-
:type id: str
|
|
293
|
+
:type id: typing.Optional[str]
|
|
280
294
|
:param execute: Callback, taking a single list of strings and returns an int.
|
|
281
295
|
The arguments are built from all command-line arguments following the command id.
|
|
282
296
|
The return value should be 0 for success, 1 on failure (specific error codes from the os module can also be used).
|
|
283
|
-
:type execute: typing.Callable
|
|
297
|
+
:type execute: typing.Optional[typing.Callable]
|
|
284
298
|
:return: The command handle which can be passed to `unregister_cli_command`.
|
|
285
299
|
"""
|
|
286
300
|
|
|
@@ -296,15 +310,18 @@ def register_manual_map(manual_hook):
|
|
|
296
310
|
|
|
297
311
|
...
|
|
298
312
|
|
|
299
|
-
def register_submodule_factory(
|
|
313
|
+
def register_submodule_factory(
|
|
314
|
+
module_name: typing.Optional[str],
|
|
315
|
+
submodule_names: typing.Optional[typing.List[str]],
|
|
316
|
+
):
|
|
300
317
|
"""Utility function to create register and unregister functions
|
|
301
318
|
which simply load submodules,
|
|
302
319
|
calling their register & unregister functions.
|
|
303
320
|
|
|
304
321
|
:param module_name: The module name, typically __name__.
|
|
305
|
-
:type module_name: str
|
|
322
|
+
:type module_name: typing.Optional[str]
|
|
306
323
|
:param submodule_names: List of submodule names to load and unload.
|
|
307
|
-
:type submodule_names: typing.List[str]
|
|
324
|
+
:type submodule_names: typing.Optional[typing.List[str]]
|
|
308
325
|
:return: register and unregister functions.
|
|
309
326
|
"""
|
|
310
327
|
|
|
@@ -315,14 +332,19 @@ def register_submodule_factory(module_name, submodule_names):
|
|
|
315
332
|
|
|
316
333
|
...
|
|
317
334
|
|
|
318
|
-
def register_tool(
|
|
335
|
+
def register_tool(
|
|
336
|
+
tool_cls,
|
|
337
|
+
after=None,
|
|
338
|
+
separator: typing.Optional[bool] = False,
|
|
339
|
+
group: typing.Optional[bool] = False,
|
|
340
|
+
):
|
|
319
341
|
"""Register a tool in the toolbar.
|
|
320
342
|
|
|
321
343
|
:param after: Optional identifiers this tool will be added after.
|
|
322
344
|
:param separator: When true, add a separator before this tool.
|
|
323
|
-
:type separator: bool
|
|
345
|
+
:type separator: typing.Optional[bool]
|
|
324
346
|
:param group: When true, add a new nested group of tools.
|
|
325
|
-
:type group: bool
|
|
347
|
+
:type group: typing.Optional[bool]
|
|
326
348
|
"""
|
|
327
349
|
|
|
328
350
|
...
|
|
@@ -332,15 +354,19 @@ def register_tool(tool_cls, after, separator, group):
|
|
|
332
354
|
|
|
333
355
|
...
|
|
334
356
|
|
|
335
|
-
def resource_path(
|
|
357
|
+
def resource_path(
|
|
358
|
+
type: typing.Optional[str],
|
|
359
|
+
major: typing.Optional[int] = None[0],
|
|
360
|
+
minor: typing.Optional[str] = None[1],
|
|
361
|
+
) -> str:
|
|
336
362
|
"""Return the base path for storing system files.
|
|
337
363
|
|
|
338
364
|
:param type: string in ['USER', 'LOCAL', 'SYSTEM'].
|
|
339
|
-
:type type: str
|
|
365
|
+
:type type: typing.Optional[str]
|
|
340
366
|
:param major: major version, defaults to current.
|
|
341
|
-
:type major: int
|
|
367
|
+
:type major: typing.Optional[int]
|
|
342
368
|
:param minor: minor version, defaults to current.
|
|
343
|
-
:type minor: str
|
|
369
|
+
:type minor: typing.Optional[str]
|
|
344
370
|
:return: the resource path (not necessarily existing).
|
|
345
371
|
:rtype: str
|
|
346
372
|
"""
|
|
@@ -358,16 +384,19 @@ def script_path_user():
|
|
|
358
384
|
...
|
|
359
385
|
|
|
360
386
|
def script_paths(
|
|
361
|
-
subdir: str = None,
|
|
387
|
+
subdir: typing.Optional[str] = None,
|
|
388
|
+
user_pref: typing.Optional[bool] = True,
|
|
389
|
+
check_all: typing.Optional[bool] = False,
|
|
390
|
+
use_user=True,
|
|
362
391
|
) -> list:
|
|
363
392
|
"""Returns a list of valid script paths.
|
|
364
393
|
|
|
365
394
|
:param subdir: Optional subdir.
|
|
366
|
-
:type subdir: str
|
|
395
|
+
:type subdir: typing.Optional[str]
|
|
367
396
|
:param user_pref: Include the user preference script paths.
|
|
368
|
-
:type user_pref: bool
|
|
397
|
+
:type user_pref: typing.Optional[bool]
|
|
369
398
|
:param check_all: Include local, user and system paths rather just the paths Blender uses.
|
|
370
|
-
:type check_all: bool
|
|
399
|
+
:type check_all: typing.Optional[bool]
|
|
371
400
|
:return: script paths.
|
|
372
401
|
:rtype: list
|
|
373
402
|
"""
|
|
@@ -384,12 +413,12 @@ def script_paths_pref():
|
|
|
384
413
|
|
|
385
414
|
...
|
|
386
415
|
|
|
387
|
-
def smpte_from_frame(frame: int, fps=None, fps_base=None) -> str:
|
|
416
|
+
def smpte_from_frame(frame: typing.Optional[int], fps=None, fps_base=None) -> str:
|
|
388
417
|
"""Returns an SMPTE formatted string from the frame:
|
|
389
418
|
HH:MM:SS:FF.If fps and fps_base are not given the current scene is used.
|
|
390
419
|
|
|
391
420
|
:param frame: frame number.
|
|
392
|
-
:type frame: int
|
|
421
|
+
:type frame: typing.Optional[int]
|
|
393
422
|
:return: the frame string.
|
|
394
423
|
:rtype: str
|
|
395
424
|
"""
|
|
@@ -401,12 +430,14 @@ def smpte_from_frame(frame, fps, fps_base):
|
|
|
401
430
|
|
|
402
431
|
...
|
|
403
432
|
|
|
404
|
-
def smpte_from_seconds(
|
|
433
|
+
def smpte_from_seconds(
|
|
434
|
+
time: typing.Optional[typing.Union[int, float]], fps=None, fps_base=None
|
|
435
|
+
) -> str:
|
|
405
436
|
"""Returns an SMPTE formatted string from the time:
|
|
406
437
|
HH:MM:SS:FF.If fps and fps_base are not given the current scene is used.
|
|
407
438
|
|
|
408
439
|
:param time: time in seconds.
|
|
409
|
-
:type time: typing.Union[int, float]
|
|
440
|
+
:type time: typing.Optional[typing.Union[int, float]]
|
|
410
441
|
:return: the frame string.
|
|
411
442
|
:rtype: str
|
|
412
443
|
"""
|
|
@@ -428,12 +459,12 @@ def time_to_frame(time, fps, fps_base):
|
|
|
428
459
|
|
|
429
460
|
...
|
|
430
461
|
|
|
431
|
-
def unescape_identifier(string: str) -> str:
|
|
462
|
+
def unescape_identifier(string: typing.Optional[str]) -> str:
|
|
432
463
|
"""Simple string un-escape function used for animation paths.
|
|
433
464
|
This performs the reverse of escape_identifier.
|
|
434
465
|
|
|
435
466
|
:param string: text
|
|
436
|
-
:type string: str
|
|
467
|
+
:type string: typing.Optional[str]
|
|
437
468
|
:return: The un-escaped string.
|
|
438
469
|
:rtype: str
|
|
439
470
|
"""
|
|
@@ -478,14 +509,18 @@ def unregister_tool(tool_cls):
|
|
|
478
509
|
|
|
479
510
|
...
|
|
480
511
|
|
|
481
|
-
def user_resource(
|
|
512
|
+
def user_resource(
|
|
513
|
+
resource_type,
|
|
514
|
+
path: typing.Optional[str] = "",
|
|
515
|
+
create: typing.Optional[bool] = False,
|
|
516
|
+
) -> str:
|
|
482
517
|
"""Return a user resource path (normally from the users home directory).
|
|
483
518
|
|
|
484
519
|
:param path: Optional subdirectory.
|
|
485
|
-
:type path: str
|
|
520
|
+
:type path: typing.Optional[str]
|
|
486
521
|
:param create: Treat the path as a directory and create
|
|
487
522
|
it if its not existing.
|
|
488
|
-
:type create: bool
|
|
523
|
+
:type create: typing.Optional[bool]
|
|
489
524
|
:return: a path.
|
|
490
525
|
:rtype: str
|
|
491
526
|
"""
|
bpy/utils/previews/__init__.pyi
CHANGED
|
@@ -108,11 +108,11 @@ def new():
|
|
|
108
108
|
|
|
109
109
|
...
|
|
110
110
|
|
|
111
|
-
def remove(pcoll: ImagePreviewCollection):
|
|
111
|
+
def remove(pcoll: typing.Optional[ImagePreviewCollection]):
|
|
112
112
|
"""Remove the specified previews collection.
|
|
113
113
|
|
|
114
114
|
:param pcoll: Preview collection to close.
|
|
115
|
-
:type pcoll: ImagePreviewCollection
|
|
115
|
+
:type pcoll: typing.Optional[ImagePreviewCollection]
|
|
116
116
|
"""
|
|
117
117
|
|
|
118
118
|
...
|
bpy/utils/units/__init__.pyi
CHANGED
|
@@ -8,28 +8,28 @@ import typing
|
|
|
8
8
|
GenericType = typing.TypeVar("GenericType")
|
|
9
9
|
|
|
10
10
|
def to_string(
|
|
11
|
-
unit_system: str,
|
|
12
|
-
unit_category: str,
|
|
13
|
-
value: float,
|
|
14
|
-
precision: int = 3,
|
|
15
|
-
split_unit: bool = False,
|
|
16
|
-
compatible_unit: bool = False,
|
|
11
|
+
unit_system: typing.Optional[str],
|
|
12
|
+
unit_category: typing.Optional[str],
|
|
13
|
+
value: typing.Optional[float],
|
|
14
|
+
precision: typing.Optional[int] = 3,
|
|
15
|
+
split_unit: typing.Optional[bool] = False,
|
|
16
|
+
compatible_unit: typing.Optional[bool] = False,
|
|
17
17
|
) -> str:
|
|
18
18
|
"""Convert a given input float value into a string with units.
|
|
19
19
|
|
|
20
20
|
:param unit_system: The unit system, from `bpy.utils.units.systems`.
|
|
21
|
-
:type unit_system: str
|
|
21
|
+
:type unit_system: typing.Optional[str]
|
|
22
22
|
:param unit_category: The category of data we are converting (length, area, rotation, etc.),
|
|
23
23
|
from `bpy.utils.units.categories`.
|
|
24
|
-
:type unit_category: str
|
|
24
|
+
:type unit_category: typing.Optional[str]
|
|
25
25
|
:param value: The value to convert to a string.
|
|
26
|
-
:type value: float
|
|
26
|
+
:type value: typing.Optional[float]
|
|
27
27
|
:param precision: Number of digits after the comma.
|
|
28
|
-
:type precision: int
|
|
28
|
+
:type precision: typing.Optional[int]
|
|
29
29
|
:param split_unit: Whether to use several units if needed (1m1cm), or always only one (1.01m).
|
|
30
|
-
:type split_unit: bool
|
|
30
|
+
:type split_unit: typing.Optional[bool]
|
|
31
31
|
:param compatible_unit: Whether to use keyboard-friendly units (1m2) or nicer utf-8 ones (1m²).
|
|
32
|
-
:type compatible_unit: bool
|
|
32
|
+
:type compatible_unit: typing.Optional[bool]
|
|
33
33
|
:return: The converted string.
|
|
34
34
|
:rtype: str
|
|
35
35
|
"""
|
|
@@ -37,19 +37,22 @@ def to_string(
|
|
|
37
37
|
...
|
|
38
38
|
|
|
39
39
|
def to_value(
|
|
40
|
-
unit_system: str,
|
|
40
|
+
unit_system: typing.Optional[str],
|
|
41
|
+
unit_category: typing.Optional[str],
|
|
42
|
+
str_input: typing.Optional[str],
|
|
43
|
+
str_ref_unit: typing.Optional[str] = None,
|
|
41
44
|
) -> float:
|
|
42
45
|
"""Convert a given input string into a float value.
|
|
43
46
|
|
|
44
47
|
:param unit_system: The unit system, from `bpy.utils.units.systems`.
|
|
45
|
-
:type unit_system: str
|
|
48
|
+
:type unit_system: typing.Optional[str]
|
|
46
49
|
:param unit_category: The category of data we are converting (length, area, rotation, etc.),
|
|
47
50
|
from `bpy.utils.units.categories`.
|
|
48
|
-
:type unit_category: str
|
|
51
|
+
:type unit_category: typing.Optional[str]
|
|
49
52
|
:param str_input: The string to convert to a float value.
|
|
50
|
-
:type str_input: str
|
|
53
|
+
:type str_input: typing.Optional[str]
|
|
51
54
|
:param str_ref_unit: A reference string from which to extract a default unit, if none is found in str_input.
|
|
52
|
-
:type str_ref_unit: str
|
|
55
|
+
:type str_ref_unit: typing.Optional[str]
|
|
53
56
|
:return: The converted/interpreted value.
|
|
54
57
|
:rtype: float
|
|
55
58
|
"""
|
|
@@ -57,7 +60,7 @@ def to_value(
|
|
|
57
60
|
...
|
|
58
61
|
|
|
59
62
|
categories: typing.Any
|
|
60
|
-
""" Constant value bpy.utils.units.categories(NONE='NONE', LENGTH='LENGTH', AREA='AREA', VOLUME='VOLUME', MASS='MASS', ROTATION='ROTATION', TIME='TIME', TIME_ABSOLUTE='TIME_ABSOLUTE', VELOCITY='VELOCITY', ACCELERATION='ACCELERATION', CAMERA='CAMERA', POWER='POWER', TEMPERATURE='TEMPERATURE')
|
|
63
|
+
""" Constant value bpy.utils.units.categories(NONE='NONE', LENGTH='LENGTH', AREA='AREA', VOLUME='VOLUME', MASS='MASS', ROTATION='ROTATION', TIME='TIME', TIME_ABSOLUTE='TIME_ABSOLUTE', VELOCITY='VELOCITY', ACCELERATION='ACCELERATION', CAMERA='CAMERA', POWER='POWER', TEMPERATURE='TEMPERATURE', WAVELENGTH='WAVELENGTH')
|
|
61
64
|
"""
|
|
62
65
|
|
|
63
66
|
systems: typing.Any
|
|
@@ -4,7 +4,10 @@ import bpy.types
|
|
|
4
4
|
GenericType = typing.TypeVar("GenericType")
|
|
5
5
|
|
|
6
6
|
def bake_action(
|
|
7
|
-
obj: bpy.types.Object,
|
|
7
|
+
obj: bpy.types.Object,
|
|
8
|
+
action: typing.Optional[bpy.types.Action],
|
|
9
|
+
frames,
|
|
10
|
+
bake_options,
|
|
8
11
|
) -> bpy.types.Action:
|
|
9
12
|
"""
|
|
10
13
|
|
|
@@ -12,6 +15,7 @@ def bake_action(
|
|
|
12
15
|
:type obj: bpy.types.Object
|
|
13
16
|
:param action: An action to bake the data into, or None for a new action
|
|
14
17
|
to be created.
|
|
18
|
+
:type action: typing.Optional[bpy.types.Action]
|
|
15
19
|
:param frames: Frames to bake.
|
|
16
20
|
:return: an action or None
|
|
17
21
|
:rtype: bpy.types.Action
|
|
@@ -19,13 +23,16 @@ def bake_action(
|
|
|
19
23
|
|
|
20
24
|
...
|
|
21
25
|
|
|
22
|
-
def bake_action_iter(
|
|
26
|
+
def bake_action_iter(
|
|
27
|
+
obj: bpy.types.Object, action: typing.Optional[bpy.types.Action], bake_options
|
|
28
|
+
) -> bpy.types.Action:
|
|
23
29
|
"""An coroutine that bakes action for a single object.
|
|
24
30
|
|
|
25
31
|
:param obj: Object to bake.
|
|
26
32
|
:type obj: bpy.types.Object
|
|
27
33
|
:param action: An action to bake the data into, or None for a new action
|
|
28
34
|
to be created.
|
|
35
|
+
:type action: typing.Optional[bpy.types.Action]
|
|
29
36
|
:param bake_options: Boolean options of what to include into the action bake.
|
|
30
37
|
:return: an action or None
|
|
31
38
|
:rtype: bpy.types.Action
|
bpy_extras/io_utils/__init__.pyi
CHANGED
|
@@ -104,7 +104,7 @@ def path_reference(
|
|
|
104
104
|
mode: str = "AUTO",
|
|
105
105
|
copy_subdir: str = "",
|
|
106
106
|
copy_set: set = None,
|
|
107
|
-
library=None,
|
|
107
|
+
library: typing.Optional[bpy.types.Library] = None,
|
|
108
108
|
) -> str:
|
|
109
109
|
"""Return a filepath relative to a destination directory, for use with
|
|
110
110
|
exporters.
|
|
@@ -127,6 +127,7 @@ def path_reference(
|
|
|
127
127
|
pass to path_reference_copy when exporting is done.
|
|
128
128
|
:type copy_set: set
|
|
129
129
|
:param library: The library this path is relative to.
|
|
130
|
+
:type library: typing.Optional[bpy.types.Library]
|
|
130
131
|
:return: the new filepath.
|
|
131
132
|
:rtype: str
|
|
132
133
|
"""
|
|
@@ -55,7 +55,7 @@ def region_2d_to_origin_3d(
|
|
|
55
55
|
region: bpy.types.Region,
|
|
56
56
|
rv3d: bpy.types.RegionView3D,
|
|
57
57
|
coord: mathutils.Vector,
|
|
58
|
-
clamp=None,
|
|
58
|
+
clamp: typing.Optional[float] = None,
|
|
59
59
|
) -> mathutils.Vector:
|
|
60
60
|
"""Return the 3d view origin from the region relative 2d coords.
|
|
61
61
|
|
|
@@ -68,6 +68,7 @@ def region_2d_to_origin_3d(
|
|
|
68
68
|
:type coord: mathutils.Vector
|
|
69
69
|
:param clamp: Clamp the maximum far-clip value used.
|
|
70
70
|
(negative value will move the offset away from the view_location)
|
|
71
|
+
:type clamp: typing.Optional[float]
|
|
71
72
|
:return: The origin of the viewpoint in 3d space.
|
|
72
73
|
:rtype: mathutils.Vector
|
|
73
74
|
"""
|