fake-bpy-module 20240210__py3-none-any.whl → 20240326__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 -11
- animsys_refactor/__init__.pyi +36 -7
- aud/__init__.pyi +307 -321
- bgl/__init__.pyi +2926 -865
- bl_app_override/__init__.pyi +14 -4
- bl_app_override/helpers/__init__.pyi +24 -3
- bl_app_template_utils/__init__.pyi +19 -5
- bl_console_utils/__init__.pyi +0 -1
- bl_console_utils/autocomplete/__init__.pyi +2 -3
- bl_console_utils/autocomplete/complete_calltip/__init__.pyi +24 -6
- bl_console_utils/autocomplete/complete_import/__init__.pyi +14 -4
- bl_console_utils/autocomplete/complete_namespace/__init__.pyi +24 -6
- bl_console_utils/autocomplete/intellisense/__init__.pyi +9 -3
- bl_i18n_utils/__init__.pyi +2 -3
- bl_i18n_utils/bl_extract_messages/__init__.pyi +74 -16
- bl_i18n_utils/merge_po/__init__.pyi +4 -2
- bl_i18n_utils/settings/__init__.pyi +53 -7
- bl_i18n_utils/utils/__init__.pyi +332 -45
- bl_i18n_utils/utils_cli/__init__.pyi +29 -7
- bl_i18n_utils/utils_languages_menu/__init__.pyi +4 -2
- bl_i18n_utils/utils_rtl/__init__.pyi +9 -3
- bl_keymap_utils/__init__.pyi +2 -3
- bl_keymap_utils/io/__init__.pyi +44 -10
- bl_keymap_utils/keymap_from_toolbar/__init__.pyi +4 -2
- bl_keymap_utils/keymap_hierarchy/__init__.pyi +4 -2
- bl_keymap_utils/platform_helpers/__init__.pyi +9 -3
- bl_keymap_utils/versioning/__init__.pyi +4 -2
- bl_math/__init__.pyi +21 -22
- bl_operators/__init__.pyi +30 -24
- bl_operators/add_mesh_torus/__init__.pyi +171 -38
- bl_operators/anim/__init__.pyi +1065 -227
- bl_operators/assets/__init__.pyi +427 -93
- bl_operators/bmesh/__init__.pyi +0 -1
- bl_operators/bmesh/find_adjacent/__init__.pyi +44 -10
- bl_operators/clip/__init__.pyi +1342 -288
- bl_operators/console/__init__.pyi +647 -141
- bl_operators/constraint/__init__.pyi +524 -113
- bl_operators/file/__init__.pyi +396 -85
- bl_operators/freestyle/__init__.pyi +532 -114
- bl_operators/geometry_nodes/__init__.pyi +2412 -597
- bl_operators/image/__init__.pyi +380 -83
- bl_operators/mesh/__init__.pyi +401 -86
- bl_operators/node/__init__.pyi +1756 -385
- bl_operators/object/__init__.pyi +2022 -553
- bl_operators/object_align/__init__.pyi +145 -32
- bl_operators/object_quick_effects/__init__.pyi +555 -125
- bl_operators/object_randomize_transform/__init__.pyi +136 -33
- bl_operators/presets/__init__.pyi +3516 -709
- bl_operators/rigidbody/__init__.pyi +401 -86
- bl_operators/screen_play_rendered_anim/__init__.pyi +129 -30
- bl_operators/sequencer/__init__.pyi +731 -150
- bl_operators/spreadsheet/__init__.pyi +145 -31
- bl_operators/userpref/__init__.pyi +3416 -825
- bl_operators/uvcalc_follow_active/__init__.pyi +149 -33
- bl_operators/uvcalc_lightmap/__init__.pyi +187 -35
- bl_operators/uvcalc_transform/__init__.pyi +344 -74
- bl_operators/vertexpaint_dirt/__init__.pyi +140 -31
- bl_operators/view3d/__init__.pyi +697 -147
- bl_operators/wm/__init__.pyi +6287 -1534
- bl_previews_utils/__init__.pyi +0 -1
- bl_previews_utils/bl_previews_render/__init__.pyi +34 -8
- bl_rna_utils/__init__.pyi +0 -1
- bl_rna_utils/data_path/__init__.pyi +12 -3
- bl_text_utils/__init__.pyi +0 -1
- bl_text_utils/external_editor/__init__.pyi +4 -2
- bl_ui/__init__.pyi +567 -170
- bl_ui/anim/__init__.pyi +164 -34
- bl_ui/asset_shelf/__init__.pyi +146 -32
- bl_ui/generic_ui_list/__init__.pyi +471 -100
- bl_ui/node_add_menu/__init__.pyi +196 -41
- bl_ui/node_add_menu_compositor/__init__.pyi +3017 -622
- bl_ui/node_add_menu_geometry/__init__.pyi +8075 -1592
- bl_ui/node_add_menu_shader/__init__.pyi +1709 -349
- bl_ui/node_add_menu_texture/__init__.pyi +1502 -306
- bl_ui/properties_animviz/__init__.pyi +32 -3
- bl_ui/properties_collection/__init__.pyi +787 -180
- bl_ui/properties_constraint/__init__.pyi +28635 -5524
- bl_ui/properties_data_armature/__init__.pyi +1905 -449
- bl_ui/properties_data_bone/__init__.pyi +1560 -337
- bl_ui/properties_data_camera/__init__.pyi +2269 -495
- bl_ui/properties_data_curve/__init__.pyi +2362 -535
- bl_ui/properties_data_curves/__init__.pyi +951 -204
- bl_ui/properties_data_empty/__init__.pyi +317 -70
- bl_ui/properties_data_gpencil/__init__.pyi +2924 -735
- bl_ui/properties_data_grease_pencil/__init__.pyi +1631 -189
- bl_ui/properties_data_lattice/__init__.pyi +472 -105
- bl_ui/properties_data_light/__init__.pyi +1570 -338
- bl_ui/properties_data_lightprobe/__init__.pyi +938 -209
- bl_ui/properties_data_mesh/__init__.pyi +3205 -768
- bl_ui/properties_data_metaball/__init__.pyi +774 -171
- bl_ui/properties_data_modifier/__init__.pyi +1554 -329
- bl_ui/properties_data_pointcloud/__init__.pyi +821 -195
- bl_ui/properties_data_shaderfx/__init__.pyi +154 -35
- bl_ui/properties_data_speaker/__init__.pyi +782 -169
- bl_ui/properties_data_volume/__init__.pyi +1243 -282
- bl_ui/properties_freestyle/__init__.pyi +4071 -1031
- bl_ui/properties_grease_pencil_common/__init__.pyi +2399 -484
- bl_ui/properties_mask_common/__init__.pyi +1256 -250
- bl_ui/properties_material/__init__.pyi +2351 -543
- bl_ui/properties_material_gpencil/__init__.pyi +1590 -366
- bl_ui/properties_object/__init__.pyi +2179 -513
- bl_ui/properties_output/__init__.pyi +2956 -706
- bl_ui/properties_paint_common/__init__.pyi +947 -141
- bl_ui/properties_particle/__init__.pyi +8322 -1971
- bl_ui/properties_physics_cloth/__init__.pyi +2254 -509
- bl_ui/properties_physics_common/__init__.pyi +200 -45
- bl_ui/properties_physics_dynamicpaint/__init__.pyi +4454 -966
- bl_ui/properties_physics_field/__init__.pyi +1695 -365
- bl_ui/properties_physics_fluid/__init__.pyi +6127 -1281
- bl_ui/properties_physics_geometry_nodes/__init__.pyi +157 -33
- bl_ui/properties_physics_rigidbody/__init__.pyi +1254 -279
- bl_ui/properties_physics_rigidbody_constraint/__init__.pyi +2053 -484
- bl_ui/properties_physics_softbody/__init__.pyi +2394 -543
- bl_ui/properties_render/__init__.pyi +8312 -1934
- bl_ui/properties_scene/__init__.pyi +2211 -540
- bl_ui/properties_texture/__init__.pyi +4185 -1014
- bl_ui/properties_view_layer/__init__.pyi +2803 -665
- bl_ui/properties_workspace/__init__.pyi +626 -149
- bl_ui/properties_world/__init__.pyi +1092 -235
- bl_ui/space_clip/__init__.pyi +11475 -2806
- bl_ui/space_console/__init__.pyi +967 -203
- bl_ui/space_dopesheet/__init__.pyi +4260 -967
- bl_ui/space_filebrowser/__init__.pyi +4852 -1188
- bl_ui/space_graph/__init__.pyi +3251 -703
- bl_ui/space_image/__init__.pyi +12218 -2968
- bl_ui/space_info/__init__.pyi +964 -201
- bl_ui/space_nla/__init__.pyi +2756 -585
- bl_ui/space_node/__init__.pyi +5661 -1266
- bl_ui/space_outliner/__init__.pyi +2294 -479
- bl_ui/space_properties/__init__.pyi +417 -93
- bl_ui/space_sequencer/__init__.pyi +12436 -3010
- bl_ui/space_spreadsheet/__init__.pyi +184 -37
- bl_ui/space_statusbar/__init__.pyi +135 -31
- bl_ui/space_text/__init__.pyi +2556 -543
- bl_ui/space_time/__init__.pyi +1151 -244
- bl_ui/space_toolsystem_common/__init__.pyi +368 -67
- bl_ui/space_toolsystem_toolbar/__init__.pyi +1378 -229
- bl_ui/space_topbar/__init__.pyi +4214 -888
- bl_ui/space_userpref/__init__.pyi +13920 -3468
- bl_ui/space_view3d/__init__.pyi +42751 -9613
- bl_ui/space_view3d_toolbar/__init__.pyi +16379 -3860
- bl_ui/utils/__init__.pyi +42 -5
- bl_ui_utils/__init__.pyi +0 -1
- bl_ui_utils/bug_report_url/__init__.pyi +4 -2
- bl_ui_utils/layout/__init__.pyi +4 -2
- blend_render_info/__init__.pyi +13 -4
- blf/__init__.pyi +15 -18
- bmesh/__init__.pyi +18 -18
- bmesh/geometry/__init__.pyi +5 -6
- bmesh/ops/__init__.pyi +1337 -1158
- bmesh/types/__init__.pyi +464 -374
- bmesh/utils/__init__.pyi +64 -70
- bpy/__init__.pyi +6 -7
- bpy/app/__init__.pyi +36 -38
- bpy/app/handlers/__init__.pyi +37 -38
- bpy/app/icons/__init__.pyi +8 -11
- bpy/app/timers/__init__.pyi +18 -17
- bpy/app/translations/__init__.pyi +32 -30
- bpy/msgbus/__init__.pyi +25 -20
- bpy/ops/__init__.pyi +63 -64
- bpy/ops/action/__init__.pyi +408 -436
- bpy/ops/anim/__init__.pyi +459 -577
- bpy/ops/armature/__init__.pyi +396 -498
- bpy/ops/asset/__init__.pyi +187 -213
- bpy/ops/boid/__init__.pyi +50 -68
- bpy/ops/brush/__init__.pyi +72 -97
- bpy/ops/buttons/__init__.pyi +202 -193
- bpy/ops/cachefile/__init__.pyi +198 -188
- bpy/ops/camera/__init__.pyi +24 -31
- bpy/ops/clip/__init__.pyi +1021 -1082
- bpy/ops/cloth/__init__.pyi +11 -15
- bpy/ops/collection/__init__.pyi +36 -51
- bpy/ops/console/__init__.pyi +155 -209
- bpy/ops/constraint/__init__.pyi +286 -254
- bpy/ops/curve/__init__.pyi +597 -659
- bpy/ops/curves/__init__.pyi +191 -225
- bpy/ops/cycles/__init__.pyi +21 -30
- bpy/ops/dpaint/__init__.pyi +34 -47
- bpy/ops/ed/__init__.pyi +160 -176
- bpy/ops/export_anim/__init__.pyi +51 -34
- bpy/ops/export_mesh/__init__.pyi +47 -45
- bpy/ops/export_scene/__init__.pyi +659 -504
- bpy/ops/file/__init__.pyi +469 -474
- bpy/ops/fluid/__init__.pyi +89 -119
- bpy/ops/font/__init__.pyi +325 -361
- bpy/ops/geometry/__init__.pyi +86 -114
- bpy/ops/gizmogroup/__init__.pyi +22 -28
- bpy/ops/gpencil/__init__.pyi +1900 -1976
- bpy/ops/graph/__init__.pyi +875 -894
- bpy/ops/grease_pencil/__init__.pyi +572 -508
- bpy/ops/image/__init__.pyi +805 -855
- bpy/ops/import_anim/__init__.pyi +66 -46
- bpy/ops/import_curve/__init__.pyi +7 -11
- bpy/ops/import_mesh/__init__.pyi +19 -25
- bpy/ops/import_scene/__init__.pyi +164 -147
- bpy/ops/info/__init__.pyi +88 -85
- bpy/ops/lattice/__init__.pyi +86 -90
- bpy/ops/marker/__init__.pyi +135 -146
- bpy/ops/mask/__init__.pyi +372 -436
- bpy/ops/material/__init__.pyi +18 -25
- bpy/ops/mball/__init__.pyi +93 -99
- bpy/ops/mesh/__init__.pyi +2525 -2664
- bpy/ops/nla/__init__.pyi +398 -455
- bpy/ops/node/__init__.pyi +1015 -1207
- bpy/ops/object/__init__.pyi +3423 -3390
- bpy/ops/outliner/__init__.pyi +667 -685
- bpy/ops/paint/__init__.pyi +719 -672
- bpy/ops/paintcurve/__init__.pyi +64 -85
- bpy/ops/palette/__init__.pyi +48 -67
- bpy/ops/particle/__init__.pyi +323 -367
- bpy/ops/pose/__init__.pyi +569 -474
- bpy/ops/poselib/__init__.pyi +77 -100
- bpy/ops/preferences/__init__.pyi +460 -512
- bpy/ops/ptcache/__init__.pyi +46 -63
- bpy/ops/render/__init__.pyi +121 -155
- bpy/ops/rigidbody/__init__.pyi +148 -143
- bpy/ops/scene/__init__.pyi +336 -380
- bpy/ops/screen/__init__.pyi +454 -530
- bpy/ops/script/__init__.pyi +19 -28
- bpy/ops/sculpt/__init__.pyi +734 -587
- bpy/ops/sculpt_curves/__init__.pyi +51 -56
- bpy/ops/sequencer/__init__.pyi +1617 -1500
- bpy/ops/sound/__init__.pyi +392 -315
- bpy/ops/spreadsheet/__init__.pyi +31 -42
- bpy/ops/surface/__init__.pyi +198 -163
- bpy/ops/text/__init__.pyi +479 -545
- bpy/ops/text_editor/__init__.pyi +11 -15
- bpy/ops/texture/__init__.pyi +26 -36
- bpy/ops/transform/__init__.pyi +825 -941
- bpy/ops/ui/__init__.pyi +246 -295
- bpy/ops/uilist/__init__.pyi +34 -38
- bpy/ops/uv/__init__.pyi +912 -824
- bpy/ops/view2d/__init__.pyi +157 -197
- bpy/ops/view3d/__init__.pyi +777 -878
- bpy/ops/wm/__init__.pyi +4102 -3595
- bpy/ops/workspace/__init__.pyi +42 -58
- bpy/ops/world/__init__.pyi +6 -9
- bpy/path/__init__.pyi +166 -109
- bpy/props/__init__.pyi +478 -395
- bpy/types/__init__.pyi +87194 -81467
- bpy/utils/__init__.pyi +325 -169
- bpy/utils/previews/__init__.pyi +108 -21
- bpy/utils/units/__init__.pyi +37 -39
- bpy_extras/__init__.pyi +4 -9
- bpy_extras/anim_utils/__init__.pyi +25 -55
- bpy_extras/asset_utils/__init__.pyi +3 -13
- bpy_extras/id_map_utils/__init__.pyi +1 -4
- bpy_extras/image_utils/__init__.pyi +33 -23
- bpy_extras/io_utils/__init__.pyi +116 -66
- bpy_extras/keyconfig_utils/__init__.pyi +5 -3
- bpy_extras/mesh_utils/__init__.pyi +42 -34
- bpy_extras/node_utils/__init__.pyi +4 -4
- bpy_extras/object_utils/__init__.pyi +58 -43
- bpy_extras/view3d_utils/__init__.pyi +64 -63
- bpy_restrict_state/__init__.pyi +14 -2
- bpy_types/__init__.pyi +3873 -998
- console_python/__init__.pyi +41 -8
- console_shell/__init__.pyi +24 -6
- {fake_bpy_module-20240210.dist-info → fake_bpy_module-20240326.dist-info}/METADATA +1 -1
- fake_bpy_module-20240326.dist-info/RECORD +343 -0
- {fake_bpy_module-20240210.dist-info → fake_bpy_module-20240326.dist-info}/WHEEL +1 -1
- freestyle/__init__.pyi +4 -5
- freestyle/chainingiterators/__init__.pyi +229 -73
- freestyle/functions/__init__.pyi +624 -402
- freestyle/predicates/__init__.pyi +381 -169
- freestyle/shaders/__init__.pyi +424 -155
- freestyle/types/__init__.pyi +1572 -726
- freestyle/utils/ContextFunctions/__init__.pyi +54 -43
- freestyle/utils/__init__.pyi +67 -31
- gpu/__init__.pyi +3 -4
- gpu/capabilities/__init__.pyi +57 -37
- gpu/matrix/__init__.pyi +14 -17
- gpu/platform/__init__.pyi +5 -6
- gpu/select/__init__.pyi +2 -5
- gpu/shader/__init__.pyi +14 -12
- gpu/state/__init__.pyi +48 -62
- gpu/texture/__init__.pyi +7 -7
- gpu/types/__init__.pyi +670 -229
- gpu_extras/__init__.pyi +1 -2
- gpu_extras/batch/__init__.pyi +27 -6
- gpu_extras/presets/__init__.pyi +67 -27
- graphviz_export/__init__.pyi +9 -3
- idprop/__init__.pyi +0 -1
- idprop/types/__init__.pyi +42 -13
- imbuf/__init__.pyi +6 -10
- imbuf/types/__init__.pyi +8 -16
- keyingsets_builtins/__init__.pyi +3149 -702
- keyingsets_utils/__init__.pyi +69 -15
- mathutils/__init__.pyi +951 -876
- mathutils/bvhtree/__init__.pyi +47 -48
- mathutils/geometry/__init__.pyi +237 -242
- mathutils/interpolate/__init__.pyi +3 -6
- mathutils/kdtree/__init__.pyi +23 -26
- mathutils/noise/__init__.pyi +50 -51
- nodeitems_builtins/__init__.pyi +50 -11
- nodeitems_utils/__init__.pyi +58 -11
- rna_info/__init__.pyi +230 -27
- rna_keymap_ui/__init__.pyi +29 -7
- rna_prop_ui/__init__.pyi +69 -13
- rna_xml/__init__.pyi +29 -7
- sys_info/__init__.pyi +4 -2
- bpy_extras/bmesh_utils/__init__.pyi +0 -7
- bpy_extras/extensions/__init__.pyi +0 -5
- bpy_extras/extensions/junction_module/__init__.pyi +0 -13
- bpy_extras/node_shader_utils/__init__.pyi +0 -132
- bpy_extras/wm_utils/__init__.pyi +0 -5
- bpy_extras/wm_utils/progress_report/__init__.pyi +0 -30
- fake_bpy_module-20240210.dist-info/RECORD +0 -349
- {fake_bpy_module-20240210.dist-info → fake_bpy_module-20240326.dist-info}/top_level.txt +0 -0
bpy/utils/__init__.pyi
CHANGED
|
@@ -1,235 +1,336 @@
|
|
|
1
|
-
import sys
|
|
2
1
|
import typing
|
|
3
|
-
import bpy.types
|
|
4
|
-
|
|
5
|
-
from . import units
|
|
6
2
|
from . import previews
|
|
3
|
+
from . import units
|
|
7
4
|
|
|
8
5
|
GenericType = typing.TypeVar("GenericType")
|
|
9
6
|
|
|
10
|
-
def app_template_paths(
|
|
7
|
+
def app_template_paths(path: str = None):
|
|
11
8
|
"""Returns valid application template paths.
|
|
12
9
|
|
|
13
10
|
:param path: Optional subdir.
|
|
14
|
-
:type path:
|
|
15
|
-
:rtype: typing.Any
|
|
11
|
+
:type path: str
|
|
16
12
|
:return: app template paths.
|
|
17
13
|
"""
|
|
18
14
|
|
|
19
15
|
...
|
|
20
16
|
|
|
17
|
+
def app_template_paths(path):
|
|
18
|
+
""" """
|
|
19
|
+
|
|
20
|
+
...
|
|
21
|
+
|
|
21
22
|
def blend_paths(
|
|
22
|
-
absolute:
|
|
23
|
-
packed: typing.Optional[bool] = False,
|
|
24
|
-
local: typing.Optional[bool] = False,
|
|
23
|
+
absolute: bool = False, packed: bool = False, local: bool = False
|
|
25
24
|
) -> typing.List[str]:
|
|
26
25
|
"""Returns a list of paths to external files referenced by the loaded .blend file.
|
|
27
26
|
|
|
28
27
|
:param absolute: When true the paths returned are made absolute.
|
|
29
|
-
:type absolute:
|
|
28
|
+
:type absolute: bool
|
|
30
29
|
:param packed: When true skip file paths for packed data.
|
|
31
|
-
:type packed:
|
|
30
|
+
:type packed: bool
|
|
32
31
|
:param local: When true skip linked library paths.
|
|
33
|
-
:type local:
|
|
34
|
-
:rtype: typing.List[str]
|
|
32
|
+
:type local: bool
|
|
35
33
|
:return: path list.
|
|
34
|
+
:rtype: typing.List[str]
|
|
36
35
|
"""
|
|
37
36
|
|
|
38
37
|
...
|
|
39
38
|
|
|
40
|
-
def escape_identifier(string:
|
|
39
|
+
def escape_identifier(string: str) -> str:
|
|
41
40
|
"""Simple string escaping function used for animation paths.
|
|
42
41
|
|
|
43
42
|
:param string: text
|
|
44
|
-
:type string:
|
|
45
|
-
:rtype: str
|
|
43
|
+
:type string: str
|
|
46
44
|
:return: The escaped string.
|
|
45
|
+
:rtype: str
|
|
47
46
|
"""
|
|
48
47
|
|
|
49
48
|
...
|
|
50
49
|
|
|
51
|
-
def execfile(
|
|
52
|
-
filepath: typing.Optional[str], *, mod: typing.Optional[typing.Any] = None
|
|
53
|
-
) -> typing.Any:
|
|
50
|
+
def execfile(filepath: str, mod=None):
|
|
54
51
|
"""Execute a file path as a Python script.
|
|
55
52
|
|
|
56
53
|
:param filepath: Path of the script to execute.
|
|
57
|
-
:type filepath:
|
|
54
|
+
:type filepath: str
|
|
58
55
|
:param mod: Optional cached module, the result of a previous execution.
|
|
59
|
-
:
|
|
60
|
-
:rtype: typing.Any
|
|
61
|
-
:return: The module which can be passed back in as ``mod``.
|
|
56
|
+
:return: The module which can be passed back in as mod.
|
|
62
57
|
"""
|
|
63
58
|
|
|
64
59
|
...
|
|
65
60
|
|
|
66
|
-
def
|
|
67
|
-
|
|
68
|
-
) -> str:
|
|
69
|
-
"""Flip a name between left/right sides, useful for mirroring bone names.
|
|
61
|
+
def execfile(filepath, mod):
|
|
62
|
+
""" """
|
|
70
63
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
64
|
+
...
|
|
65
|
+
|
|
66
|
+
def flip_name(name: str, strip_digits: bool = False) -> str:
|
|
67
|
+
"""Flip a name between left/right sides, useful for
|
|
68
|
+
mirroring bone names.
|
|
69
|
+
|
|
70
|
+
:param name: Bone name to flip.
|
|
71
|
+
:type name: str
|
|
72
|
+
:param strip_digits: Whether to remove .### suffix.
|
|
73
|
+
:type strip_digits: bool
|
|
74
|
+
:return: The flipped name.
|
|
75
|
+
:rtype: str
|
|
77
76
|
"""
|
|
78
77
|
|
|
79
78
|
...
|
|
80
79
|
|
|
81
|
-
def is_path_builtin(path):
|
|
82
|
-
|
|
83
|
-
|
|
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
|
+
|
|
84
105
|
def load_scripts(
|
|
85
|
-
|
|
86
|
-
reload_scripts: typing.Optional[bool] = False,
|
|
87
|
-
refresh_scripts: typing.Optional[bool] = False,
|
|
88
|
-
extensions: typing.Optional[bool] = True,
|
|
106
|
+
reload_scripts: bool = False, refresh_scripts: bool = False, extensions: bool = True
|
|
89
107
|
):
|
|
90
108
|
"""Load scripts and run each modules register function.
|
|
91
109
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
110
|
+
:param reload_scripts: Causes all scripts to have their unregister method
|
|
111
|
+
called before loading.
|
|
112
|
+
:type reload_scripts: bool
|
|
113
|
+
:param refresh_scripts: only load scripts which are not already loaded
|
|
114
|
+
as modules.
|
|
115
|
+
:type refresh_scripts: bool
|
|
116
|
+
:param extensions: Loads additional scripts (add-ons & app-templates).
|
|
117
|
+
:type extensions: bool
|
|
98
118
|
"""
|
|
99
119
|
|
|
100
120
|
...
|
|
101
121
|
|
|
102
|
-
def
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
)
|
|
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):
|
|
108
133
|
"""Create RNA "paths" from given names.
|
|
109
134
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
135
|
+
:param struct_name: Name of a RNA struct (like e.g. "Scene").
|
|
136
|
+
:type struct_name: str
|
|
137
|
+
:param prop_name: Name of a RNA struct's property.
|
|
138
|
+
:type prop_name: str
|
|
139
|
+
:param enum_name: Name of a RNA enum identifier.
|
|
140
|
+
:type enum_name: str
|
|
141
|
+
:return: A triple of three "RNA paths"
|
|
142
|
+
(most_complete_path, "struct.prop", "struct.prop:'enum'").
|
|
143
|
+
If no enum_name is given, the third element will always be void.
|
|
118
144
|
"""
|
|
119
145
|
|
|
120
146
|
...
|
|
121
147
|
|
|
148
|
+
def make_rna_paths(struct_name, prop_name, enum_name):
|
|
149
|
+
""" """
|
|
150
|
+
|
|
151
|
+
...
|
|
152
|
+
|
|
122
153
|
def manual_language_code(default="en") -> str:
|
|
123
154
|
"""
|
|
124
155
|
|
|
125
|
-
|
|
126
|
-
|
|
156
|
+
:return: The language code used for user manual URL component based on the current language user-preference,
|
|
157
|
+
falling back to the default when unavailable.
|
|
158
|
+
:rtype: str
|
|
127
159
|
"""
|
|
128
160
|
|
|
129
161
|
...
|
|
130
162
|
|
|
131
|
-
def
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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:
|
|
135
179
|
"""Load all modules in a path and return them as a list.
|
|
136
180
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
181
|
+
:param path: this path is scanned for scripts and packages.
|
|
182
|
+
:type path: str
|
|
183
|
+
:param loaded_modules: already loaded module names, files matching these
|
|
184
|
+
names will be ignored.
|
|
185
|
+
:type loaded_modules: set
|
|
186
|
+
:return: all loaded modules.
|
|
187
|
+
:rtype: list
|
|
143
188
|
"""
|
|
144
189
|
|
|
145
190
|
...
|
|
146
191
|
|
|
147
|
-
def
|
|
148
|
-
|
|
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:
|
|
149
208
|
"""Returns a list of paths for a specific preset.
|
|
150
209
|
|
|
151
210
|
:param subdir: preset subdirectory (must not be an absolute path).
|
|
152
|
-
:type subdir:
|
|
153
|
-
:rtype: typing.List
|
|
211
|
+
:type subdir: str
|
|
154
212
|
:return: script paths.
|
|
213
|
+
:rtype: list
|
|
155
214
|
"""
|
|
156
215
|
|
|
157
216
|
...
|
|
158
217
|
|
|
218
|
+
def preset_paths(subdir):
|
|
219
|
+
""" """
|
|
220
|
+
|
|
221
|
+
...
|
|
222
|
+
|
|
159
223
|
def refresh_script_paths():
|
|
160
224
|
"""Run this after creating new script paths to update sys.path"""
|
|
161
225
|
|
|
162
226
|
...
|
|
163
227
|
|
|
164
|
-
def
|
|
165
|
-
"""
|
|
228
|
+
def refresh_script_paths():
|
|
229
|
+
""" """
|
|
230
|
+
|
|
231
|
+
...
|
|
232
|
+
|
|
233
|
+
def register_class(cls):
|
|
234
|
+
"""Register a subclass of a Blender type class.
|
|
235
|
+
|
|
236
|
+
:param cls: Blender type class in:
|
|
237
|
+
`bpy.types.Panel`, `bpy.types.UIList`,
|
|
238
|
+
`bpy.types.Menu`, `bpy.types.Header`,
|
|
239
|
+
`bpy.types.Operator`, `bpy.types.KeyingSetInfo`,
|
|
240
|
+
`bpy.types.RenderEngine`, `bpy.types.AssetShelf`,
|
|
241
|
+
`bpy.types.FileHandler`
|
|
242
|
+
"""
|
|
243
|
+
|
|
244
|
+
...
|
|
245
|
+
|
|
246
|
+
def register_classes_factory(classes):
|
|
247
|
+
"""Utility function to create register and unregister functions
|
|
248
|
+
which simply registers and unregisters a sequence of classes.
|
|
166
249
|
|
|
167
|
-
:param cls: `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`
|
|
168
|
-
:type cls: typing.Optional[typing.Any]
|
|
169
250
|
"""
|
|
170
251
|
|
|
171
252
|
...
|
|
172
253
|
|
|
173
254
|
def register_classes_factory(classes):
|
|
174
|
-
"""
|
|
255
|
+
""" """
|
|
175
256
|
|
|
176
257
|
...
|
|
177
258
|
|
|
178
|
-
def
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
259
|
+
def register_cli_command(id: str, execute: typing.Callable):
|
|
260
|
+
"""Register a command, accessible via the (-c / --command) command-line argument.Custom CommandsRegistering commands makes it possible to conveniently expose command line
|
|
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
|
|
262
|
+
generates a --help message for your command.
|
|
263
|
+
|
|
264
|
+
:param id: The command identifier (must pass an str.isidentifier check).
|
|
184
265
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
266
|
+
If the id is already registered, a warning is printed and the command is inaccessible to prevent accidents invoking the wrong command.
|
|
267
|
+
:type id: str
|
|
268
|
+
:param execute: Callback, taking a single list of strings and returns an int.
|
|
269
|
+
The arguments are built from all command-line arguments following the command id.
|
|
270
|
+
The return value should be 0 for success, 1 on failure (specific error codes from the os module can also be used).
|
|
271
|
+
:type execute: typing.Callable
|
|
272
|
+
:return: The command handle which can be passed to `unregister_cli_command`.
|
|
191
273
|
"""
|
|
192
274
|
|
|
193
275
|
...
|
|
194
276
|
|
|
195
|
-
def
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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]):
|
|
288
|
+
"""Utility function to create register and unregister functions
|
|
289
|
+
which simply load submodules,
|
|
290
|
+
calling their register & unregister functions.
|
|
291
|
+
|
|
292
|
+
:param module_name: The module name, typically __name__.
|
|
293
|
+
:type module_name: str
|
|
294
|
+
:param submodule_names: List of submodule names to load and unload.
|
|
295
|
+
:type submodule_names: typing.List[str]
|
|
296
|
+
:return: register and unregister functions.
|
|
297
|
+
"""
|
|
298
|
+
|
|
299
|
+
...
|
|
300
|
+
|
|
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):
|
|
202
307
|
"""Register a tool in the toolbar.
|
|
203
308
|
|
|
204
|
-
:param tool: A tool subclass.
|
|
205
|
-
:type tool: typing.Optional['bpy.types.WorkSpaceTool']
|
|
206
|
-
:param space_type: Space type identifier.
|
|
207
|
-
:type space_type: typing.Optional[str]
|
|
208
309
|
:param after: Optional identifiers this tool will be added after.
|
|
209
|
-
:type after: typing.Optional[typing.Any]
|
|
210
310
|
:param separator: When true, add a separator before this tool.
|
|
211
|
-
:type separator:
|
|
311
|
+
:type separator: bool
|
|
212
312
|
:param group: When true, add a new nested group of tools.
|
|
213
|
-
:type group:
|
|
313
|
+
:type group: bool
|
|
214
314
|
"""
|
|
215
315
|
|
|
216
316
|
...
|
|
217
317
|
|
|
218
|
-
def
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
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:
|
|
223
324
|
"""Return the base path for storing system files.
|
|
224
325
|
|
|
225
326
|
:param type: string in ['USER', 'LOCAL', 'SYSTEM'].
|
|
226
|
-
:type type:
|
|
327
|
+
:type type: str
|
|
227
328
|
:param major: major version, defaults to current.
|
|
228
|
-
:type major:
|
|
329
|
+
:type major: int
|
|
229
330
|
:param minor: minor version, defaults to current.
|
|
230
|
-
:type minor:
|
|
231
|
-
:rtype: str
|
|
331
|
+
:type minor: str
|
|
232
332
|
:return: the resource path (not necessarily existing).
|
|
333
|
+
:rtype: str
|
|
233
334
|
"""
|
|
234
335
|
|
|
235
336
|
...
|
|
@@ -239,92 +340,147 @@ def script_path_user():
|
|
|
239
340
|
|
|
240
341
|
...
|
|
241
342
|
|
|
343
|
+
def script_path_user():
|
|
344
|
+
""" """
|
|
345
|
+
|
|
346
|
+
...
|
|
347
|
+
|
|
242
348
|
def script_paths(
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
user_pref: typing.Optional[bool] = True,
|
|
246
|
-
check_all: typing.Optional[bool] = False,
|
|
247
|
-
use_user=True,
|
|
248
|
-
) -> typing.List:
|
|
349
|
+
subdir: str = None, user_pref: bool = True, check_all: bool = False, use_user=True
|
|
350
|
+
) -> list:
|
|
249
351
|
"""Returns a list of valid script paths.
|
|
250
352
|
|
|
251
353
|
:param subdir: Optional subdir.
|
|
252
|
-
:type subdir:
|
|
354
|
+
:type subdir: str
|
|
253
355
|
:param user_pref: Include the user preference script paths.
|
|
254
|
-
:type user_pref:
|
|
356
|
+
:type user_pref: bool
|
|
255
357
|
:param check_all: Include local, user and system paths rather just the paths Blender uses.
|
|
256
|
-
:type check_all:
|
|
257
|
-
:rtype: typing.List
|
|
358
|
+
:type check_all: bool
|
|
258
359
|
:return: script paths.
|
|
360
|
+
:rtype: list
|
|
259
361
|
"""
|
|
260
362
|
|
|
261
363
|
...
|
|
262
364
|
|
|
263
|
-
def
|
|
264
|
-
|
|
265
|
-
"""Returns an SMPTE formatted string from the *frame*: ``HH:MM:SS:FF``. If *fps* and *fps_base* are not given the current scene is used.
|
|
365
|
+
def script_paths(subdir, user_pref, check_all, use_user):
|
|
366
|
+
""" """
|
|
266
367
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
368
|
+
...
|
|
369
|
+
|
|
370
|
+
def script_paths_pref():
|
|
371
|
+
""" """
|
|
372
|
+
|
|
373
|
+
...
|
|
374
|
+
|
|
375
|
+
def smpte_from_frame(frame: int, fps=None, fps_base=None) -> str:
|
|
376
|
+
"""Returns an SMPTE formatted string from the frame:
|
|
377
|
+
HH:MM:SS:FF.If fps and fps_base are not given the current scene is used.
|
|
378
|
+
|
|
379
|
+
:param frame: frame number.
|
|
380
|
+
:type frame: int
|
|
381
|
+
:return: the frame string.
|
|
382
|
+
:rtype: str
|
|
271
383
|
"""
|
|
272
384
|
|
|
273
385
|
...
|
|
274
386
|
|
|
275
|
-
def
|
|
276
|
-
|
|
277
|
-
) -> str:
|
|
278
|
-
"""Returns an SMPTE formatted string from the *time*: ``HH:MM:SS:FF``. If *fps* and *fps_base* are not given the current scene is used.
|
|
387
|
+
def smpte_from_frame(frame, fps, fps_base):
|
|
388
|
+
""" """
|
|
279
389
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
390
|
+
...
|
|
391
|
+
|
|
392
|
+
def smpte_from_seconds(time: typing.Union[int, float], fps=None, fps_base=None) -> str:
|
|
393
|
+
"""Returns an SMPTE formatted string from the time:
|
|
394
|
+
HH:MM:SS:FF.If fps and fps_base are not given the current scene is used.
|
|
395
|
+
|
|
396
|
+
:param time: time in seconds.
|
|
397
|
+
:type time: typing.Union[int, float]
|
|
398
|
+
:return: the frame string.
|
|
399
|
+
:rtype: str
|
|
284
400
|
"""
|
|
285
401
|
|
|
286
402
|
...
|
|
287
403
|
|
|
288
|
-
def
|
|
289
|
-
|
|
290
|
-
def unescape_identifier(string: typing.Optional[str]) -> str:
|
|
291
|
-
"""Simple string un-escape function used for animation paths. This performs the reverse of `escape_identifier`.
|
|
404
|
+
def smpte_from_seconds(time, fps, fps_base):
|
|
405
|
+
""" """
|
|
292
406
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
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:
|
|
420
|
+
"""Simple string un-escape function used for animation paths.
|
|
421
|
+
This performs the reverse of escape_identifier.
|
|
422
|
+
|
|
423
|
+
:param string: text
|
|
424
|
+
:type string: str
|
|
425
|
+
:return: The un-escaped string.
|
|
426
|
+
:rtype: str
|
|
297
427
|
"""
|
|
298
428
|
|
|
299
429
|
...
|
|
300
430
|
|
|
301
|
-
def unregister_class(cls
|
|
431
|
+
def unregister_class(cls):
|
|
302
432
|
"""Unload the Python class from blender.
|
|
303
433
|
|
|
304
|
-
|
|
305
|
-
|
|
434
|
+
:param cls: Blender type class,
|
|
435
|
+
see `bpy.utils.register_class` for classes which can
|
|
436
|
+
be registered.
|
|
437
|
+
"""
|
|
438
|
+
|
|
439
|
+
...
|
|
440
|
+
|
|
441
|
+
def unregister_cli_command(handle):
|
|
442
|
+
"""Unregister a CLI command.
|
|
443
|
+
|
|
444
|
+
:param handle: The return value of `register_cli_command`.
|
|
306
445
|
"""
|
|
307
446
|
|
|
308
447
|
...
|
|
309
448
|
|
|
310
|
-
def unregister_manual_map(manual_hook):
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
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:
|
|
318
470
|
"""Return a user resource path (normally from the users home directory).
|
|
319
471
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
:return: a path.
|
|
472
|
+
:param path: Optional subdirectory.
|
|
473
|
+
:type path: str
|
|
474
|
+
:param create: Treat the path as a directory and create
|
|
475
|
+
it if its not existing.
|
|
476
|
+
:type create: bool
|
|
477
|
+
:return: a path.
|
|
478
|
+
:rtype: str
|
|
328
479
|
"""
|
|
329
480
|
|
|
330
481
|
...
|
|
482
|
+
|
|
483
|
+
def user_resource(resource_type, path, create):
|
|
484
|
+
""" """
|
|
485
|
+
|
|
486
|
+
...
|