fake-bpy-module 20240321__py3-none-any.whl → 20240322__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fake-bpy-module might be problematic. Click here for more details.
- addon_utils/__init__.pyi +54 -10
- animsys_refactor/__init__.pyi +27 -11
- aud/__init__.pyi +130 -123
- bgl/__init__.pyi +1831 -216
- bl_app_override/__init__.pyi +14 -3
- bl_app_override/helpers/__init__.pyi +19 -10
- bl_app_template_utils/__init__.pyi +19 -4
- bl_console_utils/autocomplete/complete_calltip/__init__.pyi +24 -5
- bl_console_utils/autocomplete/complete_import/__init__.pyi +14 -3
- bl_console_utils/autocomplete/complete_namespace/__init__.pyi +24 -5
- bl_console_utils/autocomplete/intellisense/__init__.pyi +9 -2
- bl_i18n_utils/bl_extract_messages/__init__.pyi +74 -15
- bl_i18n_utils/merge_po/__init__.pyi +4 -1
- bl_i18n_utils/settings/__init__.pyi +19 -23
- bl_i18n_utils/utils/__init__.pyi +81 -143
- bl_i18n_utils/utils_cli/__init__.pyi +29 -6
- bl_i18n_utils/utils_languages_menu/__init__.pyi +4 -1
- bl_i18n_utils/utils_rtl/__init__.pyi +9 -2
- bl_keymap_utils/io/__init__.pyi +44 -9
- bl_keymap_utils/keymap_from_toolbar/__init__.pyi +4 -1
- bl_keymap_utils/keymap_hierarchy/__init__.pyi +4 -1
- bl_keymap_utils/platform_helpers/__init__.pyi +9 -2
- bl_keymap_utils/versioning/__init__.pyi +4 -1
- bl_math/__init__.pyi +3 -3
- bl_operators/__init__.pyi +9 -2
- bl_operators/add_mesh_torus/__init__.pyi +120 -49
- bl_operators/anim/__init__.pyi +903 -297
- bl_operators/assets/__init__.pyi +348 -123
- bl_operators/bmesh/find_adjacent/__init__.pyi +44 -9
- bl_operators/clip/__init__.pyi +1262 -470
- bl_operators/console/__init__.pyi +542 -160
- bl_operators/constraint/__init__.pyi +452 -140
- bl_operators/file/__init__.pyi +339 -114
- bl_operators/freestyle/__init__.pyi +440 -132
- bl_operators/geometry_nodes/__init__.pyi +2131 -842
- bl_operators/image/__init__.pyi +330 -97
- bl_operators/mesh/__init__.pyi +339 -109
- bl_operators/node/__init__.pyi +1506 -621
- bl_operators/object/__init__.pyi +1828 -668
- bl_operators/object_align/__init__.pyi +124 -35
- bl_operators/object_quick_effects/__init__.pyi +470 -149
- bl_operators/object_randomize_transform/__init__.pyi +114 -35
- bl_operators/presets/__init__.pyi +3056 -1374
- bl_operators/rigidbody/__init__.pyi +336 -106
- bl_operators/screen_play_rendered_anim/__init__.pyi +115 -33
- bl_operators/sequencer/__init__.pyi +579 -204
- bl_operators/spreadsheet/__init__.pyi +110 -38
- bl_operators/userpref/__init__.pyi +3201 -1236
- bl_operators/uvcalc_follow_active/__init__.pyi +119 -38
- bl_operators/uvcalc_lightmap/__init__.pyi +137 -54
- bl_operators/uvcalc_transform/__init__.pyi +295 -83
- bl_operators/vertexpaint_dirt/__init__.pyi +119 -34
- bl_operators/view3d/__init__.pyi +542 -184
- bl_operators/wm/__init__.pyi +5554 -2159
- bl_previews_utils/bl_previews_render/__init__.pyi +34 -7
- bl_rna_utils/data_path/__init__.pyi +12 -2
- bl_text_utils/external_editor/__init__.pyi +4 -1
- bl_ui/__init__.pyi +346 -146
- bl_ui/anim/__init__.pyi +107 -47
- bl_ui/asset_shelf/__init__.pyi +111 -33
- bl_ui/generic_ui_list/__init__.pyi +349 -146
- bl_ui/node_add_menu/__init__.pyi +138 -53
- bl_ui/node_add_menu_compositor/__init__.pyi +2134 -1016
- bl_ui/node_add_menu_geometry/__init__.pyi +5833 -2855
- bl_ui/node_add_menu_shader/__init__.pyi +1162 -511
- bl_ui/node_add_menu_texture/__init__.pyi +1008 -450
- bl_ui/properties_animviz/__init__.pyi +14 -12
- bl_ui/properties_collection/__init__.pyi +601 -218
- bl_ui/properties_constraint/__init__.pyi +10115 -10647
- bl_ui/properties_data_armature/__init__.pyi +1550 -648
- bl_ui/properties_data_bone/__init__.pyi +1317 -511
- bl_ui/properties_data_camera/__init__.pyi +1852 -719
- bl_ui/properties_data_curve/__init__.pyi +2015 -781
- bl_ui/properties_data_curves/__init__.pyi +713 -262
- bl_ui/properties_data_empty/__init__.pyi +252 -84
- bl_ui/properties_data_gpencil/__init__.pyi +2505 -1105
- bl_ui/properties_data_grease_pencil/__init__.pyi +1350 -594
- bl_ui/properties_data_lattice/__init__.pyi +374 -123
- bl_ui/properties_data_light/__init__.pyi +1319 -489
- bl_ui/properties_data_lightprobe/__init__.pyi +734 -241
- bl_ui/properties_data_mesh/__init__.pyi +2652 -1189
- bl_ui/properties_data_metaball/__init__.pyi +610 -197
- bl_ui/properties_data_modifier/__init__.pyi +1143 -506
- bl_ui/properties_data_pointcloud/__init__.pyi +670 -303
- bl_ui/properties_data_shaderfx/__init__.pyi +126 -36
- bl_ui/properties_data_speaker/__init__.pyi +618 -195
- bl_ui/properties_data_volume/__init__.pyi +1052 -408
- bl_ui/properties_freestyle/__init__.pyi +3366 -1450
- bl_ui/properties_grease_pencil_common/__init__.pyi +1634 -776
- bl_ui/properties_mask_common/__init__.pyi +803 -371
- bl_ui/properties_material/__init__.pyi +2038 -831
- bl_ui/properties_material_gpencil/__init__.pyi +1272 -523
- bl_ui/properties_object/__init__.pyi +1863 -745
- bl_ui/properties_output/__init__.pyi +2482 -1071
- bl_ui/properties_paint_common/__init__.pyi +317 -424
- bl_ui/properties_particle/__init__.pyi +7235 -2942
- bl_ui/properties_physics_cloth/__init__.pyi +1903 -758
- bl_ui/properties_physics_common/__init__.pyi +164 -51
- bl_ui/properties_physics_dynamicpaint/__init__.pyi +2787 -1114
- bl_ui/properties_physics_field/__init__.pyi +1294 -486
- bl_ui/properties_physics_fluid/__init__.pyi +3631 -1545
- bl_ui/properties_physics_geometry_nodes/__init__.pyi +115 -34
- bl_ui/properties_physics_rigidbody/__init__.pyi +983 -312
- bl_ui/properties_physics_rigidbody_constraint/__init__.pyi +1718 -656
- bl_ui/properties_physics_softbody/__init__.pyi +2091 -836
- bl_ui/properties_render/__init__.pyi +7177 -2939
- bl_ui/properties_scene/__init__.pyi +1881 -760
- bl_ui/properties_texture/__init__.pyi +3539 -1399
- bl_ui/properties_view_layer/__init__.pyi +2368 -940
- bl_ui/properties_workspace/__init__.pyi +517 -202
- bl_ui/properties_world/__init__.pyi +862 -269
- bl_ui/space_clip/__init__.pyi +9127 -4137
- bl_ui/space_console/__init__.pyi +666 -286
- bl_ui/space_dopesheet/__init__.pyi +3287 -1504
- bl_ui/space_filebrowser/__init__.pyi +3958 -1935
- bl_ui/space_graph/__init__.pyi +2406 -1142
- bl_ui/space_image/__init__.pyi +9242 -4526
- bl_ui/space_info/__init__.pyi +664 -285
- bl_ui/space_nla/__init__.pyi +2014 -932
- bl_ui/space_node/__init__.pyi +4549 -1949
- bl_ui/space_outliner/__init__.pyi +1619 -745
- bl_ui/space_properties/__init__.pyi +340 -105
- bl_ui/space_sequencer/__init__.pyi +9396 -4264
- bl_ui/space_spreadsheet/__init__.pyi +110 -60
- bl_ui/space_statusbar/__init__.pyi +107 -32
- bl_ui/space_text/__init__.pyi +1907 -872
- bl_ui/space_time/__init__.pyi +812 -327
- bl_ui/space_toolsystem_common/__init__.pyi +203 -99
- bl_ui/space_toolsystem_toolbar/__init__.pyi +845 -289
- bl_ui/space_topbar/__init__.pyi +3131 -1437
- bl_ui/space_userpref/__init__.pyi +11510 -4926
- bl_ui/space_view3d/__init__.pyi +31358 -14417
- bl_ui/space_view3d_toolbar/__init__.pyi +12401 -6163
- bl_ui/utils/__init__.pyi +7 -16
- bl_ui_utils/bug_report_url/__init__.pyi +4 -1
- bl_ui_utils/layout/__init__.pyi +4 -1
- blend_render_info/__init__.pyi +13 -3
- blf/__init__.pyi +5 -7
- bmesh/__init__.pyi +7 -7
- bmesh/geometry/__init__.pyi +5 -5
- bmesh/ops/__init__.pyi +490 -504
- bmesh/types/__init__.pyi +253 -247
- bmesh/utils/__init__.pyi +54 -54
- bpy/__init__.pyi +2 -2
- bpy/app/__init__.pyi +4 -5
- bpy/app/handlers/__init__.pyi +36 -36
- bpy/app/icons/__init__.pyi +8 -10
- bpy/app/timers/__init__.pyi +9 -11
- bpy/app/translations/__init__.pyi +20 -22
- bpy/msgbus/__init__.pyi +3 -12
- bpy/ops/action/__init__.pyi +316 -415
- bpy/ops/anim/__init__.pyi +428 -566
- bpy/ops/armature/__init__.pyi +360 -488
- bpy/ops/asset/__init__.pyi +146 -183
- bpy/ops/boid/__init__.pyi +50 -67
- bpy/ops/brush/__init__.pyi +72 -96
- bpy/ops/buttons/__init__.pyi +128 -142
- bpy/ops/cachefile/__init__.pyi +124 -137
- bpy/ops/camera/__init__.pyi +22 -28
- bpy/ops/clip/__init__.pyi +768 -1005
- bpy/ops/cloth/__init__.pyi +10 -13
- bpy/ops/collection/__init__.pyi +36 -50
- bpy/ops/console/__init__.pyi +150 -203
- bpy/ops/constraint/__init__.pyi +150 -201
- bpy/ops/curve/__init__.pyi +474 -607
- bpy/ops/curves/__init__.pyi +170 -221
- bpy/ops/cycles/__init__.pyi +18 -26
- bpy/ops/dpaint/__init__.pyi +34 -46
- bpy/ops/ed/__init__.pyi +122 -149
- bpy/ops/export_anim/__init__.pyi +18 -21
- bpy/ops/export_mesh/__init__.pyi +26 -29
- bpy/ops/export_scene/__init__.pyi +307 -342
- bpy/ops/file/__init__.pyi +342 -436
- bpy/ops/fluid/__init__.pyi +88 -117
- bpy/ops/font/__init__.pyi +252 -311
- bpy/ops/geometry/__init__.pyi +86 -113
- bpy/ops/gizmogroup/__init__.pyi +22 -27
- bpy/ops/gpencil/__init__.pyi +1444 -1864
- bpy/ops/graph/__init__.pyi +642 -822
- bpy/ops/grease_pencil/__init__.pyi +426 -576
- bpy/ops/image/__init__.pyi +612 -733
- bpy/ops/import_anim/__init__.pyi +26 -29
- bpy/ops/import_curve/__init__.pyi +6 -9
- bpy/ops/import_mesh/__init__.pyi +18 -23
- bpy/ops/import_scene/__init__.pyi +86 -101
- bpy/ops/info/__init__.pyi +60 -77
- bpy/ops/lattice/__init__.pyi +64 -85
- bpy/ops/marker/__init__.pyi +106 -137
- bpy/ops/mask/__init__.pyi +318 -420
- bpy/ops/material/__init__.pyi +18 -24
- bpy/ops/mball/__init__.pyi +70 -93
- bpy/ops/mesh/__init__.pyi +1988 -2460
- bpy/ops/nla/__init__.pyi +330 -428
- bpy/ops/node/__init__.pyi +852 -1115
- bpy/ops/object/__init__.pyi +2420 -3081
- bpy/ops/outliner/__init__.pyi +498 -661
- bpy/ops/paint/__init__.pyi +518 -667
- bpy/ops/paintcurve/__init__.pyi +64 -84
- bpy/ops/palette/__init__.pyi +48 -66
- bpy/ops/particle/__init__.pyi +264 -355
- bpy/ops/pose/__init__.pyi +336 -438
- bpy/ops/poselib/__init__.pyi +70 -92
- bpy/ops/preferences/__init__.pyi +336 -440
- bpy/ops/ptcache/__init__.pyi +46 -62
- bpy/ops/render/__init__.pyi +114 -147
- bpy/ops/rigidbody/__init__.pyi +102 -135
- bpy/ops/scene/__init__.pyi +270 -364
- bpy/ops/screen/__init__.pyi +378 -477
- bpy/ops/script/__init__.pyi +18 -26
- bpy/ops/sculpt/__init__.pyi +400 -488
- bpy/ops/sculpt_curves/__init__.pyi +40 -53
- bpy/ops/sequencer/__init__.pyi +1040 -1279
- bpy/ops/sound/__init__.pyi +208 -226
- bpy/ops/spreadsheet/__init__.pyi +30 -40
- bpy/ops/surface/__init__.pyi +108 -126
- bpy/ops/text/__init__.pyi +382 -486
- bpy/ops/text_editor/__init__.pyi +10 -13
- bpy/ops/texture/__init__.pyi +26 -35
- bpy/ops/transform/__init__.pyi +790 -905
- bpy/ops/ui/__init__.pyi +216 -291
- bpy/ops/uilist/__init__.pyi +20 -29
- bpy/ops/uv/__init__.pyi +600 -742
- bpy/ops/view2d/__init__.pyi +156 -195
- bpy/ops/view3d/__init__.pyi +576 -742
- bpy/ops/wm/__init__.pyi +2360 -2702
- bpy/ops/workspace/__init__.pyi +42 -57
- bpy/ops/world/__init__.pyi +6 -8
- bpy/path/__init__.pyi +110 -81
- bpy/props/__init__.pyi +263 -267
- bpy/types/__init__.pyi +86353 -87337
- bpy/utils/__init__.pyi +242 -154
- bpy/utils/previews/__init__.pyi +57 -57
- bpy/utils/units/__init__.pyi +19 -22
- bpy_extras/anim_utils/__init__.pyi +11 -31
- bpy_extras/asset_utils/__init__.pyi +4 -1
- bpy_extras/image_utils/__init__.pyi +2 -2
- bpy_extras/io_utils/__init__.pyi +30 -27
- bpy_extras/keyconfig_utils/__init__.pyi +4 -1
- bpy_extras/mesh_utils/__init__.pyi +18 -18
- bpy_extras/node_utils/__init__.pyi +4 -1
- bpy_extras/object_utils/__init__.pyi +25 -26
- bpy_extras/view3d_utils/__init__.pyi +33 -38
- bpy_restrict_state/__init__.pyi +14 -1
- bpy_types/__init__.pyi +3748 -1248
- console_python/__init__.pyi +41 -7
- console_shell/__init__.pyi +24 -5
- {fake_bpy_module-20240321.dist-info → fake_bpy_module-20240322.dist-info}/METADATA +1 -1
- fake_bpy_module-20240322.dist-info/RECORD +343 -0
- freestyle/chainingiterators/__init__.pyi +50 -52
- freestyle/functions/__init__.pyi +303 -207
- freestyle/predicates/__init__.pyi +299 -115
- freestyle/shaders/__init__.pyi +49 -80
- freestyle/types/__init__.pyi +463 -470
- freestyle/utils/ContextFunctions/__init__.pyi +9 -9
- freestyle/utils/__init__.pyi +27 -17
- gpu/capabilities/__init__.pyi +19 -20
- gpu/matrix/__init__.pyi +14 -16
- gpu/platform/__init__.pyi +5 -5
- gpu/shader/__init__.pyi +2 -5
- gpu/state/__init__.pyi +1 -1
- gpu/texture/__init__.pyi +3 -3
- gpu/types/__init__.pyi +54 -85
- gpu_extras/batch/__init__.pyi +26 -6
- gpu_extras/presets/__init__.pyi +51 -16
- graphviz_export/__init__.pyi +9 -2
- idprop/types/__init__.pyi +36 -12
- imbuf/__init__.pyi +8 -9
- imbuf/types/__init__.pyi +8 -15
- keyingsets_builtins/__init__.pyi +2520 -1085
- keyingsets_utils/__init__.pyi +69 -14
- mathutils/__init__.pyi +491 -423
- mathutils/bvhtree/__init__.pyi +26 -31
- mathutils/geometry/__init__.pyi +176 -185
- mathutils/kdtree/__init__.pyi +14 -17
- mathutils/noise/__init__.pyi +47 -48
- nodeitems_builtins/__init__.pyi +37 -15
- nodeitems_utils/__init__.pyi +45 -13
- rna_info/__init__.pyi +177 -76
- rna_keymap_ui/__init__.pyi +29 -6
- rna_prop_ui/__init__.pyi +56 -14
- rna_xml/__init__.pyi +29 -6
- sys_info/__init__.pyi +4 -1
- fake_bpy_module-20240321.dist-info/RECORD +0 -343
- {fake_bpy_module-20240321.dist-info → fake_bpy_module-20240322.dist-info}/WHEEL +0 -0
- {fake_bpy_module-20240321.dist-info → fake_bpy_module-20240322.dist-info}/top_level.txt +0 -0
bpy/utils/__init__.pyi
CHANGED
|
@@ -4,121 +4,140 @@ from . import units
|
|
|
4
4
|
|
|
5
5
|
GenericType = typing.TypeVar("GenericType")
|
|
6
6
|
|
|
7
|
-
def app_template_paths(
|
|
7
|
+
def app_template_paths(path: str = None):
|
|
8
8
|
"""Returns valid application template paths.
|
|
9
9
|
|
|
10
10
|
:param path: Optional subdir.
|
|
11
|
-
:type path:
|
|
12
|
-
:rtype: typing.Any
|
|
11
|
+
:type path: str
|
|
13
12
|
:return: app template paths.
|
|
14
13
|
"""
|
|
15
14
|
|
|
16
15
|
...
|
|
17
16
|
|
|
18
|
-
def app_template_paths(path):
|
|
17
|
+
def app_template_paths(path):
|
|
18
|
+
""" """
|
|
19
|
+
|
|
20
|
+
...
|
|
21
|
+
|
|
19
22
|
def blend_paths(
|
|
20
|
-
absolute:
|
|
21
|
-
packed: typing.Optional[bool] = False,
|
|
22
|
-
local: typing.Optional[bool] = False,
|
|
23
|
+
absolute: bool = False, packed: bool = False, local: bool = False
|
|
23
24
|
) -> typing.List[str]:
|
|
24
25
|
"""Returns a list of paths to external files referenced by the loaded .blend file.
|
|
25
26
|
|
|
26
27
|
:param absolute: When true the paths returned are made absolute.
|
|
27
|
-
:type absolute:
|
|
28
|
+
:type absolute: bool
|
|
28
29
|
:param packed: When true skip file paths for packed data.
|
|
29
|
-
:type packed:
|
|
30
|
+
:type packed: bool
|
|
30
31
|
:param local: When true skip linked library paths.
|
|
31
|
-
:type local:
|
|
32
|
-
:rtype: typing.List[str]
|
|
32
|
+
:type local: bool
|
|
33
33
|
:return: path list.
|
|
34
|
+
:rtype: typing.List[str]
|
|
34
35
|
"""
|
|
35
36
|
|
|
36
37
|
...
|
|
37
38
|
|
|
38
|
-
def escape_identifier(string:
|
|
39
|
+
def escape_identifier(string: str) -> str:
|
|
39
40
|
"""Simple string escaping function used for animation paths.
|
|
40
41
|
|
|
41
42
|
:param string: text
|
|
42
|
-
:type string:
|
|
43
|
-
:rtype: str
|
|
43
|
+
:type string: str
|
|
44
44
|
:return: The escaped string.
|
|
45
|
+
:rtype: str
|
|
45
46
|
"""
|
|
46
47
|
|
|
47
48
|
...
|
|
48
49
|
|
|
49
|
-
def execfile(
|
|
50
|
-
filepath: typing.Optional[str], *, mod: typing.Optional[typing.Any] = None
|
|
51
|
-
) -> typing.Any:
|
|
50
|
+
def execfile(filepath: str, mod=None):
|
|
52
51
|
"""Execute a file path as a Python script.
|
|
53
52
|
|
|
54
53
|
:param filepath: Path of the script to execute.
|
|
55
|
-
:type filepath:
|
|
54
|
+
:type filepath: str
|
|
56
55
|
:param mod: Optional cached module, the result of a previous execution.
|
|
57
|
-
:type mod: typing.Optional[typing.Any]
|
|
58
|
-
:rtype: typing.Any
|
|
59
56
|
:return: The module which can be passed back in as mod.
|
|
60
57
|
"""
|
|
61
58
|
|
|
62
59
|
...
|
|
63
60
|
|
|
64
|
-
def execfile(filepath, mod):
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
def execfile(filepath, mod):
|
|
62
|
+
""" """
|
|
63
|
+
|
|
64
|
+
...
|
|
65
|
+
|
|
66
|
+
def flip_name(name: str, strip_digits: bool = False) -> str:
|
|
68
67
|
"""Flip a name between left/right sides, useful for
|
|
69
68
|
mirroring bone names.
|
|
70
69
|
|
|
71
70
|
:param name: Bone name to flip.
|
|
72
|
-
:type name:
|
|
71
|
+
:type name: str
|
|
73
72
|
:param strip_digits: Whether to remove .### suffix.
|
|
74
|
-
:type strip_digits:
|
|
75
|
-
:rtype: str
|
|
73
|
+
:type strip_digits: bool
|
|
76
74
|
:return: The flipped name.
|
|
75
|
+
:rtype: str
|
|
77
76
|
"""
|
|
78
77
|
|
|
79
78
|
...
|
|
80
79
|
|
|
81
|
-
def is_path_builtin(path):
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
def is_path_builtin(path):
|
|
81
|
+
""" """
|
|
82
|
+
|
|
83
|
+
...
|
|
84
|
+
|
|
85
|
+
def keyconfig_init():
|
|
86
|
+
""" """
|
|
87
|
+
|
|
88
|
+
...
|
|
89
|
+
|
|
90
|
+
def keyconfig_init():
|
|
91
|
+
""" """
|
|
92
|
+
|
|
93
|
+
...
|
|
94
|
+
|
|
95
|
+
def keyconfig_set(filepath, report=None):
|
|
96
|
+
""" """
|
|
97
|
+
|
|
98
|
+
...
|
|
99
|
+
|
|
100
|
+
def keyconfig_set(filepath, report):
|
|
101
|
+
""" """
|
|
102
|
+
|
|
103
|
+
...
|
|
104
|
+
|
|
86
105
|
def load_scripts(
|
|
87
|
-
|
|
88
|
-
reload_scripts: typing.Optional[bool] = False,
|
|
89
|
-
refresh_scripts: typing.Optional[bool] = False,
|
|
90
|
-
extensions: typing.Optional[bool] = True,
|
|
106
|
+
reload_scripts: bool = False, refresh_scripts: bool = False, extensions: bool = True
|
|
91
107
|
):
|
|
92
108
|
"""Load scripts and run each modules register function.
|
|
93
109
|
|
|
94
110
|
:param reload_scripts: Causes all scripts to have their unregister method
|
|
95
111
|
called before loading.
|
|
96
|
-
:type reload_scripts:
|
|
112
|
+
:type reload_scripts: bool
|
|
97
113
|
:param refresh_scripts: only load scripts which are not already loaded
|
|
98
114
|
as modules.
|
|
99
|
-
:type refresh_scripts:
|
|
115
|
+
:type refresh_scripts: bool
|
|
100
116
|
:param extensions: Loads additional scripts (add-ons & app-templates).
|
|
101
|
-
:type extensions:
|
|
117
|
+
:type extensions: bool
|
|
102
118
|
"""
|
|
103
119
|
|
|
104
120
|
...
|
|
105
121
|
|
|
106
|
-
def load_scripts(reload_scripts, refresh_scripts, extensions):
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
122
|
+
def load_scripts(reload_scripts, refresh_scripts, extensions):
|
|
123
|
+
""" """
|
|
124
|
+
|
|
125
|
+
...
|
|
126
|
+
|
|
127
|
+
def load_scripts_extensions(reload_scripts):
|
|
128
|
+
""" """
|
|
129
|
+
|
|
130
|
+
...
|
|
131
|
+
|
|
132
|
+
def make_rna_paths(struct_name: str, prop_name: str, enum_name: str):
|
|
113
133
|
"""Create RNA "paths" from given names.
|
|
114
134
|
|
|
115
135
|
:param struct_name: Name of a RNA struct (like e.g. "Scene").
|
|
116
|
-
:type struct_name:
|
|
136
|
+
:type struct_name: str
|
|
117
137
|
:param prop_name: Name of a RNA struct's property.
|
|
118
|
-
:type prop_name:
|
|
138
|
+
:type prop_name: str
|
|
119
139
|
:param enum_name: Name of a RNA enum identifier.
|
|
120
|
-
:type enum_name:
|
|
121
|
-
:rtype: typing.Tuple
|
|
140
|
+
:type enum_name: str
|
|
122
141
|
:return: A triple of three "RNA paths"
|
|
123
142
|
(most_complete_path, "struct.prop", "struct.prop:'enum'").
|
|
124
143
|
If no enum_name is given, the third element will always be void.
|
|
@@ -126,58 +145,92 @@ def make_rna_paths(
|
|
|
126
145
|
|
|
127
146
|
...
|
|
128
147
|
|
|
129
|
-
def make_rna_paths(struct_name, prop_name, enum_name):
|
|
148
|
+
def make_rna_paths(struct_name, prop_name, enum_name):
|
|
149
|
+
""" """
|
|
150
|
+
|
|
151
|
+
...
|
|
152
|
+
|
|
130
153
|
def manual_language_code(default="en") -> str:
|
|
131
154
|
"""
|
|
132
155
|
|
|
133
|
-
:rtype: str
|
|
134
156
|
:return: The language code used for user manual URL component based on the current language user-preference,
|
|
135
157
|
falling back to the default when unavailable.
|
|
158
|
+
:rtype: str
|
|
136
159
|
"""
|
|
137
160
|
|
|
138
161
|
...
|
|
139
162
|
|
|
140
|
-
def manual_language_code(default):
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
)
|
|
163
|
+
def manual_language_code(default):
|
|
164
|
+
""" """
|
|
165
|
+
|
|
166
|
+
...
|
|
167
|
+
|
|
168
|
+
def manual_map():
|
|
169
|
+
""" """
|
|
170
|
+
|
|
171
|
+
...
|
|
172
|
+
|
|
173
|
+
def manual_map():
|
|
174
|
+
""" """
|
|
175
|
+
|
|
176
|
+
...
|
|
177
|
+
|
|
178
|
+
def modules_from_path(path: str, loaded_modules: set) -> list:
|
|
146
179
|
"""Load all modules in a path and return them as a list.
|
|
147
180
|
|
|
148
181
|
:param path: this path is scanned for scripts and packages.
|
|
149
|
-
:type path:
|
|
182
|
+
:type path: str
|
|
150
183
|
:param loaded_modules: already loaded module names, files matching these
|
|
151
184
|
names will be ignored.
|
|
152
|
-
:type loaded_modules:
|
|
153
|
-
:rtype: typing.List
|
|
185
|
+
:type loaded_modules: set
|
|
154
186
|
:return: all loaded modules.
|
|
187
|
+
:rtype: list
|
|
155
188
|
"""
|
|
156
189
|
|
|
157
190
|
...
|
|
158
191
|
|
|
159
|
-
def modules_from_path(path, loaded_modules):
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
192
|
+
def modules_from_path(path, loaded_modules):
|
|
193
|
+
""" """
|
|
194
|
+
|
|
195
|
+
...
|
|
196
|
+
|
|
197
|
+
def preset_find(name, preset_path, display_name=False, ext=".py"):
|
|
198
|
+
""" """
|
|
199
|
+
|
|
200
|
+
...
|
|
201
|
+
|
|
202
|
+
def preset_find(name, preset_path, display_name, ext):
|
|
203
|
+
""" """
|
|
204
|
+
|
|
205
|
+
...
|
|
206
|
+
|
|
207
|
+
def preset_paths(subdir: str) -> list:
|
|
163
208
|
"""Returns a list of paths for a specific preset.
|
|
164
209
|
|
|
165
210
|
:param subdir: preset subdirectory (must not be an absolute path).
|
|
166
|
-
:type subdir:
|
|
167
|
-
:rtype: typing.List
|
|
211
|
+
:type subdir: str
|
|
168
212
|
:return: script paths.
|
|
213
|
+
:rtype: list
|
|
169
214
|
"""
|
|
170
215
|
|
|
171
216
|
...
|
|
172
217
|
|
|
173
|
-
def preset_paths(subdir):
|
|
218
|
+
def preset_paths(subdir):
|
|
219
|
+
""" """
|
|
220
|
+
|
|
221
|
+
...
|
|
222
|
+
|
|
174
223
|
def refresh_script_paths():
|
|
175
224
|
"""Run this after creating new script paths to update sys.path"""
|
|
176
225
|
|
|
177
226
|
...
|
|
178
227
|
|
|
179
|
-
def refresh_script_paths():
|
|
180
|
-
|
|
228
|
+
def refresh_script_paths():
|
|
229
|
+
""" """
|
|
230
|
+
|
|
231
|
+
...
|
|
232
|
+
|
|
233
|
+
def register_class(cls):
|
|
181
234
|
"""Register a subclass of a Blender type class.
|
|
182
235
|
|
|
183
236
|
:param cls: Blender type class in:
|
|
@@ -186,7 +239,6 @@ def register_class(cls: typing.Optional[typing.Any]):
|
|
|
186
239
|
`bpy.types.Operator`, `bpy.types.KeyingSetInfo`,
|
|
187
240
|
`bpy.types.RenderEngine`, `bpy.types.AssetShelf`,
|
|
188
241
|
`bpy.types.FileHandler`
|
|
189
|
-
:type cls: typing.Optional[typing.Any]
|
|
190
242
|
"""
|
|
191
243
|
|
|
192
244
|
...
|
|
@@ -199,10 +251,12 @@ def register_classes_factory(classes):
|
|
|
199
251
|
|
|
200
252
|
...
|
|
201
253
|
|
|
202
|
-
def register_classes_factory(classes):
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
254
|
+
def register_classes_factory(classes):
|
|
255
|
+
""" """
|
|
256
|
+
|
|
257
|
+
...
|
|
258
|
+
|
|
259
|
+
def register_cli_command(id: str, execute: typing.Callable):
|
|
206
260
|
"""Register a command, accessible via the (-c / --command) command-line argument.Custom CommandsRegistering commands makes it possible to conveniently expose command line
|
|
207
261
|
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
|
|
208
262
|
generates a --help message for your command.
|
|
@@ -210,73 +264,73 @@ def register_cli_command(
|
|
|
210
264
|
:param id: The command identifier (must pass an str.isidentifier check).
|
|
211
265
|
|
|
212
266
|
If the id is already registered, a warning is printed and the command is inaccessible to prevent accidents invoking the wrong command.
|
|
213
|
-
:type id:
|
|
267
|
+
:type id: str
|
|
214
268
|
:param execute: Callback, taking a single list of strings and returns an int.
|
|
215
269
|
The arguments are built from all command-line arguments following the command id.
|
|
216
270
|
The return value should be 0 for success, 1 on failure (specific error codes from the os module can also be used).
|
|
217
|
-
:type execute: typing.
|
|
218
|
-
:rtype: typing.Any
|
|
271
|
+
:type execute: typing.Callable
|
|
219
272
|
:return: The command handle which can be passed to `unregister_cli_command`.
|
|
220
273
|
"""
|
|
221
274
|
|
|
222
275
|
...
|
|
223
276
|
|
|
224
|
-
def register_manual_map(manual_hook):
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
)
|
|
277
|
+
def register_manual_map(manual_hook):
|
|
278
|
+
""" """
|
|
279
|
+
|
|
280
|
+
...
|
|
281
|
+
|
|
282
|
+
def register_manual_map(manual_hook):
|
|
283
|
+
""" """
|
|
284
|
+
|
|
285
|
+
...
|
|
286
|
+
|
|
287
|
+
def register_submodule_factory(module_name: str, submodule_names: typing.List[str]):
|
|
230
288
|
"""Utility function to create register and unregister functions
|
|
231
289
|
which simply load submodules,
|
|
232
290
|
calling their register & unregister functions.
|
|
233
291
|
|
|
234
292
|
:param module_name: The module name, typically __name__.
|
|
235
|
-
:type module_name:
|
|
293
|
+
:type module_name: str
|
|
236
294
|
:param submodule_names: List of submodule names to load and unload.
|
|
237
|
-
:type submodule_names: typing.
|
|
238
|
-
:rtype: typing.Tuple
|
|
295
|
+
:type submodule_names: typing.List[str]
|
|
239
296
|
:return: register and unregister functions.
|
|
240
297
|
"""
|
|
241
298
|
|
|
242
299
|
...
|
|
243
300
|
|
|
244
|
-
def register_submodule_factory(module_name, submodule_names):
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
group: typing.Optional[bool] = False,
|
|
251
|
-
):
|
|
301
|
+
def register_submodule_factory(module_name, submodule_names):
|
|
302
|
+
""" """
|
|
303
|
+
|
|
304
|
+
...
|
|
305
|
+
|
|
306
|
+
def register_tool(tool_cls, after=None, separator: bool = False, group: bool = False):
|
|
252
307
|
"""Register a tool in the toolbar.
|
|
253
308
|
|
|
254
309
|
:param after: Optional identifiers this tool will be added after.
|
|
255
|
-
:type after: typing.Optional[typing.Any]
|
|
256
310
|
:param separator: When true, add a separator before this tool.
|
|
257
|
-
:type separator:
|
|
311
|
+
:type separator: bool
|
|
258
312
|
:param group: When true, add a new nested group of tools.
|
|
259
|
-
:type group:
|
|
313
|
+
:type group: bool
|
|
260
314
|
"""
|
|
261
315
|
|
|
262
316
|
...
|
|
263
317
|
|
|
264
|
-
def register_tool(tool_cls, after, separator, group):
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
) -> str:
|
|
318
|
+
def register_tool(tool_cls, after, separator, group):
|
|
319
|
+
""" """
|
|
320
|
+
|
|
321
|
+
...
|
|
322
|
+
|
|
323
|
+
def resource_path(type: str, major: int = None[0], minor: str = None[1]) -> str:
|
|
270
324
|
"""Return the base path for storing system files.
|
|
271
325
|
|
|
272
326
|
:param type: string in ['USER', 'LOCAL', 'SYSTEM'].
|
|
273
|
-
:type type:
|
|
327
|
+
:type type: str
|
|
274
328
|
:param major: major version, defaults to current.
|
|
275
|
-
:type major:
|
|
329
|
+
:type major: int
|
|
276
330
|
:param minor: minor version, defaults to current.
|
|
277
|
-
:type minor:
|
|
278
|
-
:rtype: str
|
|
331
|
+
:type minor: str
|
|
279
332
|
:return: the resource path (not necessarily existing).
|
|
333
|
+
:rtype: str
|
|
280
334
|
"""
|
|
281
335
|
|
|
282
336
|
...
|
|
@@ -286,113 +340,147 @@ def script_path_user():
|
|
|
286
340
|
|
|
287
341
|
...
|
|
288
342
|
|
|
289
|
-
def script_path_user():
|
|
343
|
+
def script_path_user():
|
|
344
|
+
""" """
|
|
345
|
+
|
|
346
|
+
...
|
|
347
|
+
|
|
290
348
|
def script_paths(
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
user_pref: typing.Optional[bool] = True,
|
|
294
|
-
check_all: typing.Optional[bool] = False,
|
|
295
|
-
use_user=True,
|
|
296
|
-
) -> typing.List:
|
|
349
|
+
subdir: str = None, user_pref: bool = True, check_all: bool = False, use_user=True
|
|
350
|
+
) -> list:
|
|
297
351
|
"""Returns a list of valid script paths.
|
|
298
352
|
|
|
299
353
|
:param subdir: Optional subdir.
|
|
300
|
-
:type subdir:
|
|
354
|
+
:type subdir: str
|
|
301
355
|
:param user_pref: Include the user preference script paths.
|
|
302
|
-
:type user_pref:
|
|
356
|
+
:type user_pref: bool
|
|
303
357
|
:param check_all: Include local, user and system paths rather just the paths Blender uses.
|
|
304
|
-
:type check_all:
|
|
305
|
-
:rtype: typing.List
|
|
358
|
+
:type check_all: bool
|
|
306
359
|
:return: script paths.
|
|
360
|
+
:rtype: list
|
|
307
361
|
"""
|
|
308
362
|
|
|
309
363
|
...
|
|
310
364
|
|
|
311
|
-
def script_paths(subdir, user_pref, check_all, use_user):
|
|
312
|
-
|
|
313
|
-
|
|
365
|
+
def script_paths(subdir, user_pref, check_all, use_user):
|
|
366
|
+
""" """
|
|
367
|
+
|
|
368
|
+
...
|
|
369
|
+
|
|
370
|
+
def script_paths_pref():
|
|
371
|
+
""" """
|
|
372
|
+
|
|
373
|
+
...
|
|
374
|
+
|
|
375
|
+
def smpte_from_frame(frame: int, fps=None, fps_base=None) -> str:
|
|
314
376
|
"""Returns an SMPTE formatted string from the frame:
|
|
315
377
|
HH:MM:SS:FF.If fps and fps_base are not given the current scene is used.
|
|
316
378
|
|
|
317
379
|
:param frame: frame number.
|
|
318
|
-
:type frame:
|
|
319
|
-
:rtype: str
|
|
380
|
+
:type frame: int
|
|
320
381
|
:return: the frame string.
|
|
382
|
+
:rtype: str
|
|
321
383
|
"""
|
|
322
384
|
|
|
323
385
|
...
|
|
324
386
|
|
|
325
|
-
def smpte_from_frame(frame, fps, fps_base):
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
387
|
+
def smpte_from_frame(frame, fps, fps_base):
|
|
388
|
+
""" """
|
|
389
|
+
|
|
390
|
+
...
|
|
391
|
+
|
|
392
|
+
def smpte_from_seconds(time: typing.Union[int, float], fps=None, fps_base=None) -> str:
|
|
329
393
|
"""Returns an SMPTE formatted string from the time:
|
|
330
394
|
HH:MM:SS:FF.If fps and fps_base are not given the current scene is used.
|
|
331
395
|
|
|
332
396
|
:param time: time in seconds.
|
|
333
|
-
:type time: typing.
|
|
334
|
-
:rtype: str
|
|
397
|
+
:type time: typing.Union[int, float]
|
|
335
398
|
:return: the frame string.
|
|
399
|
+
:rtype: str
|
|
336
400
|
"""
|
|
337
401
|
|
|
338
402
|
...
|
|
339
403
|
|
|
340
|
-
def smpte_from_seconds(time, fps, fps_base):
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
404
|
+
def smpte_from_seconds(time, fps, fps_base):
|
|
405
|
+
""" """
|
|
406
|
+
|
|
407
|
+
...
|
|
408
|
+
|
|
409
|
+
def time_from_frame(frame, fps, fps_base):
|
|
410
|
+
""" """
|
|
411
|
+
|
|
412
|
+
...
|
|
413
|
+
|
|
414
|
+
def time_to_frame(time, fps, fps_base):
|
|
415
|
+
""" """
|
|
416
|
+
|
|
417
|
+
...
|
|
418
|
+
|
|
419
|
+
def unescape_identifier(string: str) -> str:
|
|
344
420
|
"""Simple string un-escape function used for animation paths.
|
|
345
421
|
This performs the reverse of escape_identifier.
|
|
346
422
|
|
|
347
423
|
:param string: text
|
|
348
|
-
:type string:
|
|
349
|
-
:rtype: str
|
|
424
|
+
:type string: str
|
|
350
425
|
:return: The un-escaped string.
|
|
426
|
+
:rtype: str
|
|
351
427
|
"""
|
|
352
428
|
|
|
353
429
|
...
|
|
354
430
|
|
|
355
|
-
def unregister_class(cls
|
|
431
|
+
def unregister_class(cls):
|
|
356
432
|
"""Unload the Python class from blender.
|
|
357
433
|
|
|
358
434
|
:param cls: Blender type class,
|
|
359
435
|
see `bpy.utils.register_class` for classes which can
|
|
360
436
|
be registered.
|
|
361
|
-
:type cls: typing.Optional[typing.Any]
|
|
362
437
|
"""
|
|
363
438
|
|
|
364
439
|
...
|
|
365
440
|
|
|
366
|
-
def unregister_cli_command(handle
|
|
441
|
+
def unregister_cli_command(handle):
|
|
367
442
|
"""Unregister a CLI command.
|
|
368
443
|
|
|
369
444
|
:param handle: The return value of `register_cli_command`.
|
|
370
|
-
:type handle: typing.Optional[typing.Any]
|
|
371
445
|
"""
|
|
372
446
|
|
|
373
447
|
...
|
|
374
448
|
|
|
375
|
-
def unregister_manual_map(manual_hook):
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
449
|
+
def unregister_manual_map(manual_hook):
|
|
450
|
+
""" """
|
|
451
|
+
|
|
452
|
+
...
|
|
453
|
+
|
|
454
|
+
def unregister_manual_map(manual_hook):
|
|
455
|
+
""" """
|
|
456
|
+
|
|
457
|
+
...
|
|
458
|
+
|
|
459
|
+
def unregister_tool(tool_cls):
|
|
460
|
+
""" """
|
|
461
|
+
|
|
462
|
+
...
|
|
463
|
+
|
|
464
|
+
def unregister_tool(tool_cls):
|
|
465
|
+
""" """
|
|
466
|
+
|
|
467
|
+
...
|
|
468
|
+
|
|
469
|
+
def user_resource(resource_type, path: str = "", create: bool = False) -> str:
|
|
385
470
|
"""Return a user resource path (normally from the users home directory).
|
|
386
471
|
|
|
387
472
|
:param path: Optional subdirectory.
|
|
388
|
-
:type path:
|
|
473
|
+
:type path: str
|
|
389
474
|
:param create: Treat the path as a directory and create
|
|
390
475
|
it if its not existing.
|
|
391
|
-
:type create:
|
|
392
|
-
:rtype: str
|
|
476
|
+
:type create: bool
|
|
393
477
|
:return: a path.
|
|
478
|
+
:rtype: str
|
|
394
479
|
"""
|
|
395
480
|
|
|
396
481
|
...
|
|
397
482
|
|
|
398
|
-
def user_resource(resource_type, path, create):
|
|
483
|
+
def user_resource(resource_type, path, create):
|
|
484
|
+
""" """
|
|
485
|
+
|
|
486
|
+
...
|