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
bmesh/types/__init__.pyi
CHANGED
|
@@ -5,11 +5,13 @@ import mathutils
|
|
|
5
5
|
GenericType = typing.TypeVar("GenericType")
|
|
6
6
|
|
|
7
7
|
class BMDeformVert:
|
|
8
|
+
""" """
|
|
9
|
+
|
|
8
10
|
def clear(self):
|
|
9
11
|
"""Clears all weights."""
|
|
10
12
|
...
|
|
11
13
|
|
|
12
|
-
def get(self, key: int, default
|
|
14
|
+
def get(self, key: int, default=None):
|
|
13
15
|
"""Returns the deform weight matching the key or default
|
|
14
16
|
when not found (matches Python's dictionary function of the same name).
|
|
15
17
|
|
|
@@ -17,34 +19,32 @@ class BMDeformVert:
|
|
|
17
19
|
:type key: int
|
|
18
20
|
:param default: Optional argument for the value to return if
|
|
19
21
|
key is not found.
|
|
20
|
-
:type default: typing.Any
|
|
21
22
|
"""
|
|
22
23
|
...
|
|
23
24
|
|
|
24
|
-
def items(self)
|
|
25
|
+
def items(self):
|
|
25
26
|
"""Return (group, weight) pairs for this vertex
|
|
26
27
|
(matching Python's dict.items() functionality).
|
|
27
28
|
|
|
28
|
-
:rtype: typing.List
|
|
29
29
|
:return: (key, value) pairs for each deform weight of this vertex.
|
|
30
30
|
"""
|
|
31
31
|
...
|
|
32
32
|
|
|
33
|
-
def keys(self)
|
|
33
|
+
def keys(self):
|
|
34
34
|
"""Return the group indices used by this vertex
|
|
35
35
|
(matching Python's dict.keys() functionality).
|
|
36
36
|
|
|
37
|
-
:rtype: typing.List[int]
|
|
38
37
|
:return: the deform group this vertex uses
|
|
38
|
+
:rtype: typing.List[int]
|
|
39
39
|
"""
|
|
40
40
|
...
|
|
41
41
|
|
|
42
|
-
def values(self) -> typing.List[
|
|
42
|
+
def values(self) -> typing.List[int]:
|
|
43
43
|
"""Return the weights of the deform vertex
|
|
44
44
|
(matching Python's dict.values() functionality).
|
|
45
45
|
|
|
46
|
-
:rtype: typing.List[float]
|
|
47
46
|
:return: The weights that influence this vertex
|
|
47
|
+
:rtype: typing.List[float]
|
|
48
48
|
"""
|
|
49
49
|
...
|
|
50
50
|
|
|
@@ -99,16 +99,16 @@ class BMEdge:
|
|
|
99
99
|
:type: bool
|
|
100
100
|
"""
|
|
101
101
|
|
|
102
|
-
link_faces: typing.Union[
|
|
102
|
+
link_faces: typing.Union[typing.List[BMFace], BMElemSeq]
|
|
103
103
|
""" Faces connected to this edge, (read-only).
|
|
104
104
|
|
|
105
|
-
:type: typing.Union[
|
|
105
|
+
:type: typing.Union[typing.List[BMFace], BMElemSeq]
|
|
106
106
|
"""
|
|
107
107
|
|
|
108
|
-
link_loops: typing.Union[
|
|
108
|
+
link_loops: typing.Union[typing.List[BMLoop], BMElemSeq]
|
|
109
109
|
""" Loops connected to this edge, (read-only).
|
|
110
110
|
|
|
111
|
-
:type: typing.Union[
|
|
111
|
+
:type: typing.Union[typing.List[BMLoop], BMElemSeq]
|
|
112
112
|
"""
|
|
113
113
|
|
|
114
114
|
seam: bool
|
|
@@ -135,50 +135,50 @@ class BMEdge:
|
|
|
135
135
|
:type: bool
|
|
136
136
|
"""
|
|
137
137
|
|
|
138
|
-
verts: typing.Union[
|
|
138
|
+
verts: typing.Union[typing.List[BMVert], BMElemSeq]
|
|
139
139
|
""" Verts this edge uses (always 2), (read-only).
|
|
140
140
|
|
|
141
|
-
:type: typing.Union[
|
|
141
|
+
:type: typing.Union[typing.List[BMVert], BMElemSeq]
|
|
142
142
|
"""
|
|
143
143
|
|
|
144
|
-
def calc_face_angle(self, fallback: typing.Any = None) ->
|
|
144
|
+
def calc_face_angle(self, fallback: typing.Any = None) -> typing.Any:
|
|
145
145
|
"""
|
|
146
146
|
|
|
147
147
|
:param fallback: return this when the edge doesn't have 2 faces
|
|
148
148
|
(instead of raising a `ValueError`).
|
|
149
149
|
:type fallback: typing.Any
|
|
150
|
-
:rtype: float
|
|
151
150
|
:return: The angle between 2 connected faces in radians.
|
|
151
|
+
:rtype: float
|
|
152
152
|
"""
|
|
153
153
|
...
|
|
154
154
|
|
|
155
|
-
def calc_face_angle_signed(self, fallback: typing.Any = None) ->
|
|
155
|
+
def calc_face_angle_signed(self, fallback: typing.Any = None) -> typing.Any:
|
|
156
156
|
"""
|
|
157
157
|
|
|
158
158
|
:param fallback: return this when the edge doesn't have 2 faces
|
|
159
159
|
(instead of raising a `ValueError`).
|
|
160
160
|
:type fallback: typing.Any
|
|
161
|
-
:rtype: float
|
|
162
161
|
:return: The angle between 2 connected faces in radians (negative for concave join).
|
|
162
|
+
:rtype: float
|
|
163
163
|
"""
|
|
164
164
|
...
|
|
165
165
|
|
|
166
166
|
def calc_length(self) -> float:
|
|
167
167
|
"""
|
|
168
168
|
|
|
169
|
-
:rtype: float
|
|
170
169
|
:return: The length between both verts.
|
|
170
|
+
:rtype: float
|
|
171
171
|
"""
|
|
172
172
|
...
|
|
173
173
|
|
|
174
|
-
def calc_tangent(self, loop:
|
|
174
|
+
def calc_tangent(self, loop: BMLoop) -> BMLoop:
|
|
175
175
|
"""Return the tangent at this edge relative to a face (pointing inward into the face).
|
|
176
176
|
This uses the face normal for calculation.
|
|
177
177
|
|
|
178
178
|
:param loop: The loop used for tangent calculation.
|
|
179
|
-
:type loop:
|
|
180
|
-
:rtype: 'mathutils.Vector'
|
|
179
|
+
:type loop: BMLoop
|
|
181
180
|
:return: a normalized vector.
|
|
181
|
+
:rtype: mathutils.Vector
|
|
182
182
|
"""
|
|
183
183
|
...
|
|
184
184
|
|
|
@@ -186,7 +186,6 @@ class BMEdge:
|
|
|
186
186
|
"""Copy values from another element of matching type.
|
|
187
187
|
|
|
188
188
|
:param other:
|
|
189
|
-
:type other:
|
|
190
189
|
"""
|
|
191
190
|
...
|
|
192
191
|
|
|
@@ -203,12 +202,11 @@ class BMEdge:
|
|
|
203
202
|
"""Update normals of all connected faces and the edge verts."""
|
|
204
203
|
...
|
|
205
204
|
|
|
206
|
-
def other_vert(self, vert:
|
|
205
|
+
def other_vert(self, vert: BMVert) -> BMVert:
|
|
207
206
|
"""Return the other vertex on this edge or None if the vertex is not used by this edge.
|
|
208
207
|
|
|
209
208
|
:param vert: a vert in this edge.
|
|
210
|
-
:type vert:
|
|
211
|
-
:rtype: 'BMVert'
|
|
209
|
+
:type vert: BMVert
|
|
212
210
|
:return: The edges other vert.
|
|
213
211
|
"""
|
|
214
212
|
...
|
|
@@ -223,25 +221,26 @@ class BMEdge:
|
|
|
223
221
|
...
|
|
224
222
|
|
|
225
223
|
class BMEdgeSeq:
|
|
226
|
-
|
|
224
|
+
""" """
|
|
225
|
+
|
|
226
|
+
layers: BMLayerAccessEdge
|
|
227
227
|
""" custom-data layers (read-only).
|
|
228
228
|
|
|
229
|
-
:type:
|
|
229
|
+
:type: BMLayerAccessEdge
|
|
230
230
|
"""
|
|
231
231
|
|
|
232
232
|
def ensure_lookup_table(self):
|
|
233
233
|
"""Ensure internal data needed for int subscription is initialized with verts/edges/faces, eg bm.verts[index].This needs to be called again after adding/removing data in this sequence."""
|
|
234
234
|
...
|
|
235
235
|
|
|
236
|
-
def get(self, verts:
|
|
236
|
+
def get(self, verts: BMVert, fallback=None):
|
|
237
237
|
"""Return an edge which uses the verts passed.
|
|
238
238
|
|
|
239
239
|
:param verts: Sequence of verts.
|
|
240
|
-
:type verts:
|
|
240
|
+
:type verts: BMVert
|
|
241
241
|
:param fallback: Return this value if nothing is found.
|
|
242
|
-
:type fallback:
|
|
243
|
-
:rtype: 'BMEdge'
|
|
244
242
|
:return: The edge found or None
|
|
243
|
+
:rtype: BMEdge
|
|
245
244
|
"""
|
|
246
245
|
...
|
|
247
246
|
|
|
@@ -249,15 +248,14 @@ class BMEdgeSeq:
|
|
|
249
248
|
"""Initialize the index values of this sequence.This is the equivalent of looping over all elements and assigning the index values."""
|
|
250
249
|
...
|
|
251
250
|
|
|
252
|
-
def new(self, verts
|
|
251
|
+
def new(self, verts, example: BMEdge = None) -> BMEdge:
|
|
253
252
|
"""Create a new edge from a given pair of verts.
|
|
254
253
|
|
|
255
254
|
:param verts: Vertex pair.
|
|
256
|
-
:type verts: 'BMVert'
|
|
257
255
|
:param example: Existing edge to initialize settings (optional argument).
|
|
258
|
-
:type example:
|
|
259
|
-
:rtype: 'BMEdge'
|
|
256
|
+
:type example: BMEdge
|
|
260
257
|
:return: The newly created edge.
|
|
258
|
+
:rtype: BMEdge
|
|
261
259
|
"""
|
|
262
260
|
...
|
|
263
261
|
|
|
@@ -265,84 +263,90 @@ class BMEdgeSeq:
|
|
|
265
263
|
"""Remove an edge.
|
|
266
264
|
|
|
267
265
|
:param edge:
|
|
268
|
-
:type edge:
|
|
269
266
|
"""
|
|
270
267
|
...
|
|
271
268
|
|
|
272
|
-
def sort(self, key
|
|
269
|
+
def sort(self, key=None, reverse=False):
|
|
273
270
|
"""Sort the elements of this sequence, using an optional custom sort key.
|
|
274
271
|
Indices of elements are not changed, BMElemeSeq.index_update() can be used for that.
|
|
275
272
|
|
|
276
273
|
:param key: The key that sets the ordering of the elements.
|
|
277
|
-
:type key: typing.Any
|
|
278
274
|
:param reverse: Reverse the order of the elements
|
|
279
|
-
:type reverse: typing.Any
|
|
280
275
|
"""
|
|
281
276
|
...
|
|
282
277
|
|
|
283
|
-
def __getitem__(self, key: int) ->
|
|
278
|
+
def __getitem__(self, key: int) -> int:
|
|
284
279
|
"""
|
|
285
280
|
|
|
286
281
|
:param key:
|
|
287
282
|
:type key: int
|
|
288
|
-
:
|
|
283
|
+
:return:
|
|
284
|
+
:rtype: BMEdge
|
|
289
285
|
"""
|
|
290
286
|
...
|
|
291
287
|
|
|
292
|
-
def __setitem__(self, key: int, value:
|
|
288
|
+
def __setitem__(self, key: int, value: BMEdge):
|
|
293
289
|
"""
|
|
294
290
|
|
|
295
291
|
:param key:
|
|
296
292
|
:type key: int
|
|
297
293
|
:param value:
|
|
298
|
-
:type value:
|
|
294
|
+
:type value: BMEdge
|
|
299
295
|
"""
|
|
300
296
|
...
|
|
301
297
|
|
|
302
|
-
def __delitem__(self, key: int) ->
|
|
298
|
+
def __delitem__(self, key: int) -> int:
|
|
303
299
|
"""
|
|
304
300
|
|
|
305
301
|
:param key:
|
|
306
302
|
:type key: int
|
|
307
|
-
:
|
|
303
|
+
:return:
|
|
304
|
+
:rtype: BMEdge
|
|
308
305
|
"""
|
|
309
306
|
...
|
|
310
307
|
|
|
311
|
-
def __iter__(self) ->
|
|
308
|
+
def __iter__(self) -> BMEdge:
|
|
312
309
|
"""
|
|
313
310
|
|
|
311
|
+
:return:
|
|
314
312
|
:rtype: typing.Iterator[GenericType]
|
|
315
313
|
"""
|
|
316
314
|
...
|
|
317
315
|
|
|
318
|
-
def __next__(self) -> GenericType:
|
|
316
|
+
def __next__(self) -> typing.Iterator[GenericType]:
|
|
319
317
|
"""
|
|
320
318
|
|
|
319
|
+
:return:
|
|
321
320
|
:rtype: GenericType
|
|
322
321
|
"""
|
|
323
322
|
...
|
|
324
323
|
|
|
325
|
-
def __len__(self) ->
|
|
324
|
+
def __len__(self) -> GenericType:
|
|
326
325
|
"""
|
|
327
326
|
|
|
327
|
+
:return:
|
|
328
328
|
:rtype: int
|
|
329
329
|
"""
|
|
330
330
|
...
|
|
331
331
|
|
|
332
|
-
class BMEditSelIter:
|
|
332
|
+
class BMEditSelIter:
|
|
333
|
+
""" """
|
|
334
|
+
|
|
335
|
+
...
|
|
333
336
|
|
|
334
337
|
class BMEditSelSeq:
|
|
335
|
-
|
|
338
|
+
""" """
|
|
339
|
+
|
|
340
|
+
active: typing.Union[BMVert, BMEdge, BMFace]
|
|
336
341
|
""" The last selected element or None (read-only).
|
|
337
342
|
|
|
338
|
-
:type: typing.Union[
|
|
343
|
+
:type: typing.Union[BMVert, BMEdge, BMFace]
|
|
339
344
|
"""
|
|
340
345
|
|
|
341
346
|
def add(self, element):
|
|
342
347
|
"""Add an element to the selection history (no action taken if its already added).
|
|
343
348
|
|
|
344
349
|
:param element:
|
|
345
|
-
:type element:
|
|
346
350
|
"""
|
|
347
351
|
...
|
|
348
352
|
|
|
@@ -354,7 +358,6 @@ class BMEditSelSeq:
|
|
|
354
358
|
"""Discard an element from the selection history.Like remove but doesn't raise an error when the elements not in the selection list.
|
|
355
359
|
|
|
356
360
|
:param element:
|
|
357
|
-
:type element:
|
|
358
361
|
"""
|
|
359
362
|
...
|
|
360
363
|
|
|
@@ -362,7 +365,6 @@ class BMEditSelSeq:
|
|
|
362
365
|
"""Remove an element from the selection history.
|
|
363
366
|
|
|
364
367
|
:param element:
|
|
365
|
-
:type element:
|
|
366
368
|
"""
|
|
367
369
|
...
|
|
368
370
|
|
|
@@ -380,11 +382,12 @@ class BMElemSeq:
|
|
|
380
382
|
"""Initialize the index values of this sequence.This is the equivalent of looping over all elements and assigning the index values."""
|
|
381
383
|
...
|
|
382
384
|
|
|
383
|
-
def __getitem__(self, key: int) ->
|
|
385
|
+
def __getitem__(self, key: int) -> int:
|
|
384
386
|
"""
|
|
385
387
|
|
|
386
388
|
:param key:
|
|
387
389
|
:type key: int
|
|
390
|
+
:return:
|
|
388
391
|
:rtype: GenericType
|
|
389
392
|
"""
|
|
390
393
|
...
|
|
@@ -399,32 +402,36 @@ class BMElemSeq:
|
|
|
399
402
|
"""
|
|
400
403
|
...
|
|
401
404
|
|
|
402
|
-
def __delitem__(self, key: int) ->
|
|
405
|
+
def __delitem__(self, key: int) -> int:
|
|
403
406
|
"""
|
|
404
407
|
|
|
405
408
|
:param key:
|
|
406
409
|
:type key: int
|
|
410
|
+
:return:
|
|
407
411
|
:rtype: GenericType
|
|
408
412
|
"""
|
|
409
413
|
...
|
|
410
414
|
|
|
411
|
-
def __iter__(self) ->
|
|
415
|
+
def __iter__(self) -> GenericType:
|
|
412
416
|
"""
|
|
413
417
|
|
|
418
|
+
:return:
|
|
414
419
|
:rtype: typing.Iterator[GenericType]
|
|
415
420
|
"""
|
|
416
421
|
...
|
|
417
422
|
|
|
418
|
-
def __next__(self) -> GenericType:
|
|
423
|
+
def __next__(self) -> typing.Iterator[GenericType]:
|
|
419
424
|
"""
|
|
420
425
|
|
|
426
|
+
:return:
|
|
421
427
|
:rtype: GenericType
|
|
422
428
|
"""
|
|
423
429
|
...
|
|
424
430
|
|
|
425
|
-
def __len__(self) ->
|
|
431
|
+
def __len__(self) -> GenericType:
|
|
426
432
|
"""
|
|
427
433
|
|
|
434
|
+
:return:
|
|
428
435
|
:rtype: int
|
|
429
436
|
"""
|
|
430
437
|
...
|
|
@@ -432,10 +439,10 @@ class BMElemSeq:
|
|
|
432
439
|
class BMFace:
|
|
433
440
|
"""The BMesh face with 3 or more sides"""
|
|
434
441
|
|
|
435
|
-
edges: typing.Union[
|
|
442
|
+
edges: typing.Union[typing.List[BMEdge], BMElemSeq]
|
|
436
443
|
""" Edges of this face, (read-only).
|
|
437
444
|
|
|
438
|
-
:type: typing.Union[
|
|
445
|
+
:type: typing.Union[typing.List[BMEdge], BMElemSeq]
|
|
439
446
|
"""
|
|
440
447
|
|
|
441
448
|
hide: bool
|
|
@@ -456,10 +463,10 @@ class BMFace:
|
|
|
456
463
|
:type: bool
|
|
457
464
|
"""
|
|
458
465
|
|
|
459
|
-
loops: typing.Union[
|
|
466
|
+
loops: typing.Union[typing.List[BMLoop], BMElemSeq]
|
|
460
467
|
""" Loops of this face, (read-only).
|
|
461
468
|
|
|
462
|
-
:type: typing.Union[
|
|
469
|
+
:type: typing.Union[typing.List[BMLoop], BMElemSeq]
|
|
463
470
|
"""
|
|
464
471
|
|
|
465
472
|
material_index: int
|
|
@@ -468,10 +475,10 @@ class BMFace:
|
|
|
468
475
|
:type: int
|
|
469
476
|
"""
|
|
470
477
|
|
|
471
|
-
normal: typing.Union[
|
|
478
|
+
normal: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
472
479
|
""" The normal for this face as a 3D, wrapped vector.
|
|
473
480
|
|
|
474
|
-
:type: typing.Union[
|
|
481
|
+
:type: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
475
482
|
"""
|
|
476
483
|
|
|
477
484
|
select: bool
|
|
@@ -492,93 +499,93 @@ class BMFace:
|
|
|
492
499
|
:type: bool
|
|
493
500
|
"""
|
|
494
501
|
|
|
495
|
-
verts: typing.Union[
|
|
502
|
+
verts: typing.Union[typing.List[BMVert], BMElemSeq]
|
|
496
503
|
""" Verts of this face, (read-only).
|
|
497
504
|
|
|
498
|
-
:type: typing.Union[
|
|
505
|
+
:type: typing.Union[typing.List[BMVert], BMElemSeq]
|
|
499
506
|
"""
|
|
500
507
|
|
|
501
|
-
def calc_area(self) ->
|
|
508
|
+
def calc_area(self) -> typing.Union[typing.List[BMVert], BMElemSeq]:
|
|
502
509
|
"""Return the area of the face.
|
|
503
510
|
|
|
504
|
-
:rtype: float
|
|
505
511
|
:return: Return the area of the face.
|
|
512
|
+
:rtype: float
|
|
506
513
|
"""
|
|
507
514
|
...
|
|
508
515
|
|
|
509
|
-
def calc_center_bounds(self) ->
|
|
516
|
+
def calc_center_bounds(self) -> float:
|
|
510
517
|
"""Return bounds center of the face.
|
|
511
518
|
|
|
512
|
-
:rtype: 'mathutils.Vector'
|
|
513
519
|
:return: a 3D vector.
|
|
520
|
+
:rtype: mathutils.Vector
|
|
514
521
|
"""
|
|
515
522
|
...
|
|
516
523
|
|
|
517
|
-
def calc_center_median(self) ->
|
|
524
|
+
def calc_center_median(self) -> mathutils.Vector:
|
|
518
525
|
"""Return median center of the face.
|
|
519
526
|
|
|
520
|
-
:rtype: 'mathutils.Vector'
|
|
521
527
|
:return: a 3D vector.
|
|
528
|
+
:rtype: mathutils.Vector
|
|
522
529
|
"""
|
|
523
530
|
...
|
|
524
531
|
|
|
525
|
-
def calc_center_median_weighted(self) ->
|
|
532
|
+
def calc_center_median_weighted(self) -> mathutils.Vector:
|
|
526
533
|
"""Return median center of the face weighted by edge lengths.
|
|
527
534
|
|
|
528
|
-
:rtype: 'mathutils.Vector'
|
|
529
535
|
:return: a 3D vector.
|
|
536
|
+
:rtype: mathutils.Vector
|
|
530
537
|
"""
|
|
531
538
|
...
|
|
532
539
|
|
|
533
|
-
def calc_perimeter(self) ->
|
|
540
|
+
def calc_perimeter(self) -> mathutils.Vector:
|
|
534
541
|
"""Return the perimeter of the face.
|
|
535
542
|
|
|
536
|
-
:rtype: float
|
|
537
543
|
:return: Return the perimeter of the face.
|
|
544
|
+
:rtype: float
|
|
538
545
|
"""
|
|
539
546
|
...
|
|
540
547
|
|
|
541
|
-
def calc_tangent_edge(self) ->
|
|
548
|
+
def calc_tangent_edge(self) -> float:
|
|
542
549
|
"""Return face tangent based on longest edge.
|
|
543
550
|
|
|
544
|
-
:rtype: 'mathutils.Vector'
|
|
545
551
|
:return: a normalized vector.
|
|
552
|
+
:rtype: mathutils.Vector
|
|
546
553
|
"""
|
|
547
554
|
...
|
|
548
555
|
|
|
549
|
-
def calc_tangent_edge_diagonal(self) ->
|
|
556
|
+
def calc_tangent_edge_diagonal(self) -> mathutils.Vector:
|
|
550
557
|
"""Return face tangent based on the edge farthest from any vertex.
|
|
551
558
|
|
|
552
|
-
:rtype: 'mathutils.Vector'
|
|
553
559
|
:return: a normalized vector.
|
|
560
|
+
:rtype: mathutils.Vector
|
|
554
561
|
"""
|
|
555
562
|
...
|
|
556
563
|
|
|
557
|
-
def calc_tangent_edge_pair(self) ->
|
|
564
|
+
def calc_tangent_edge_pair(self) -> mathutils.Vector:
|
|
558
565
|
"""Return face tangent based on the two longest disconnected edges.
|
|
559
566
|
|
|
560
|
-
:rtype: 'mathutils.Vector'
|
|
561
567
|
:return: a normalized vector.
|
|
568
|
+
:rtype: mathutils.Vector
|
|
562
569
|
"""
|
|
563
570
|
...
|
|
564
571
|
|
|
565
|
-
def calc_tangent_vert_diagonal(self) ->
|
|
572
|
+
def calc_tangent_vert_diagonal(self) -> mathutils.Vector:
|
|
566
573
|
"""Return face tangent based on the two most distant vertices.
|
|
567
574
|
|
|
568
|
-
:rtype: 'mathutils.Vector'
|
|
569
575
|
:return: a normalized vector.
|
|
576
|
+
:rtype: mathutils.Vector
|
|
570
577
|
"""
|
|
571
578
|
...
|
|
572
579
|
|
|
573
|
-
def copy(self, verts: bool = True, edges: bool = True) ->
|
|
580
|
+
def copy(self, verts: bool = True, edges: bool = True) -> bool:
|
|
574
581
|
"""Make a copy of this face.
|
|
575
582
|
|
|
576
583
|
:param verts: When set, the faces verts will be duplicated too.
|
|
577
584
|
:type verts: bool
|
|
578
585
|
:param edges: When set, the faces edges will be duplicated too.
|
|
579
586
|
:type edges: bool
|
|
580
|
-
:rtype: 'BMFace'
|
|
581
587
|
:return: The newly created face.
|
|
588
|
+
:rtype: BMFace
|
|
582
589
|
"""
|
|
583
590
|
...
|
|
584
591
|
|
|
@@ -586,15 +593,14 @@ class BMFace:
|
|
|
586
593
|
"""Copy values from another element of matching type.
|
|
587
594
|
|
|
588
595
|
:param other:
|
|
589
|
-
:type other:
|
|
590
596
|
"""
|
|
591
597
|
...
|
|
592
598
|
|
|
593
|
-
def copy_from_face_interp(self, face:
|
|
599
|
+
def copy_from_face_interp(self, face: BMFace, vert: bool = True):
|
|
594
600
|
"""Interpolate the customdata from another face onto this one (faces should overlap).
|
|
595
601
|
|
|
596
602
|
:param face: The face to interpolate data from.
|
|
597
|
-
:type face:
|
|
603
|
+
:type face: BMFace
|
|
598
604
|
:param vert: When True, also copy vertex data.
|
|
599
605
|
:type vert: bool
|
|
600
606
|
"""
|
|
@@ -630,31 +636,29 @@ class BMFace:
|
|
|
630
636
|
...
|
|
631
637
|
|
|
632
638
|
class BMFaceSeq:
|
|
633
|
-
|
|
634
|
-
""" active face.
|
|
639
|
+
""" """
|
|
635
640
|
|
|
636
|
-
:
|
|
637
|
-
"""
|
|
641
|
+
active: typing.Any
|
|
642
|
+
""" active face."""
|
|
638
643
|
|
|
639
|
-
layers:
|
|
644
|
+
layers: BMLayerAccessFace
|
|
640
645
|
""" custom-data layers (read-only).
|
|
641
646
|
|
|
642
|
-
:type:
|
|
647
|
+
:type: BMLayerAccessFace
|
|
643
648
|
"""
|
|
644
649
|
|
|
645
650
|
def ensure_lookup_table(self):
|
|
646
651
|
"""Ensure internal data needed for int subscription is initialized with verts/edges/faces, eg bm.verts[index].This needs to be called again after adding/removing data in this sequence."""
|
|
647
652
|
...
|
|
648
653
|
|
|
649
|
-
def get(self, verts:
|
|
654
|
+
def get(self, verts: BMVert, fallback=None):
|
|
650
655
|
"""Return a face which uses the verts passed.
|
|
651
656
|
|
|
652
657
|
:param verts: Sequence of verts.
|
|
653
|
-
:type verts:
|
|
658
|
+
:type verts: BMVert
|
|
654
659
|
:param fallback: Return this value if nothing is found.
|
|
655
|
-
:type fallback:
|
|
656
|
-
:rtype: 'BMFace'
|
|
657
660
|
:return: The face found or None
|
|
661
|
+
:rtype: BMFace
|
|
658
662
|
"""
|
|
659
663
|
...
|
|
660
664
|
|
|
@@ -662,17 +666,15 @@ class BMFaceSeq:
|
|
|
662
666
|
"""Initialize the index values of this sequence.This is the equivalent of looping over all elements and assigning the index values."""
|
|
663
667
|
...
|
|
664
668
|
|
|
665
|
-
def new(
|
|
666
|
-
self, verts: typing.Iterable["BMVert"], example: "BMFace" = None
|
|
667
|
-
) -> "BMFace":
|
|
669
|
+
def new(self, verts: typing.Iterable[BMVert], example: BMFace = None) -> BMFace:
|
|
668
670
|
"""Create a new face from a given set of verts.
|
|
669
671
|
|
|
670
672
|
:param verts: Sequence of 3 or more verts.
|
|
671
|
-
:type verts: typing.Iterable[
|
|
673
|
+
:type verts: typing.Iterable[BMVert]
|
|
672
674
|
:param example: Existing face to initialize settings (optional argument).
|
|
673
|
-
:type example:
|
|
674
|
-
:rtype: 'BMFace'
|
|
675
|
+
:type example: BMFace
|
|
675
676
|
:return: The newly created face.
|
|
677
|
+
:rtype: BMFace
|
|
676
678
|
"""
|
|
677
679
|
...
|
|
678
680
|
|
|
@@ -680,66 +682,68 @@ class BMFaceSeq:
|
|
|
680
682
|
"""Remove a face.
|
|
681
683
|
|
|
682
684
|
:param face:
|
|
683
|
-
:type face:
|
|
684
685
|
"""
|
|
685
686
|
...
|
|
686
687
|
|
|
687
|
-
def sort(self, key
|
|
688
|
+
def sort(self, key=None, reverse=False):
|
|
688
689
|
"""Sort the elements of this sequence, using an optional custom sort key.
|
|
689
690
|
Indices of elements are not changed, BMElemeSeq.index_update() can be used for that.
|
|
690
691
|
|
|
691
692
|
:param key: The key that sets the ordering of the elements.
|
|
692
|
-
:type key: typing.Any
|
|
693
693
|
:param reverse: Reverse the order of the elements
|
|
694
|
-
:type reverse: typing.Any
|
|
695
694
|
"""
|
|
696
695
|
...
|
|
697
696
|
|
|
698
|
-
def __getitem__(self, key: int) ->
|
|
697
|
+
def __getitem__(self, key: int) -> int:
|
|
699
698
|
"""
|
|
700
699
|
|
|
701
700
|
:param key:
|
|
702
701
|
:type key: int
|
|
703
|
-
:
|
|
702
|
+
:return:
|
|
703
|
+
:rtype: BMFace
|
|
704
704
|
"""
|
|
705
705
|
...
|
|
706
706
|
|
|
707
|
-
def __setitem__(self, key: int, value:
|
|
707
|
+
def __setitem__(self, key: int, value: BMFace):
|
|
708
708
|
"""
|
|
709
709
|
|
|
710
710
|
:param key:
|
|
711
711
|
:type key: int
|
|
712
712
|
:param value:
|
|
713
|
-
:type value:
|
|
713
|
+
:type value: BMFace
|
|
714
714
|
"""
|
|
715
715
|
...
|
|
716
716
|
|
|
717
|
-
def __delitem__(self, key: int) ->
|
|
717
|
+
def __delitem__(self, key: int) -> int:
|
|
718
718
|
"""
|
|
719
719
|
|
|
720
720
|
:param key:
|
|
721
721
|
:type key: int
|
|
722
|
-
:
|
|
722
|
+
:return:
|
|
723
|
+
:rtype: BMFace
|
|
723
724
|
"""
|
|
724
725
|
...
|
|
725
726
|
|
|
726
|
-
def __iter__(self) ->
|
|
727
|
+
def __iter__(self) -> BMFace:
|
|
727
728
|
"""
|
|
728
729
|
|
|
730
|
+
:return:
|
|
729
731
|
:rtype: typing.Iterator[GenericType]
|
|
730
732
|
"""
|
|
731
733
|
...
|
|
732
734
|
|
|
733
|
-
def __next__(self) -> GenericType:
|
|
735
|
+
def __next__(self) -> typing.Iterator[GenericType]:
|
|
734
736
|
"""
|
|
735
737
|
|
|
738
|
+
:return:
|
|
736
739
|
:rtype: GenericType
|
|
737
740
|
"""
|
|
738
741
|
...
|
|
739
742
|
|
|
740
|
-
def __len__(self) ->
|
|
743
|
+
def __len__(self) -> GenericType:
|
|
741
744
|
"""
|
|
742
745
|
|
|
746
|
+
:return:
|
|
743
747
|
:rtype: int
|
|
744
748
|
"""
|
|
745
749
|
...
|
|
@@ -844,10 +848,10 @@ class BMLayerAccessVert:
|
|
|
844
848
|
int: typing.Any
|
|
845
849
|
""" Generic int custom-data layer.type: `BMLayerCollection`"""
|
|
846
850
|
|
|
847
|
-
shape:
|
|
851
|
+
shape: BMLayerCollection
|
|
848
852
|
""" Vertex shapekey absolute location (as a 3D Vector).
|
|
849
853
|
|
|
850
|
-
:type:
|
|
854
|
+
:type: BMLayerCollection
|
|
851
855
|
"""
|
|
852
856
|
|
|
853
857
|
skin: typing.Any
|
|
@@ -859,10 +863,10 @@ class BMLayerAccessVert:
|
|
|
859
863
|
class BMLayerCollection:
|
|
860
864
|
"""Gives access to a collection of custom-data layers of the same type and behaves like Python dictionaries, except for the ability to do list like index access."""
|
|
861
865
|
|
|
862
|
-
active:
|
|
866
|
+
active: BMLayerItem
|
|
863
867
|
""" The active layer of this type (read-only).
|
|
864
868
|
|
|
865
|
-
:type:
|
|
869
|
+
:type: BMLayerItem
|
|
866
870
|
"""
|
|
867
871
|
|
|
868
872
|
is_singleton: bool
|
|
@@ -871,7 +875,7 @@ class BMLayerCollection:
|
|
|
871
875
|
:type: bool
|
|
872
876
|
"""
|
|
873
877
|
|
|
874
|
-
def get(self, key: str, default
|
|
878
|
+
def get(self, key: str, default=None):
|
|
875
879
|
"""Returns the value of the layer matching the key or default
|
|
876
880
|
when not found (matches Python's dictionary function of the same name).
|
|
877
881
|
|
|
@@ -879,60 +883,58 @@ class BMLayerCollection:
|
|
|
879
883
|
:type key: str
|
|
880
884
|
:param default: Optional argument for the value to return if
|
|
881
885
|
key is not found.
|
|
882
|
-
:type default: typing.Any
|
|
883
886
|
"""
|
|
884
887
|
...
|
|
885
888
|
|
|
886
|
-
def items(self)
|
|
889
|
+
def items(self):
|
|
887
890
|
"""Return the identifiers of collection members
|
|
888
891
|
(matching Python's dict.items() functionality).
|
|
889
892
|
|
|
890
|
-
:rtype: typing.List
|
|
891
893
|
:return: (key, value) pairs for each member of this collection.
|
|
892
894
|
"""
|
|
893
895
|
...
|
|
894
896
|
|
|
895
|
-
def keys(self)
|
|
897
|
+
def keys(self):
|
|
896
898
|
"""Return the identifiers of collection members
|
|
897
899
|
(matching Python's dict.keys() functionality).
|
|
898
900
|
|
|
899
|
-
:rtype: typing.List[str]
|
|
900
901
|
:return: the identifiers for each member of this collection.
|
|
902
|
+
:rtype: typing.List[str]
|
|
901
903
|
"""
|
|
902
904
|
...
|
|
903
905
|
|
|
904
|
-
def new(self, name: str) ->
|
|
906
|
+
def new(self, name: str) -> str:
|
|
905
907
|
"""Create a new layer
|
|
906
908
|
|
|
907
909
|
:param name: Optional name argument (will be made unique).
|
|
908
910
|
:type name: str
|
|
909
|
-
:rtype: 'BMLayerItem'
|
|
910
911
|
:return: The newly created layer.
|
|
912
|
+
:rtype: BMLayerItem
|
|
911
913
|
"""
|
|
912
914
|
...
|
|
913
915
|
|
|
914
|
-
def remove(self, layer:
|
|
916
|
+
def remove(self, layer: BMLayerItem):
|
|
915
917
|
"""Remove a layer
|
|
916
918
|
|
|
917
919
|
:param layer: The layer to remove.
|
|
918
|
-
:type layer:
|
|
920
|
+
:type layer: BMLayerItem
|
|
919
921
|
"""
|
|
920
922
|
...
|
|
921
923
|
|
|
922
|
-
def values(self) ->
|
|
924
|
+
def values(self) -> BMLayerItem:
|
|
923
925
|
"""Return the values of collection
|
|
924
926
|
(matching Python's dict.values() functionality).
|
|
925
927
|
|
|
926
|
-
:rtype: typing.List
|
|
927
928
|
:return: the members of this collection.
|
|
929
|
+
:rtype: list
|
|
928
930
|
"""
|
|
929
931
|
...
|
|
930
932
|
|
|
931
|
-
def verify(self) ->
|
|
933
|
+
def verify(self) -> list:
|
|
932
934
|
"""Create a new layer or return an existing active layer
|
|
933
935
|
|
|
934
|
-
:rtype: 'BMLayerItem'
|
|
935
936
|
:return: The newly verified layer.
|
|
937
|
+
:rtype: BMLayerItem
|
|
936
938
|
"""
|
|
937
939
|
...
|
|
938
940
|
|
|
@@ -949,23 +951,22 @@ class BMLayerItem:
|
|
|
949
951
|
"""Return a copy of the layer
|
|
950
952
|
|
|
951
953
|
:param other: Another layer to copy from.`BMLayerItem`
|
|
952
|
-
:type other:
|
|
953
954
|
"""
|
|
954
955
|
...
|
|
955
956
|
|
|
956
957
|
class BMLoop:
|
|
957
958
|
"""This is normally accessed from `BMFace.loops` where each face loop represents a corner of the face."""
|
|
958
959
|
|
|
959
|
-
edge:
|
|
960
|
+
edge: BMEdge
|
|
960
961
|
""" The loop's edge (between this loop and the next), (read-only).
|
|
961
962
|
|
|
962
|
-
:type:
|
|
963
|
+
:type: BMEdge
|
|
963
964
|
"""
|
|
964
965
|
|
|
965
|
-
face:
|
|
966
|
+
face: BMFace
|
|
966
967
|
""" The face this loop makes (read-only).
|
|
967
968
|
|
|
968
|
-
:type:
|
|
969
|
+
:type: BMFace
|
|
969
970
|
"""
|
|
970
971
|
|
|
971
972
|
index: int
|
|
@@ -986,34 +987,34 @@ class BMLoop:
|
|
|
986
987
|
:type: bool
|
|
987
988
|
"""
|
|
988
989
|
|
|
989
|
-
link_loop_next:
|
|
990
|
+
link_loop_next: BMLoop
|
|
990
991
|
""" The next face corner (read-only).
|
|
991
992
|
|
|
992
|
-
:type:
|
|
993
|
+
:type: BMLoop
|
|
993
994
|
"""
|
|
994
995
|
|
|
995
|
-
link_loop_prev:
|
|
996
|
+
link_loop_prev: BMLoop
|
|
996
997
|
""" The previous face corner (read-only).
|
|
997
998
|
|
|
998
|
-
:type:
|
|
999
|
+
:type: BMLoop
|
|
999
1000
|
"""
|
|
1000
1001
|
|
|
1001
|
-
link_loop_radial_next:
|
|
1002
|
+
link_loop_radial_next: BMLoop
|
|
1002
1003
|
""" The next loop around the edge (read-only).
|
|
1003
1004
|
|
|
1004
|
-
:type:
|
|
1005
|
+
:type: BMLoop
|
|
1005
1006
|
"""
|
|
1006
1007
|
|
|
1007
|
-
link_loop_radial_prev:
|
|
1008
|
+
link_loop_radial_prev: BMLoop
|
|
1008
1009
|
""" The previous loop around the edge (read-only).
|
|
1009
1010
|
|
|
1010
|
-
:type:
|
|
1011
|
+
:type: BMLoop
|
|
1011
1012
|
"""
|
|
1012
1013
|
|
|
1013
|
-
link_loops: typing.Union[
|
|
1014
|
+
link_loops: typing.Union[typing.List[BMLoop], BMElemSeq]
|
|
1014
1015
|
""" Loops connected to this loop, (read-only).
|
|
1015
1016
|
|
|
1016
|
-
:type: typing.Union[
|
|
1017
|
+
:type: typing.Union[typing.List[BMLoop], BMElemSeq]
|
|
1017
1018
|
"""
|
|
1018
1019
|
|
|
1019
1020
|
tag: bool
|
|
@@ -1022,36 +1023,36 @@ class BMLoop:
|
|
|
1022
1023
|
:type: bool
|
|
1023
1024
|
"""
|
|
1024
1025
|
|
|
1025
|
-
vert:
|
|
1026
|
+
vert: BMVert
|
|
1026
1027
|
""" The loop's vertex (read-only).
|
|
1027
1028
|
|
|
1028
|
-
:type:
|
|
1029
|
+
:type: BMVert
|
|
1029
1030
|
"""
|
|
1030
1031
|
|
|
1031
|
-
def calc_angle(self) ->
|
|
1032
|
+
def calc_angle(self) -> BMVert:
|
|
1032
1033
|
"""Return the angle at this loops corner of the face.
|
|
1033
1034
|
This is calculated so sharper corners give lower angles.
|
|
1034
1035
|
|
|
1035
|
-
:rtype: float
|
|
1036
1036
|
:return: The angle in radians.
|
|
1037
|
+
:rtype: float
|
|
1037
1038
|
"""
|
|
1038
1039
|
...
|
|
1039
1040
|
|
|
1040
|
-
def calc_normal(self) ->
|
|
1041
|
+
def calc_normal(self) -> float:
|
|
1041
1042
|
"""Return normal at this loops corner of the face.
|
|
1042
1043
|
Falls back to the face normal for straight lines.
|
|
1043
1044
|
|
|
1044
|
-
:rtype: 'mathutils.Vector'
|
|
1045
1045
|
:return: a normalized vector.
|
|
1046
|
+
:rtype: mathutils.Vector
|
|
1046
1047
|
"""
|
|
1047
1048
|
...
|
|
1048
1049
|
|
|
1049
|
-
def calc_tangent(self) ->
|
|
1050
|
+
def calc_tangent(self) -> mathutils.Vector:
|
|
1050
1051
|
"""Return the tangent at this loops corner of the face (pointing inward into the face).
|
|
1051
1052
|
Falls back to the face normal for straight lines.
|
|
1052
1053
|
|
|
1053
|
-
:rtype: 'mathutils.Vector'
|
|
1054
1054
|
:return: a normalized vector.
|
|
1055
|
+
:rtype: mathutils.Vector
|
|
1055
1056
|
"""
|
|
1056
1057
|
...
|
|
1057
1058
|
|
|
@@ -1059,17 +1060,16 @@ class BMLoop:
|
|
|
1059
1060
|
"""Copy values from another element of matching type.
|
|
1060
1061
|
|
|
1061
1062
|
:param other:
|
|
1062
|
-
:type other:
|
|
1063
1063
|
"""
|
|
1064
1064
|
...
|
|
1065
1065
|
|
|
1066
1066
|
def copy_from_face_interp(
|
|
1067
|
-
self, face:
|
|
1067
|
+
self, face: BMFace, vert: bool = True, multires: bool = True
|
|
1068
1068
|
):
|
|
1069
1069
|
"""Interpolate the customdata from a face onto this loop (the loops vert should overlap the face).
|
|
1070
1070
|
|
|
1071
1071
|
:param face: The face to interpolate data from.
|
|
1072
|
-
:type face:
|
|
1072
|
+
:type face: BMFace
|
|
1073
1073
|
:param vert: When enabled, interpolate the loops vertex data (optional).
|
|
1074
1074
|
:type vert: bool
|
|
1075
1075
|
:param multires: When enabled, interpolate the loops multires data (optional).
|
|
@@ -1078,62 +1078,71 @@ class BMLoop:
|
|
|
1078
1078
|
...
|
|
1079
1079
|
|
|
1080
1080
|
class BMLoopSeq:
|
|
1081
|
-
|
|
1081
|
+
""" """
|
|
1082
|
+
|
|
1083
|
+
layers: BMLayerAccessLoop
|
|
1082
1084
|
""" custom-data layers (read-only).
|
|
1083
1085
|
|
|
1084
|
-
:type:
|
|
1086
|
+
:type: BMLayerAccessLoop
|
|
1085
1087
|
"""
|
|
1086
1088
|
|
|
1087
|
-
def __getitem__(self, key: int) ->
|
|
1089
|
+
def __getitem__(self, key: int) -> int:
|
|
1088
1090
|
"""
|
|
1089
1091
|
|
|
1090
1092
|
:param key:
|
|
1091
1093
|
:type key: int
|
|
1092
|
-
:
|
|
1094
|
+
:return:
|
|
1095
|
+
:rtype: BMLoop
|
|
1093
1096
|
"""
|
|
1094
1097
|
...
|
|
1095
1098
|
|
|
1096
|
-
def __setitem__(self, key: int, value:
|
|
1099
|
+
def __setitem__(self, key: int, value: BMLoop):
|
|
1097
1100
|
"""
|
|
1098
1101
|
|
|
1099
1102
|
:param key:
|
|
1100
1103
|
:type key: int
|
|
1101
1104
|
:param value:
|
|
1102
|
-
:type value:
|
|
1105
|
+
:type value: BMLoop
|
|
1103
1106
|
"""
|
|
1104
1107
|
...
|
|
1105
1108
|
|
|
1106
|
-
def __delitem__(self, key: int) ->
|
|
1109
|
+
def __delitem__(self, key: int) -> int:
|
|
1107
1110
|
"""
|
|
1108
1111
|
|
|
1109
1112
|
:param key:
|
|
1110
1113
|
:type key: int
|
|
1111
|
-
:
|
|
1114
|
+
:return:
|
|
1115
|
+
:rtype: BMLoop
|
|
1112
1116
|
"""
|
|
1113
1117
|
...
|
|
1114
1118
|
|
|
1115
|
-
def __iter__(self) ->
|
|
1119
|
+
def __iter__(self) -> BMLoop:
|
|
1116
1120
|
"""
|
|
1117
1121
|
|
|
1122
|
+
:return:
|
|
1118
1123
|
:rtype: typing.Iterator[GenericType]
|
|
1119
1124
|
"""
|
|
1120
1125
|
...
|
|
1121
1126
|
|
|
1122
|
-
def __next__(self) -> GenericType:
|
|
1127
|
+
def __next__(self) -> typing.Iterator[GenericType]:
|
|
1123
1128
|
"""
|
|
1124
1129
|
|
|
1130
|
+
:return:
|
|
1125
1131
|
:rtype: GenericType
|
|
1126
1132
|
"""
|
|
1127
1133
|
...
|
|
1128
1134
|
|
|
1129
|
-
def __len__(self) ->
|
|
1135
|
+
def __len__(self) -> GenericType:
|
|
1130
1136
|
"""
|
|
1131
1137
|
|
|
1138
|
+
:return:
|
|
1132
1139
|
:rtype: int
|
|
1133
1140
|
"""
|
|
1134
1141
|
...
|
|
1135
1142
|
|
|
1136
1143
|
class BMLoopUV:
|
|
1144
|
+
""" """
|
|
1145
|
+
|
|
1137
1146
|
pin_uv: bool
|
|
1138
1147
|
""" UV pin state.
|
|
1139
1148
|
|
|
@@ -1152,19 +1161,19 @@ class BMLoopUV:
|
|
|
1152
1161
|
:type: bool
|
|
1153
1162
|
"""
|
|
1154
1163
|
|
|
1155
|
-
uv: typing.Union[
|
|
1164
|
+
uv: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1156
1165
|
""" Loops UV (as a 2D Vector).
|
|
1157
1166
|
|
|
1158
|
-
:type: typing.Union[
|
|
1167
|
+
:type: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1159
1168
|
"""
|
|
1160
1169
|
|
|
1161
1170
|
class BMVert:
|
|
1162
1171
|
"""The BMesh vertex type"""
|
|
1163
1172
|
|
|
1164
|
-
co: typing.Union[
|
|
1173
|
+
co: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1165
1174
|
""" The coordinates for this vertex as a 3D, wrapped vector.
|
|
1166
1175
|
|
|
1167
|
-
:type: typing.Union[
|
|
1176
|
+
:type: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1168
1177
|
"""
|
|
1169
1178
|
|
|
1170
1179
|
hide: bool
|
|
@@ -1203,28 +1212,28 @@ class BMVert:
|
|
|
1203
1212
|
:type: bool
|
|
1204
1213
|
"""
|
|
1205
1214
|
|
|
1206
|
-
link_edges: typing.Union[
|
|
1215
|
+
link_edges: typing.Union[typing.List[BMEdge], BMElemSeq]
|
|
1207
1216
|
""" Edges connected to this vertex (read-only).
|
|
1208
1217
|
|
|
1209
|
-
:type: typing.Union[
|
|
1218
|
+
:type: typing.Union[typing.List[BMEdge], BMElemSeq]
|
|
1210
1219
|
"""
|
|
1211
1220
|
|
|
1212
|
-
link_faces: typing.Union[
|
|
1221
|
+
link_faces: typing.Union[typing.List[BMFace], BMElemSeq]
|
|
1213
1222
|
""" Faces connected to this vertex (read-only).
|
|
1214
1223
|
|
|
1215
|
-
:type: typing.Union[
|
|
1224
|
+
:type: typing.Union[typing.List[BMFace], BMElemSeq]
|
|
1216
1225
|
"""
|
|
1217
1226
|
|
|
1218
|
-
link_loops: typing.Union[
|
|
1227
|
+
link_loops: typing.Union[typing.List[BMLoop], BMElemSeq]
|
|
1219
1228
|
""" Loops that use this vertex (read-only).
|
|
1220
1229
|
|
|
1221
|
-
:type: typing.Union[
|
|
1230
|
+
:type: typing.Union[typing.List[BMLoop], BMElemSeq]
|
|
1222
1231
|
"""
|
|
1223
1232
|
|
|
1224
|
-
normal: typing.Union[
|
|
1233
|
+
normal: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1225
1234
|
""" The normal for this vertex as a 3D, wrapped vector.
|
|
1226
1235
|
|
|
1227
|
-
:type: typing.Union[
|
|
1236
|
+
:type: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1228
1237
|
"""
|
|
1229
1238
|
|
|
1230
1239
|
select: bool
|
|
@@ -1239,14 +1248,14 @@ class BMVert:
|
|
|
1239
1248
|
:type: bool
|
|
1240
1249
|
"""
|
|
1241
1250
|
|
|
1242
|
-
def calc_edge_angle(self, fallback: typing.Any = None) ->
|
|
1251
|
+
def calc_edge_angle(self, fallback: typing.Any = None) -> typing.Any:
|
|
1243
1252
|
"""Return the angle between this vert's two connected edges.
|
|
1244
1253
|
|
|
1245
1254
|
:param fallback: return this when the vert doesn't have 2 edges
|
|
1246
1255
|
(instead of raising a `ValueError`).
|
|
1247
1256
|
:type fallback: typing.Any
|
|
1248
|
-
:rtype: float
|
|
1249
1257
|
:return: Angle between edges in radians.
|
|
1258
|
+
:rtype: float
|
|
1250
1259
|
"""
|
|
1251
1260
|
...
|
|
1252
1261
|
|
|
@@ -1255,8 +1264,8 @@ class BMVert:
|
|
|
1255
1264
|
Where a flat surface gives 1.0, and higher values sharper edges.
|
|
1256
1265
|
This is used to maintain shell thickness when offsetting verts along their normals.
|
|
1257
1266
|
|
|
1258
|
-
:rtype: float
|
|
1259
1267
|
:return: offset multiplier
|
|
1268
|
+
:rtype: float
|
|
1260
1269
|
"""
|
|
1261
1270
|
...
|
|
1262
1271
|
|
|
@@ -1264,25 +1273,23 @@ class BMVert:
|
|
|
1264
1273
|
"""Copy values from another element of matching type.
|
|
1265
1274
|
|
|
1266
1275
|
:param other:
|
|
1267
|
-
:type other:
|
|
1268
1276
|
"""
|
|
1269
1277
|
...
|
|
1270
1278
|
|
|
1271
|
-
def copy_from_face_interp(self, face:
|
|
1279
|
+
def copy_from_face_interp(self, face: BMFace):
|
|
1272
1280
|
"""Interpolate the customdata from a face onto this loop (the loops vert should overlap the face).
|
|
1273
1281
|
|
|
1274
1282
|
:param face: The face to interpolate data from.
|
|
1275
|
-
:type face:
|
|
1283
|
+
:type face: BMFace
|
|
1276
1284
|
"""
|
|
1277
1285
|
...
|
|
1278
1286
|
|
|
1279
|
-
def copy_from_vert_interp(self, vert_pair:
|
|
1287
|
+
def copy_from_vert_interp(self, vert_pair: BMVert, fac):
|
|
1280
1288
|
"""Interpolate the customdata from a vert between 2 other verts.
|
|
1281
1289
|
|
|
1282
1290
|
:param vert_pair: The vert to interpolate data from.
|
|
1283
|
-
:type vert_pair:
|
|
1291
|
+
:type vert_pair: BMVert
|
|
1284
1292
|
:param fac:
|
|
1285
|
-
:type fac:
|
|
1286
1293
|
"""
|
|
1287
1294
|
...
|
|
1288
1295
|
|
|
@@ -1312,10 +1319,12 @@ class BMVert:
|
|
|
1312
1319
|
...
|
|
1313
1320
|
|
|
1314
1321
|
class BMVertSeq:
|
|
1315
|
-
|
|
1322
|
+
""" """
|
|
1323
|
+
|
|
1324
|
+
layers: BMLayerAccessVert
|
|
1316
1325
|
""" custom-data layers (read-only).
|
|
1317
1326
|
|
|
1318
|
-
:type:
|
|
1327
|
+
:type: BMLayerAccessVert
|
|
1319
1328
|
"""
|
|
1320
1329
|
|
|
1321
1330
|
def ensure_lookup_table(self):
|
|
@@ -1328,17 +1337,17 @@ class BMVertSeq:
|
|
|
1328
1337
|
|
|
1329
1338
|
def new(
|
|
1330
1339
|
self,
|
|
1331
|
-
co: typing.Union[
|
|
1332
|
-
example:
|
|
1333
|
-
) ->
|
|
1340
|
+
co: typing.Union[typing.Sequence[float], mathutils.Vector] = (0.0, 0.0, 0.0),
|
|
1341
|
+
example: BMVert = None,
|
|
1342
|
+
) -> BMVert:
|
|
1334
1343
|
"""Create a new vertex.
|
|
1335
1344
|
|
|
1336
1345
|
:param co: The initial location of the vertex (optional argument).
|
|
1337
|
-
:type co: typing.Union[
|
|
1346
|
+
:type co: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1338
1347
|
:param example: Existing vert to initialize settings.
|
|
1339
|
-
:type example:
|
|
1340
|
-
:rtype: 'BMVert'
|
|
1348
|
+
:type example: BMVert
|
|
1341
1349
|
:return: The newly created vertex.
|
|
1350
|
+
:rtype: BMVert
|
|
1342
1351
|
"""
|
|
1343
1352
|
...
|
|
1344
1353
|
|
|
@@ -1346,66 +1355,68 @@ class BMVertSeq:
|
|
|
1346
1355
|
"""Remove a vert.
|
|
1347
1356
|
|
|
1348
1357
|
:param vert:
|
|
1349
|
-
:type vert:
|
|
1350
1358
|
"""
|
|
1351
1359
|
...
|
|
1352
1360
|
|
|
1353
|
-
def sort(self, key
|
|
1361
|
+
def sort(self, key=None, reverse=False):
|
|
1354
1362
|
"""Sort the elements of this sequence, using an optional custom sort key.
|
|
1355
1363
|
Indices of elements are not changed, BMElemeSeq.index_update() can be used for that.
|
|
1356
1364
|
|
|
1357
1365
|
:param key: The key that sets the ordering of the elements.
|
|
1358
|
-
:type key: typing.Any
|
|
1359
1366
|
:param reverse: Reverse the order of the elements
|
|
1360
|
-
:type reverse: typing.Any
|
|
1361
1367
|
"""
|
|
1362
1368
|
...
|
|
1363
1369
|
|
|
1364
|
-
def __getitem__(self, key: int) ->
|
|
1370
|
+
def __getitem__(self, key: int) -> int:
|
|
1365
1371
|
"""
|
|
1366
1372
|
|
|
1367
1373
|
:param key:
|
|
1368
1374
|
:type key: int
|
|
1369
|
-
:
|
|
1375
|
+
:return:
|
|
1376
|
+
:rtype: BMVert
|
|
1370
1377
|
"""
|
|
1371
1378
|
...
|
|
1372
1379
|
|
|
1373
|
-
def __setitem__(self, key: int, value:
|
|
1380
|
+
def __setitem__(self, key: int, value: BMVert):
|
|
1374
1381
|
"""
|
|
1375
1382
|
|
|
1376
1383
|
:param key:
|
|
1377
1384
|
:type key: int
|
|
1378
1385
|
:param value:
|
|
1379
|
-
:type value:
|
|
1386
|
+
:type value: BMVert
|
|
1380
1387
|
"""
|
|
1381
1388
|
...
|
|
1382
1389
|
|
|
1383
|
-
def __delitem__(self, key: int) ->
|
|
1390
|
+
def __delitem__(self, key: int) -> int:
|
|
1384
1391
|
"""
|
|
1385
1392
|
|
|
1386
1393
|
:param key:
|
|
1387
1394
|
:type key: int
|
|
1388
|
-
:
|
|
1395
|
+
:return:
|
|
1396
|
+
:rtype: BMVert
|
|
1389
1397
|
"""
|
|
1390
1398
|
...
|
|
1391
1399
|
|
|
1392
|
-
def __iter__(self) ->
|
|
1400
|
+
def __iter__(self) -> BMVert:
|
|
1393
1401
|
"""
|
|
1394
1402
|
|
|
1403
|
+
:return:
|
|
1395
1404
|
:rtype: typing.Iterator[GenericType]
|
|
1396
1405
|
"""
|
|
1397
1406
|
...
|
|
1398
1407
|
|
|
1399
|
-
def __next__(self) -> GenericType:
|
|
1408
|
+
def __next__(self) -> typing.Iterator[GenericType]:
|
|
1400
1409
|
"""
|
|
1401
1410
|
|
|
1411
|
+
:return:
|
|
1402
1412
|
:rtype: GenericType
|
|
1403
1413
|
"""
|
|
1404
1414
|
...
|
|
1405
1415
|
|
|
1406
|
-
def __len__(self) ->
|
|
1416
|
+
def __len__(self) -> GenericType:
|
|
1407
1417
|
"""
|
|
1408
1418
|
|
|
1419
|
+
:return:
|
|
1409
1420
|
:rtype: int
|
|
1410
1421
|
"""
|
|
1411
1422
|
...
|
|
@@ -1413,16 +1424,16 @@ class BMVertSeq:
|
|
|
1413
1424
|
class BMesh:
|
|
1414
1425
|
"""The BMesh data structure"""
|
|
1415
1426
|
|
|
1416
|
-
edges:
|
|
1427
|
+
edges: BMEdgeSeq
|
|
1417
1428
|
""" This meshes edge sequence (read-only).
|
|
1418
1429
|
|
|
1419
|
-
:type:
|
|
1430
|
+
:type: BMEdgeSeq
|
|
1420
1431
|
"""
|
|
1421
1432
|
|
|
1422
|
-
faces:
|
|
1433
|
+
faces: BMFaceSeq
|
|
1423
1434
|
""" This meshes face sequence (read-only).
|
|
1424
1435
|
|
|
1425
|
-
:type:
|
|
1436
|
+
:type: BMFaceSeq
|
|
1426
1437
|
"""
|
|
1427
1438
|
|
|
1428
1439
|
is_valid: bool
|
|
@@ -1437,45 +1448,44 @@ class BMesh:
|
|
|
1437
1448
|
:type: bool
|
|
1438
1449
|
"""
|
|
1439
1450
|
|
|
1440
|
-
loops:
|
|
1451
|
+
loops: BMLoopSeq
|
|
1441
1452
|
""" This meshes loops (read-only).
|
|
1442
1453
|
|
|
1443
|
-
:type:
|
|
1454
|
+
:type: BMLoopSeq
|
|
1444
1455
|
"""
|
|
1445
1456
|
|
|
1446
|
-
select_history:
|
|
1457
|
+
select_history: BMEditSelSeq
|
|
1447
1458
|
""" Sequence of selected items (the last is displayed as active).
|
|
1448
1459
|
|
|
1449
|
-
:type:
|
|
1460
|
+
:type: BMEditSelSeq
|
|
1450
1461
|
"""
|
|
1451
1462
|
|
|
1452
|
-
select_mode:
|
|
1463
|
+
select_mode: set
|
|
1453
1464
|
""" The selection mode, values can be {'VERT', 'EDGE', 'FACE'}, can't be assigned an empty set.
|
|
1454
1465
|
|
|
1455
|
-
:type:
|
|
1466
|
+
:type: set
|
|
1456
1467
|
"""
|
|
1457
1468
|
|
|
1458
|
-
verts:
|
|
1469
|
+
verts: BMVertSeq
|
|
1459
1470
|
""" This meshes vert sequence (read-only).
|
|
1460
1471
|
|
|
1461
|
-
:type:
|
|
1472
|
+
:type: BMVertSeq
|
|
1462
1473
|
"""
|
|
1463
1474
|
|
|
1464
|
-
def calc_loop_triangles(self) ->
|
|
1475
|
+
def calc_loop_triangles(self) -> BMVertSeq:
|
|
1465
1476
|
"""Calculate triangle tessellation from quads/ngons.
|
|
1466
1477
|
|
|
1467
|
-
:rtype: typing.List['BMLoop']
|
|
1468
1478
|
:return: The triangulated faces.
|
|
1469
1479
|
"""
|
|
1470
1480
|
...
|
|
1471
1481
|
|
|
1472
|
-
def calc_volume(self, signed: bool = False) ->
|
|
1482
|
+
def calc_volume(self, signed: bool = False) -> bool:
|
|
1473
1483
|
"""Calculate mesh volume based on face normals.
|
|
1474
1484
|
|
|
1475
1485
|
:param signed: when signed is true, negative values may be returned.
|
|
1476
1486
|
:type signed: bool
|
|
1477
|
-
:rtype: float
|
|
1478
1487
|
:return: The volume of the mesh.
|
|
1488
|
+
:rtype: float
|
|
1479
1489
|
"""
|
|
1480
1490
|
...
|
|
1481
1491
|
|
|
@@ -1483,11 +1493,11 @@ class BMesh:
|
|
|
1483
1493
|
"""Clear all mesh data."""
|
|
1484
1494
|
...
|
|
1485
1495
|
|
|
1486
|
-
def copy(self) ->
|
|
1496
|
+
def copy(self) -> float:
|
|
1487
1497
|
"""
|
|
1488
1498
|
|
|
1489
|
-
:rtype: 'BMesh'
|
|
1490
1499
|
:return: A copy of this BMesh.
|
|
1500
|
+
:rtype: BMesh
|
|
1491
1501
|
"""
|
|
1492
1502
|
...
|
|
1493
1503
|
|
|
@@ -1497,7 +1507,7 @@ class BMesh:
|
|
|
1497
1507
|
|
|
1498
1508
|
def from_mesh(
|
|
1499
1509
|
self,
|
|
1500
|
-
mesh:
|
|
1510
|
+
mesh: bpy.types.Mesh,
|
|
1501
1511
|
face_normals=True,
|
|
1502
1512
|
vertex_normals=True,
|
|
1503
1513
|
use_shape_key: bool = False,
|
|
@@ -1506,11 +1516,9 @@ class BMesh:
|
|
|
1506
1516
|
"""Initialize this bmesh from existing mesh datablock.
|
|
1507
1517
|
|
|
1508
1518
|
:param mesh: The mesh data to load.
|
|
1509
|
-
:type mesh:
|
|
1519
|
+
:type mesh: bpy.types.Mesh
|
|
1510
1520
|
:param face_normals:
|
|
1511
|
-
:type face_normals:
|
|
1512
1521
|
:param vertex_normals:
|
|
1513
|
-
:type vertex_normals:
|
|
1514
1522
|
:param use_shape_key: Use the locations from a shape key.
|
|
1515
1523
|
:type use_shape_key: bool
|
|
1516
1524
|
:param shape_key_index: The shape key index to use.
|
|
@@ -1520,7 +1528,7 @@ class BMesh:
|
|
|
1520
1528
|
|
|
1521
1529
|
def from_object(
|
|
1522
1530
|
self,
|
|
1523
|
-
object:
|
|
1531
|
+
object: bpy.types.Object,
|
|
1524
1532
|
depsgraph,
|
|
1525
1533
|
cage: bool = False,
|
|
1526
1534
|
face_normals: bool = True,
|
|
@@ -1529,9 +1537,8 @@ class BMesh:
|
|
|
1529
1537
|
"""Initialize this bmesh from existing object data-block (only meshes are currently supported).
|
|
1530
1538
|
|
|
1531
1539
|
:param object: The object data to load.
|
|
1532
|
-
:type object:
|
|
1540
|
+
:type object: bpy.types.Object
|
|
1533
1541
|
:param depsgraph:
|
|
1534
|
-
:type depsgraph:
|
|
1535
1542
|
:param cage: Get the mesh as a deformed cage.
|
|
1536
1543
|
:type cage: bool
|
|
1537
1544
|
:param face_normals: Calculate face normals.
|
|
@@ -1557,20 +1564,19 @@ class BMesh:
|
|
|
1557
1564
|
"""flush selection based on the current mode current `BMesh.select_mode`."""
|
|
1558
1565
|
...
|
|
1559
1566
|
|
|
1560
|
-
def to_mesh(self, mesh:
|
|
1567
|
+
def to_mesh(self, mesh: bpy.types.Mesh):
|
|
1561
1568
|
"""Writes this BMesh data into an existing Mesh datablock.
|
|
1562
1569
|
|
|
1563
1570
|
:param mesh: The mesh data to write into.
|
|
1564
|
-
:type mesh:
|
|
1571
|
+
:type mesh: bpy.types.Mesh
|
|
1565
1572
|
"""
|
|
1566
1573
|
...
|
|
1567
1574
|
|
|
1568
|
-
def transform(self, matrix
|
|
1575
|
+
def transform(self, matrix, filter: set = None):
|
|
1569
1576
|
"""Transform the mesh (optionally filtering flagged data only).
|
|
1570
1577
|
|
|
1571
1578
|
:param matrix: transform matrix.
|
|
1572
|
-
:type matrix: 'mathutils.Matrix'
|
|
1573
1579
|
:param filter: set of values in ('SELECT', 'HIDE', 'SEAM', 'SMOOTH', 'TAG').
|
|
1574
|
-
:type filter:
|
|
1580
|
+
:type filter: set
|
|
1575
1581
|
"""
|
|
1576
1582
|
...
|