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