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.
- 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/ops/__init__.pyi
CHANGED
|
@@ -1,55 +1,58 @@
|
|
|
1
|
-
import sys
|
|
2
1
|
import typing
|
|
3
2
|
import bmesh.types
|
|
4
|
-
import mathutils
|
|
5
3
|
import bpy.types
|
|
4
|
+
import mathutils
|
|
6
5
|
|
|
7
6
|
GenericType = typing.TypeVar("GenericType")
|
|
8
7
|
|
|
9
8
|
def average_vert_facedata(
|
|
10
|
-
bm:
|
|
9
|
+
bm: bmesh.types.BMesh, verts: typing.List[bmesh.types.BMVert] = []
|
|
11
10
|
):
|
|
12
|
-
"""Average Vertices Face-vert Data.
|
|
11
|
+
"""Average Vertices Face-vert Data.Merge uv/vcols associated with the input vertices at
|
|
12
|
+
the bounding box center. (I know, it's not averaging but
|
|
13
|
+
the vert_snap_to_bb_center is just too long).
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
:param bm: The bmesh to operate on.
|
|
16
|
+
:type bm: bmesh.types.BMesh
|
|
17
|
+
:param verts: input vertices
|
|
18
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
18
19
|
"""
|
|
19
20
|
|
|
20
21
|
...
|
|
21
22
|
|
|
22
23
|
def beautify_fill(
|
|
23
|
-
bm:
|
|
24
|
-
faces: typing.List[
|
|
25
|
-
edges: typing.List[
|
|
24
|
+
bm: bmesh.types.BMesh,
|
|
25
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
26
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
26
27
|
use_restrict_tag: bool = False,
|
|
27
28
|
method: typing.Union[str, int] = "AREA",
|
|
28
29
|
) -> typing.Dict:
|
|
29
|
-
"""Beautify Fill.
|
|
30
|
+
"""Beautify Fill.Rotate edges to create more evenly spaced triangles.
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
:param bm: The bmesh to operate on.
|
|
33
|
+
:type bm: bmesh.types.BMesh
|
|
34
|
+
:param faces: input faces
|
|
35
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
36
|
+
:param edges: edges that can be flipped
|
|
37
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
38
|
+
:param use_restrict_tag: restrict edge rotation to mixed tagged vertices
|
|
39
|
+
:type use_restrict_tag: bool
|
|
40
|
+
:param method: method to define what is beautiful
|
|
41
|
+
:type method: typing.Union[str, int]
|
|
42
|
+
:return: geom: new flipped faces and edges
|
|
43
|
+
|
|
44
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
45
|
+
:rtype: typing.Dict
|
|
43
46
|
"""
|
|
44
47
|
|
|
45
48
|
...
|
|
46
49
|
|
|
47
50
|
def bevel(
|
|
48
|
-
bm:
|
|
51
|
+
bm: bmesh.types.BMesh,
|
|
49
52
|
geom: typing.Union[
|
|
50
|
-
typing.List[
|
|
51
|
-
typing.List[
|
|
52
|
-
typing.List[
|
|
53
|
+
typing.List[bmesh.types.BMVert],
|
|
54
|
+
typing.List[bmesh.types.BMEdge],
|
|
55
|
+
typing.List[bmesh.types.BMFace],
|
|
53
56
|
] = [],
|
|
54
57
|
offset: float = 0,
|
|
55
58
|
offset_type: typing.Union[str, int] = "OFFSET",
|
|
@@ -67,139 +70,153 @@ def bevel(
|
|
|
67
70
|
miter_outer: typing.Union[str, int] = "SHARP",
|
|
68
71
|
miter_inner: typing.Union[str, int] = "SHARP",
|
|
69
72
|
spread: float = 0,
|
|
70
|
-
custom_profile:
|
|
73
|
+
custom_profile: bpy.types.bpy_struct = None,
|
|
71
74
|
vmesh_method: typing.Union[str, int] = "ADJ",
|
|
72
75
|
) -> typing.Dict:
|
|
73
|
-
"""Bevel.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
76
|
+
"""Bevel.Bevels edges and vertices
|
|
77
|
+
|
|
78
|
+
:param bm: The bmesh to operate on.
|
|
79
|
+
:type bm: bmesh.types.BMesh
|
|
80
|
+
:param geom: input edges and vertices
|
|
81
|
+
:type geom: typing.Union[typing.List[bmesh.types.BMVert], typing.List[bmesh.types.BMEdge], typing.List[bmesh.types.BMFace]]
|
|
82
|
+
:param offset: amount to offset beveled edge
|
|
83
|
+
:type offset: float
|
|
84
|
+
:param offset_type: how to measure the offset
|
|
85
|
+
:type offset_type: typing.Union[str, int]
|
|
86
|
+
:param profile_type: The profile type to use for bevel.
|
|
87
|
+
:type profile_type: typing.Union[str, int]
|
|
88
|
+
:param segments: number of segments in bevel
|
|
89
|
+
:type segments: int
|
|
90
|
+
:param profile: profile shape, 0->1 (.5=>round)
|
|
91
|
+
:type profile: float
|
|
92
|
+
:param affect: Whether to bevel vertices or edges.
|
|
93
|
+
:type affect: typing.Union[str, int]
|
|
94
|
+
:param clamp_overlap: do not allow beveled edges/vertices to overlap each other
|
|
95
|
+
:type clamp_overlap: bool
|
|
96
|
+
:param material: material for bevel faces, -1 means get from adjacent faces
|
|
97
|
+
:type material: int
|
|
98
|
+
:param loop_slide: prefer to slide along edges to having even widths
|
|
99
|
+
:type loop_slide: bool
|
|
100
|
+
:param mark_seam: extend edge data to allow seams to run across bevels
|
|
101
|
+
:type mark_seam: bool
|
|
102
|
+
:param mark_sharp: extend edge data to allow sharp edges to run across bevels
|
|
103
|
+
:type mark_sharp: bool
|
|
104
|
+
:param harden_normals: harden normals
|
|
105
|
+
:type harden_normals: bool
|
|
106
|
+
:param face_strength_mode: whether to set face strength, and which faces to set if so
|
|
107
|
+
:type face_strength_mode: typing.Union[str, int]
|
|
108
|
+
:param miter_outer: outer miter kind
|
|
109
|
+
:type miter_outer: typing.Union[str, int]
|
|
110
|
+
:param miter_inner: outer miter kind
|
|
111
|
+
:type miter_inner: typing.Union[str, int]
|
|
112
|
+
:param spread: amount to offset beveled edge
|
|
113
|
+
:type spread: float
|
|
114
|
+
:param custom_profile: CurveProfile, if None ignored
|
|
115
|
+
:type custom_profile: bpy.types.bpy_struct
|
|
116
|
+
:param vmesh_method: The method to use to create meshes at intersections.
|
|
117
|
+
:type vmesh_method: typing.Union[str, int]
|
|
118
|
+
:return: faces: output faces
|
|
119
|
+
|
|
120
|
+
type list of (`bmesh.types.BMFace`)
|
|
121
|
+
|
|
122
|
+
edges: output edges
|
|
123
|
+
|
|
124
|
+
type list of (`bmesh.types.BMEdge`)
|
|
125
|
+
|
|
126
|
+
verts: output verts
|
|
127
|
+
|
|
128
|
+
type list of (`bmesh.types.BMVert`)
|
|
129
|
+
:rtype: typing.Dict
|
|
117
130
|
"""
|
|
118
131
|
|
|
119
132
|
...
|
|
120
133
|
|
|
121
134
|
def bisect_edges(
|
|
122
|
-
bm:
|
|
123
|
-
edges: typing.List[
|
|
135
|
+
bm: bmesh.types.BMesh,
|
|
136
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
124
137
|
cuts: int = 0,
|
|
125
|
-
edge_percents
|
|
138
|
+
edge_percents={},
|
|
126
139
|
) -> typing.Dict:
|
|
127
|
-
"""Edge Bisect.
|
|
140
|
+
"""Edge Bisect.Splits input edges (but doesn't do anything else).
|
|
141
|
+
This creates a 2-valence vert.
|
|
128
142
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
143
|
+
:param bm: The bmesh to operate on.
|
|
144
|
+
:type bm: bmesh.types.BMesh
|
|
145
|
+
:param edges: input edges
|
|
146
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
147
|
+
:param cuts: number of cuts
|
|
148
|
+
:type cuts: int
|
|
149
|
+
:param edge_percents: Undocumented.
|
|
150
|
+
:return: geom_split: newly created vertices and edges
|
|
151
|
+
|
|
152
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
153
|
+
:rtype: typing.Dict
|
|
139
154
|
"""
|
|
140
155
|
|
|
141
156
|
...
|
|
142
157
|
|
|
143
158
|
def bisect_plane(
|
|
144
|
-
bm:
|
|
159
|
+
bm: bmesh.types.BMesh,
|
|
145
160
|
geom: typing.Union[
|
|
146
|
-
typing.List[
|
|
147
|
-
typing.List[
|
|
148
|
-
typing.List[
|
|
161
|
+
typing.List[bmesh.types.BMVert],
|
|
162
|
+
typing.List[bmesh.types.BMEdge],
|
|
163
|
+
typing.List[bmesh.types.BMFace],
|
|
149
164
|
] = [],
|
|
150
165
|
dist: float = 0,
|
|
151
|
-
plane_co: typing.Union[
|
|
152
|
-
|
|
153
|
-
] = "mathutils.Vector()",
|
|
154
|
-
plane_no: typing.Union[
|
|
155
|
-
typing.Sequence[float], "mathutils.Vector"
|
|
156
|
-
] = "mathutils.Vector()",
|
|
166
|
+
plane_co: typing.Union[typing.Sequence[float], mathutils.Vector] = None(),
|
|
167
|
+
plane_no: typing.Union[typing.Sequence[float], mathutils.Vector] = None(),
|
|
157
168
|
use_snap_center: bool = False,
|
|
158
169
|
clear_outer: bool = False,
|
|
159
170
|
clear_inner: bool = False,
|
|
160
171
|
) -> typing.Dict:
|
|
161
|
-
"""Bisect Plane.
|
|
172
|
+
"""Bisect Plane.Bisects the mesh by a plane (cut the mesh in half).
|
|
162
173
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
174
|
+
:param bm: The bmesh to operate on.
|
|
175
|
+
:type bm: bmesh.types.BMesh
|
|
176
|
+
:param geom: input geometry
|
|
177
|
+
:type geom: typing.Union[typing.List[bmesh.types.BMVert], typing.List[bmesh.types.BMEdge], typing.List[bmesh.types.BMFace]]
|
|
178
|
+
:param dist: minimum distance when testing if a vert is exactly on the plane
|
|
179
|
+
:type dist: float
|
|
180
|
+
:param plane_co: point on the plane
|
|
181
|
+
:type plane_co: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
182
|
+
:param plane_no: direction of the plane
|
|
183
|
+
:type plane_no: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
184
|
+
:param use_snap_center: snap axis aligned verts to the center
|
|
185
|
+
:type use_snap_center: bool
|
|
186
|
+
:param clear_outer: when enabled. remove all geometry on the positive side of the plane
|
|
187
|
+
:type clear_outer: bool
|
|
188
|
+
:param clear_inner: when enabled. remove all geometry on the negative side of the plane
|
|
189
|
+
:type clear_inner: bool
|
|
190
|
+
:return: geom_cut: output geometry aligned with the plane (new and existing)
|
|
191
|
+
|
|
192
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`)
|
|
193
|
+
|
|
194
|
+
geom: input and output geometry (result of cut).
|
|
195
|
+
|
|
196
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
197
|
+
:rtype: typing.Dict
|
|
181
198
|
"""
|
|
182
199
|
|
|
183
200
|
...
|
|
184
201
|
|
|
185
202
|
def bmesh_to_mesh(
|
|
186
|
-
bm:
|
|
203
|
+
bm: bmesh.types.BMesh, mesh: bpy.types.Mesh, object: bpy.types.Object
|
|
187
204
|
):
|
|
188
|
-
"""BMesh to Mesh.
|
|
205
|
+
"""BMesh to Mesh.Converts a bmesh to a Mesh. This is reserved for exiting editmode.
|
|
189
206
|
|
|
190
207
|
:param bm: The bmesh to operate on.
|
|
191
|
-
:type bm:
|
|
208
|
+
:type bm: bmesh.types.BMesh
|
|
192
209
|
:param mesh: pointer to a mesh structure to fill in
|
|
193
|
-
:type mesh:
|
|
210
|
+
:type mesh: bpy.types.Mesh
|
|
194
211
|
:param object: pointer to an object structure
|
|
195
|
-
:type object:
|
|
212
|
+
:type object: bpy.types.Object
|
|
196
213
|
"""
|
|
197
214
|
|
|
198
215
|
...
|
|
199
216
|
|
|
200
217
|
def bridge_loops(
|
|
201
|
-
bm:
|
|
202
|
-
edges: typing.List[
|
|
218
|
+
bm: bmesh.types.BMesh,
|
|
219
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
203
220
|
use_pairs: bool = False,
|
|
204
221
|
use_cyclic: bool = False,
|
|
205
222
|
use_merge: bool = False,
|
|
@@ -208,418 +225,470 @@ def bridge_loops(
|
|
|
208
225
|
) -> typing.Dict:
|
|
209
226
|
"""Bridge edge loops with faces.
|
|
210
227
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
228
|
+
:param bm: The bmesh to operate on.
|
|
229
|
+
:type bm: bmesh.types.BMesh
|
|
230
|
+
:param edges: input edges
|
|
231
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
232
|
+
:param use_pairs: Undocumented.
|
|
233
|
+
:type use_pairs: bool
|
|
234
|
+
:param use_cyclic: Undocumented.
|
|
235
|
+
:type use_cyclic: bool
|
|
236
|
+
:param use_merge: merge rather than creating faces
|
|
237
|
+
:type use_merge: bool
|
|
238
|
+
:param merge_factor: merge factor
|
|
239
|
+
:type merge_factor: float
|
|
240
|
+
:param twist_offset: twist offset for closed loops
|
|
241
|
+
:type twist_offset: int
|
|
242
|
+
:return: faces: new faces
|
|
243
|
+
|
|
244
|
+
type list of (`bmesh.types.BMFace`)
|
|
245
|
+
|
|
246
|
+
edges: new edges
|
|
247
|
+
|
|
248
|
+
type list of (`bmesh.types.BMEdge`)
|
|
249
|
+
:rtype: typing.Dict
|
|
227
250
|
"""
|
|
228
251
|
|
|
229
252
|
...
|
|
230
253
|
|
|
231
254
|
def collapse(
|
|
232
|
-
bm:
|
|
233
|
-
edges: typing.List[
|
|
255
|
+
bm: bmesh.types.BMesh,
|
|
256
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
234
257
|
uvs: bool = False,
|
|
235
258
|
):
|
|
236
|
-
"""Collapse Connected.
|
|
259
|
+
"""Collapse Connected.Collapses connected vertices
|
|
237
260
|
|
|
238
261
|
:param bm: The bmesh to operate on.
|
|
239
|
-
:type bm:
|
|
262
|
+
:type bm: bmesh.types.BMesh
|
|
240
263
|
:param edges: input edges
|
|
241
|
-
:type edges: typing.List[
|
|
264
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
242
265
|
:param uvs: also collapse UVs and such
|
|
243
266
|
:type uvs: bool
|
|
244
267
|
"""
|
|
245
268
|
|
|
246
269
|
...
|
|
247
270
|
|
|
248
|
-
def collapse_uvs(
|
|
249
|
-
|
|
250
|
-
):
|
|
251
|
-
"""Collapse Connected UVs. Collapses connected UV vertices.
|
|
271
|
+
def collapse_uvs(bm: bmesh.types.BMesh, edges: typing.List[bmesh.types.BMEdge] = []):
|
|
272
|
+
"""Collapse Connected UVs.Collapses connected UV vertices.
|
|
252
273
|
|
|
253
274
|
:param bm: The bmesh to operate on.
|
|
254
|
-
:type bm:
|
|
275
|
+
:type bm: bmesh.types.BMesh
|
|
255
276
|
:param edges: input edges
|
|
256
|
-
:type edges: typing.List[
|
|
277
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
257
278
|
"""
|
|
258
279
|
|
|
259
280
|
...
|
|
260
281
|
|
|
261
282
|
def connect_vert_pair(
|
|
262
|
-
bm:
|
|
263
|
-
verts: typing.List[
|
|
264
|
-
verts_exclude: typing.List[
|
|
265
|
-
faces_exclude: typing.List[
|
|
283
|
+
bm: bmesh.types.BMesh,
|
|
284
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
285
|
+
verts_exclude: typing.List[bmesh.types.BMVert] = [],
|
|
286
|
+
faces_exclude: typing.List[bmesh.types.BMFace] = [],
|
|
266
287
|
) -> typing.Dict:
|
|
267
|
-
"""Connect Verts.
|
|
288
|
+
"""Connect Verts.Split faces by adding edges that connect verts.
|
|
268
289
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
290
|
+
:param bm: The bmesh to operate on.
|
|
291
|
+
:type bm: bmesh.types.BMesh
|
|
292
|
+
:param verts: input vertices
|
|
293
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
294
|
+
:param verts_exclude: input vertices to explicitly exclude from connecting
|
|
295
|
+
:type verts_exclude: typing.List[bmesh.types.BMVert]
|
|
296
|
+
:param faces_exclude: input faces to explicitly exclude from connecting
|
|
297
|
+
:type faces_exclude: typing.List[bmesh.types.BMFace]
|
|
298
|
+
:return: edges:
|
|
299
|
+
|
|
300
|
+
type list of (`bmesh.types.BMEdge`)
|
|
301
|
+
:rtype: typing.Dict
|
|
279
302
|
"""
|
|
280
303
|
|
|
281
304
|
...
|
|
282
305
|
|
|
283
306
|
def connect_verts(
|
|
284
|
-
bm:
|
|
285
|
-
verts: typing.List[
|
|
286
|
-
faces_exclude: typing.List[
|
|
307
|
+
bm: bmesh.types.BMesh,
|
|
308
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
309
|
+
faces_exclude: typing.List[bmesh.types.BMFace] = [],
|
|
287
310
|
check_degenerate: bool = False,
|
|
288
311
|
) -> typing.Dict:
|
|
289
|
-
"""Connect Verts.
|
|
312
|
+
"""Connect Verts.Split faces by adding edges that connect verts.
|
|
290
313
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
314
|
+
:param bm: The bmesh to operate on.
|
|
315
|
+
:type bm: bmesh.types.BMesh
|
|
316
|
+
:param verts: input vertices
|
|
317
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
318
|
+
:param faces_exclude: input faces to explicitly exclude from connecting
|
|
319
|
+
:type faces_exclude: typing.List[bmesh.types.BMFace]
|
|
320
|
+
:param check_degenerate: prevent splits with overlaps & intersections
|
|
321
|
+
:type check_degenerate: bool
|
|
322
|
+
:return: edges:
|
|
323
|
+
|
|
324
|
+
type list of (`bmesh.types.BMEdge`)
|
|
325
|
+
:rtype: typing.Dict
|
|
301
326
|
"""
|
|
302
327
|
|
|
303
328
|
...
|
|
304
329
|
|
|
305
330
|
def connect_verts_concave(
|
|
306
|
-
bm:
|
|
331
|
+
bm: bmesh.types.BMesh, faces: typing.List[bmesh.types.BMFace] = []
|
|
307
332
|
) -> typing.Dict:
|
|
308
|
-
"""Connect Verts to form Convex Faces.
|
|
333
|
+
"""Connect Verts to form Convex Faces.Ensures all faces are convex faces.
|
|
309
334
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
335
|
+
:param bm: The bmesh to operate on.
|
|
336
|
+
:type bm: bmesh.types.BMesh
|
|
337
|
+
:param faces: input faces
|
|
338
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
339
|
+
:return: edges:
|
|
340
|
+
|
|
341
|
+
type list of (`bmesh.types.BMEdge`)
|
|
342
|
+
|
|
343
|
+
faces:
|
|
344
|
+
|
|
345
|
+
type list of (`bmesh.types.BMFace`)
|
|
346
|
+
:rtype: typing.Dict
|
|
316
347
|
"""
|
|
317
348
|
|
|
318
349
|
...
|
|
319
350
|
|
|
320
351
|
def connect_verts_nonplanar(
|
|
321
|
-
bm:
|
|
352
|
+
bm: bmesh.types.BMesh,
|
|
322
353
|
angle_limit: float = 0,
|
|
323
|
-
faces: typing.List[
|
|
354
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
324
355
|
) -> typing.Dict:
|
|
325
|
-
"""Connect Verts Across non Planer Faces.
|
|
356
|
+
"""Connect Verts Across non Planer Faces.Split faces by connecting edges along non planer faces.
|
|
326
357
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
358
|
+
:param bm: The bmesh to operate on.
|
|
359
|
+
:type bm: bmesh.types.BMesh
|
|
360
|
+
:param angle_limit: total rotation angle (radians)
|
|
361
|
+
:type angle_limit: float
|
|
362
|
+
:param faces: input faces
|
|
363
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
364
|
+
:return: edges:
|
|
365
|
+
|
|
366
|
+
type list of (`bmesh.types.BMEdge`)
|
|
367
|
+
|
|
368
|
+
faces:
|
|
369
|
+
|
|
370
|
+
type list of (`bmesh.types.BMFace`)
|
|
371
|
+
:rtype: typing.Dict
|
|
335
372
|
"""
|
|
336
373
|
|
|
337
374
|
...
|
|
338
375
|
|
|
339
376
|
def contextual_create(
|
|
340
|
-
bm:
|
|
377
|
+
bm: bmesh.types.BMesh,
|
|
341
378
|
geom: typing.Union[
|
|
342
|
-
typing.List[
|
|
343
|
-
typing.List[
|
|
344
|
-
typing.List[
|
|
379
|
+
typing.List[bmesh.types.BMVert],
|
|
380
|
+
typing.List[bmesh.types.BMEdge],
|
|
381
|
+
typing.List[bmesh.types.BMFace],
|
|
345
382
|
] = [],
|
|
346
383
|
mat_nr: int = 0,
|
|
347
384
|
use_smooth: bool = False,
|
|
348
385
|
) -> typing.Dict:
|
|
349
|
-
"""Contextual Create.
|
|
386
|
+
"""Contextual Create.This is basically F-key, it creates
|
|
387
|
+
new faces from vertices, makes stuff from edge nets,
|
|
388
|
+
makes wire edges, etc. It also dissolves faces.Three verts become a triangle, four become a quad. Two
|
|
389
|
+
become a wire edge.
|
|
350
390
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
391
|
+
:param bm: The bmesh to operate on.
|
|
392
|
+
:type bm: bmesh.types.BMesh
|
|
393
|
+
:param geom: input geometry.
|
|
394
|
+
:type geom: typing.Union[typing.List[bmesh.types.BMVert], typing.List[bmesh.types.BMEdge], typing.List[bmesh.types.BMFace]]
|
|
395
|
+
:param mat_nr: material to use
|
|
396
|
+
:type mat_nr: int
|
|
397
|
+
:param use_smooth: smooth to use
|
|
398
|
+
:type use_smooth: bool
|
|
399
|
+
:return: faces: newly-made face(s)
|
|
400
|
+
|
|
401
|
+
type list of (`bmesh.types.BMFace`)
|
|
402
|
+
|
|
403
|
+
edges: newly-made edge(s)
|
|
404
|
+
|
|
405
|
+
type list of (`bmesh.types.BMEdge`)
|
|
406
|
+
:rtype: typing.Dict
|
|
361
407
|
"""
|
|
362
408
|
|
|
363
409
|
...
|
|
364
410
|
|
|
365
411
|
def convex_hull(
|
|
366
|
-
bm:
|
|
412
|
+
bm: bmesh.types.BMesh,
|
|
367
413
|
input: typing.Union[
|
|
368
|
-
typing.List[
|
|
369
|
-
typing.List[
|
|
370
|
-
typing.List[
|
|
414
|
+
typing.List[bmesh.types.BMVert],
|
|
415
|
+
typing.List[bmesh.types.BMEdge],
|
|
416
|
+
typing.List[bmesh.types.BMFace],
|
|
371
417
|
] = [],
|
|
372
418
|
use_existing_faces: bool = False,
|
|
373
419
|
) -> typing.Dict:
|
|
374
|
-
"""Convex
|
|
420
|
+
"""Convex HullBuilds a convex hull from the vertices in 'input'.If 'use_existing_faces' is true, the hull will not output triangles
|
|
421
|
+
that are covered by a pre-existing face.All hull vertices, faces, and edges are added to 'geom.out'. Any
|
|
422
|
+
input elements that end up inside the hull (i.e. are not used by an
|
|
423
|
+
output face) are added to the 'interior_geom' slot. The
|
|
424
|
+
'unused_geom' slot will contain all interior geometry that is
|
|
425
|
+
completely unused. Lastly, 'holes_geom' contains edges and faces
|
|
426
|
+
that were in the input and are part of the hull.
|
|
375
427
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
428
|
+
:param bm: The bmesh to operate on.
|
|
429
|
+
:type bm: bmesh.types.BMesh
|
|
430
|
+
:param input: input geometry
|
|
431
|
+
:type input: typing.Union[typing.List[bmesh.types.BMVert], typing.List[bmesh.types.BMEdge], typing.List[bmesh.types.BMFace]]
|
|
432
|
+
:param use_existing_faces: skip hull triangles that are covered by a pre-existing face
|
|
433
|
+
:type use_existing_faces: bool
|
|
434
|
+
:return: geom:
|
|
435
|
+
|
|
436
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
437
|
+
|
|
438
|
+
geom_interior:
|
|
439
|
+
|
|
440
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
441
|
+
|
|
442
|
+
geom_unused:
|
|
443
|
+
|
|
444
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
445
|
+
|
|
446
|
+
geom_holes:
|
|
447
|
+
|
|
448
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
449
|
+
:rtype: typing.Dict
|
|
384
450
|
"""
|
|
385
451
|
|
|
386
452
|
...
|
|
387
453
|
|
|
388
454
|
def create_circle(
|
|
389
|
-
bm:
|
|
455
|
+
bm: bmesh.types.BMesh,
|
|
390
456
|
cap_ends: bool = False,
|
|
391
457
|
cap_tris: bool = False,
|
|
392
458
|
segments: int = 0,
|
|
393
459
|
radius: float = 0,
|
|
394
|
-
matrix: typing.Union[
|
|
395
|
-
typing.Sequence[float], "mathutils.Matrix"
|
|
396
|
-
] = "mathutils.Matrix.Identity(4)",
|
|
460
|
+
matrix: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
397
461
|
calc_uvs: bool = False,
|
|
398
462
|
) -> typing.Dict:
|
|
399
463
|
"""Creates a Circle.
|
|
400
464
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
465
|
+
:param bm: The bmesh to operate on.
|
|
466
|
+
:type bm: bmesh.types.BMesh
|
|
467
|
+
:param cap_ends: whether or not to fill in the ends with faces
|
|
468
|
+
:type cap_ends: bool
|
|
469
|
+
:param cap_tris: fill ends with triangles instead of ngons
|
|
470
|
+
:type cap_tris: bool
|
|
471
|
+
:param segments: number of vertices in the circle
|
|
472
|
+
:type segments: int
|
|
473
|
+
:param radius: Radius of the circle.
|
|
474
|
+
:type radius: float
|
|
475
|
+
:param matrix: matrix to multiply the new geometry with
|
|
476
|
+
:type matrix: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
477
|
+
:param calc_uvs: calculate default UVs
|
|
478
|
+
:type calc_uvs: bool
|
|
479
|
+
:return: verts: output verts
|
|
480
|
+
|
|
481
|
+
type list of (`bmesh.types.BMVert`)
|
|
482
|
+
:rtype: typing.Dict
|
|
417
483
|
"""
|
|
418
484
|
|
|
419
485
|
...
|
|
420
486
|
|
|
421
487
|
def create_cone(
|
|
422
|
-
bm:
|
|
488
|
+
bm: bmesh.types.BMesh,
|
|
423
489
|
cap_ends: bool = False,
|
|
424
490
|
cap_tris: bool = False,
|
|
425
491
|
segments: int = 0,
|
|
426
492
|
radius1: float = 0,
|
|
427
493
|
radius2: float = 0,
|
|
428
494
|
depth: float = 0,
|
|
429
|
-
matrix: typing.Union[
|
|
430
|
-
typing.Sequence[float], "mathutils.Matrix"
|
|
431
|
-
] = "mathutils.Matrix.Identity(4)",
|
|
495
|
+
matrix: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
432
496
|
calc_uvs: bool = False,
|
|
433
497
|
) -> typing.Dict:
|
|
434
|
-
"""Create Cone.
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
498
|
+
"""Create Cone.Creates a cone with variable depth at both ends
|
|
499
|
+
|
|
500
|
+
:param bm: The bmesh to operate on.
|
|
501
|
+
:type bm: bmesh.types.BMesh
|
|
502
|
+
:param cap_ends: whether or not to fill in the ends with faces
|
|
503
|
+
:type cap_ends: bool
|
|
504
|
+
:param cap_tris: fill ends with triangles instead of ngons
|
|
505
|
+
:type cap_tris: bool
|
|
506
|
+
:param segments: number of vertices in the base circle
|
|
507
|
+
:type segments: int
|
|
508
|
+
:param radius1: radius of one end
|
|
509
|
+
:type radius1: float
|
|
510
|
+
:param radius2: radius of the opposite
|
|
511
|
+
:type radius2: float
|
|
512
|
+
:param depth: distance between ends
|
|
513
|
+
:type depth: float
|
|
514
|
+
:param matrix: matrix to multiply the new geometry with
|
|
515
|
+
:type matrix: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
516
|
+
:param calc_uvs: calculate default UVs
|
|
517
|
+
:type calc_uvs: bool
|
|
518
|
+
:return: verts: output verts
|
|
519
|
+
|
|
520
|
+
type list of (`bmesh.types.BMVert`)
|
|
521
|
+
:rtype: typing.Dict
|
|
456
522
|
"""
|
|
457
523
|
|
|
458
524
|
...
|
|
459
525
|
|
|
460
526
|
def create_cube(
|
|
461
|
-
bm:
|
|
527
|
+
bm: bmesh.types.BMesh,
|
|
462
528
|
size: float = 0,
|
|
463
|
-
matrix: typing.Union[
|
|
464
|
-
typing.Sequence[float], "mathutils.Matrix"
|
|
465
|
-
] = "mathutils.Matrix.Identity(4)",
|
|
529
|
+
matrix: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
466
530
|
calc_uvs: bool = False,
|
|
467
531
|
) -> typing.Dict:
|
|
468
|
-
"""Create
|
|
532
|
+
"""Create CubeCreates a cube.
|
|
469
533
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
534
|
+
:param bm: The bmesh to operate on.
|
|
535
|
+
:type bm: bmesh.types.BMesh
|
|
536
|
+
:param size: size of the cube
|
|
537
|
+
:type size: float
|
|
538
|
+
:param matrix: matrix to multiply the new geometry with
|
|
539
|
+
:type matrix: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
540
|
+
:param calc_uvs: calculate default UVs
|
|
541
|
+
:type calc_uvs: bool
|
|
542
|
+
:return: verts: output verts
|
|
543
|
+
|
|
544
|
+
type list of (`bmesh.types.BMVert`)
|
|
545
|
+
:rtype: typing.Dict
|
|
480
546
|
"""
|
|
481
547
|
|
|
482
548
|
...
|
|
483
549
|
|
|
484
550
|
def create_grid(
|
|
485
|
-
bm:
|
|
551
|
+
bm: bmesh.types.BMesh,
|
|
486
552
|
x_segments: int = 0,
|
|
487
553
|
y_segments: int = 0,
|
|
488
554
|
size: float = 0,
|
|
489
|
-
matrix: typing.Union[
|
|
490
|
-
typing.Sequence[float], "mathutils.Matrix"
|
|
491
|
-
] = "mathutils.Matrix.Identity(4)",
|
|
555
|
+
matrix: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
492
556
|
calc_uvs: bool = False,
|
|
493
557
|
) -> typing.Dict:
|
|
494
|
-
"""Create Grid.
|
|
558
|
+
"""Create Grid.Creates a grid with a variable number of subdivisions
|
|
495
559
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
560
|
+
:param bm: The bmesh to operate on.
|
|
561
|
+
:type bm: bmesh.types.BMesh
|
|
562
|
+
:param x_segments: number of x segments
|
|
563
|
+
:type x_segments: int
|
|
564
|
+
:param y_segments: number of y segments
|
|
565
|
+
:type y_segments: int
|
|
566
|
+
:param size: size of the grid
|
|
567
|
+
:type size: float
|
|
568
|
+
:param matrix: matrix to multiply the new geometry with
|
|
569
|
+
:type matrix: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
570
|
+
:param calc_uvs: calculate default UVs
|
|
571
|
+
:type calc_uvs: bool
|
|
572
|
+
:return: verts: output verts
|
|
573
|
+
|
|
574
|
+
type list of (`bmesh.types.BMVert`)
|
|
575
|
+
:rtype: typing.Dict
|
|
510
576
|
"""
|
|
511
577
|
|
|
512
578
|
...
|
|
513
579
|
|
|
514
580
|
def create_icosphere(
|
|
515
|
-
bm:
|
|
581
|
+
bm: bmesh.types.BMesh,
|
|
516
582
|
subdivisions: int = 0,
|
|
517
583
|
radius: float = 0,
|
|
518
|
-
matrix: typing.Union[
|
|
519
|
-
typing.Sequence[float], "mathutils.Matrix"
|
|
520
|
-
] = "mathutils.Matrix.Identity(4)",
|
|
584
|
+
matrix: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
521
585
|
calc_uvs: bool = False,
|
|
522
586
|
) -> typing.Dict:
|
|
523
|
-
"""Create Ico-Sphere.
|
|
587
|
+
"""Create Ico-Sphere.Creates a grid with a variable number of subdivisions
|
|
524
588
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
589
|
+
:param bm: The bmesh to operate on.
|
|
590
|
+
:type bm: bmesh.types.BMesh
|
|
591
|
+
:param subdivisions: how many times to recursively subdivide the sphere
|
|
592
|
+
:type subdivisions: int
|
|
593
|
+
:param radius: radius
|
|
594
|
+
:type radius: float
|
|
595
|
+
:param matrix: matrix to multiply the new geometry with
|
|
596
|
+
:type matrix: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
597
|
+
:param calc_uvs: calculate default UVs
|
|
598
|
+
:type calc_uvs: bool
|
|
599
|
+
:return: verts: output verts
|
|
600
|
+
|
|
601
|
+
type list of (`bmesh.types.BMVert`)
|
|
602
|
+
:rtype: typing.Dict
|
|
537
603
|
"""
|
|
538
604
|
|
|
539
605
|
...
|
|
540
606
|
|
|
541
607
|
def create_monkey(
|
|
542
|
-
bm:
|
|
543
|
-
matrix: typing.Union[
|
|
544
|
-
typing.Sequence[float], "mathutils.Matrix"
|
|
545
|
-
] = "mathutils.Matrix.Identity(4)",
|
|
608
|
+
bm: bmesh.types.BMesh,
|
|
609
|
+
matrix: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
546
610
|
calc_uvs: bool = False,
|
|
547
611
|
) -> typing.Dict:
|
|
548
|
-
"""Create Suzanne.
|
|
612
|
+
"""Create Suzanne.Creates a monkey (standard blender primitive).
|
|
549
613
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
614
|
+
:param bm: The bmesh to operate on.
|
|
615
|
+
:type bm: bmesh.types.BMesh
|
|
616
|
+
:param matrix: matrix to multiply the new geometry with
|
|
617
|
+
:type matrix: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
618
|
+
:param calc_uvs: calculate default UVs
|
|
619
|
+
:type calc_uvs: bool
|
|
620
|
+
:return: verts: output verts
|
|
621
|
+
|
|
622
|
+
type list of (`bmesh.types.BMVert`)
|
|
623
|
+
:rtype: typing.Dict
|
|
558
624
|
"""
|
|
559
625
|
|
|
560
626
|
...
|
|
561
627
|
|
|
562
628
|
def create_uvsphere(
|
|
563
|
-
bm:
|
|
629
|
+
bm: bmesh.types.BMesh,
|
|
564
630
|
u_segments: int = 0,
|
|
565
631
|
v_segments: int = 0,
|
|
566
632
|
radius: float = 0,
|
|
567
|
-
matrix: typing.Union[
|
|
568
|
-
typing.Sequence[float], "mathutils.Matrix"
|
|
569
|
-
] = "mathutils.Matrix.Identity(4)",
|
|
633
|
+
matrix: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
570
634
|
calc_uvs: bool = False,
|
|
571
635
|
) -> typing.Dict:
|
|
572
|
-
"""Create UV Sphere.
|
|
636
|
+
"""Create UV Sphere.Creates a grid with a variable number of subdivisions
|
|
573
637
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
638
|
+
:param bm: The bmesh to operate on.
|
|
639
|
+
:type bm: bmesh.types.BMesh
|
|
640
|
+
:param u_segments: number of u segments
|
|
641
|
+
:type u_segments: int
|
|
642
|
+
:param v_segments: number of v segment
|
|
643
|
+
:type v_segments: int
|
|
644
|
+
:param radius: radius
|
|
645
|
+
:type radius: float
|
|
646
|
+
:param matrix: matrix to multiply the new geometry with
|
|
647
|
+
:type matrix: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
648
|
+
:param calc_uvs: calculate default UVs
|
|
649
|
+
:type calc_uvs: bool
|
|
650
|
+
:return: verts: output verts
|
|
651
|
+
|
|
652
|
+
type list of (`bmesh.types.BMVert`)
|
|
653
|
+
:rtype: typing.Dict
|
|
588
654
|
"""
|
|
589
655
|
|
|
590
656
|
...
|
|
591
657
|
|
|
592
658
|
def create_vert(
|
|
593
|
-
bm:
|
|
594
|
-
co: typing.Union[typing.Sequence[float],
|
|
659
|
+
bm: bmesh.types.BMesh,
|
|
660
|
+
co: typing.Union[typing.Sequence[float], mathutils.Vector] = None(),
|
|
595
661
|
) -> typing.Dict:
|
|
596
|
-
"""Make Vertex.
|
|
662
|
+
"""Make Vertex.Creates a single vertex; this BMOP was necessary
|
|
663
|
+
for click-create-vertex.
|
|
597
664
|
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
665
|
+
:param bm: The bmesh to operate on.
|
|
666
|
+
:type bm: bmesh.types.BMesh
|
|
667
|
+
:param co: the coordinate of the new vert
|
|
668
|
+
:type co: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
669
|
+
:return: vert: the new vert
|
|
670
|
+
|
|
671
|
+
type list of (`bmesh.types.BMVert`)
|
|
672
|
+
:rtype: typing.Dict
|
|
604
673
|
"""
|
|
605
674
|
|
|
606
675
|
...
|
|
607
676
|
|
|
608
677
|
def delete(
|
|
609
|
-
bm:
|
|
678
|
+
bm: bmesh.types.BMesh,
|
|
610
679
|
geom: typing.Union[
|
|
611
|
-
typing.List[
|
|
612
|
-
typing.List[
|
|
613
|
-
typing.List[
|
|
680
|
+
typing.List[bmesh.types.BMVert],
|
|
681
|
+
typing.List[bmesh.types.BMEdge],
|
|
682
|
+
typing.List[bmesh.types.BMFace],
|
|
614
683
|
] = [],
|
|
615
684
|
context: typing.Union[str, int] = "VERTS",
|
|
616
685
|
):
|
|
617
|
-
"""Delete Geometry.
|
|
686
|
+
"""Delete Geometry.Utility operator to delete geometry.
|
|
618
687
|
|
|
619
688
|
:param bm: The bmesh to operate on.
|
|
620
|
-
:type bm:
|
|
689
|
+
:type bm: bmesh.types.BMesh
|
|
621
690
|
:param geom: input geometry
|
|
622
|
-
:type geom: typing.Union[typing.List[
|
|
691
|
+
:type geom: typing.Union[typing.List[bmesh.types.BMVert], typing.List[bmesh.types.BMEdge], typing.List[bmesh.types.BMFace]]
|
|
623
692
|
:param context: geometry types to delete
|
|
624
693
|
:type context: typing.Union[str, int]
|
|
625
694
|
"""
|
|
@@ -627,103 +696,106 @@ def delete(
|
|
|
627
696
|
...
|
|
628
697
|
|
|
629
698
|
def dissolve_degenerate(
|
|
630
|
-
bm:
|
|
631
|
-
dist: float = 0,
|
|
632
|
-
edges: typing.List["bmesh.types.BMEdge"] = [],
|
|
699
|
+
bm: bmesh.types.BMesh, dist: float = 0, edges: typing.List[bmesh.types.BMEdge] = []
|
|
633
700
|
):
|
|
634
|
-
"""Degenerate Dissolve.
|
|
701
|
+
"""Degenerate Dissolve.Dissolve edges with no length, faces with no area.
|
|
635
702
|
|
|
636
703
|
:param bm: The bmesh to operate on.
|
|
637
|
-
:type bm:
|
|
704
|
+
:type bm: bmesh.types.BMesh
|
|
638
705
|
:param dist: maximum distance to consider degenerate
|
|
639
706
|
:type dist: float
|
|
640
707
|
:param edges: input edges
|
|
641
|
-
:type edges: typing.List[
|
|
708
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
642
709
|
"""
|
|
643
710
|
|
|
644
711
|
...
|
|
645
712
|
|
|
646
713
|
def dissolve_edges(
|
|
647
|
-
bm:
|
|
648
|
-
edges: typing.List[
|
|
714
|
+
bm: bmesh.types.BMesh,
|
|
715
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
649
716
|
use_verts: bool = False,
|
|
650
717
|
use_face_split: bool = False,
|
|
651
718
|
) -> typing.Dict:
|
|
652
719
|
"""Dissolve Edges.
|
|
653
720
|
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
721
|
+
:param bm: The bmesh to operate on.
|
|
722
|
+
:type bm: bmesh.types.BMesh
|
|
723
|
+
:param edges: input edges
|
|
724
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
725
|
+
:param use_verts: dissolve verts left between only 2 edges.
|
|
726
|
+
:type use_verts: bool
|
|
727
|
+
:param use_face_split: split off face corners to maintain surrounding geometry
|
|
728
|
+
:type use_face_split: bool
|
|
729
|
+
:return: region:
|
|
730
|
+
|
|
731
|
+
type list of (`bmesh.types.BMFace`)
|
|
732
|
+
:rtype: typing.Dict
|
|
664
733
|
"""
|
|
665
734
|
|
|
666
735
|
...
|
|
667
736
|
|
|
668
737
|
def dissolve_faces(
|
|
669
|
-
bm:
|
|
670
|
-
faces: typing.List[
|
|
738
|
+
bm: bmesh.types.BMesh,
|
|
739
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
671
740
|
use_verts: bool = False,
|
|
672
741
|
) -> typing.Dict:
|
|
673
742
|
"""Dissolve Faces.
|
|
674
743
|
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
744
|
+
:param bm: The bmesh to operate on.
|
|
745
|
+
:type bm: bmesh.types.BMesh
|
|
746
|
+
:param faces: input faces
|
|
747
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
748
|
+
:param use_verts: dissolve verts left between only 2 edges.
|
|
749
|
+
:type use_verts: bool
|
|
750
|
+
:return: region:
|
|
751
|
+
|
|
752
|
+
type list of (`bmesh.types.BMFace`)
|
|
753
|
+
:rtype: typing.Dict
|
|
683
754
|
"""
|
|
684
755
|
|
|
685
756
|
...
|
|
686
757
|
|
|
687
758
|
def dissolve_limit(
|
|
688
|
-
bm:
|
|
759
|
+
bm: bmesh.types.BMesh,
|
|
689
760
|
angle_limit: float = 0,
|
|
690
761
|
use_dissolve_boundaries: bool = False,
|
|
691
|
-
verts: typing.List[
|
|
692
|
-
edges: typing.List[
|
|
693
|
-
delimit
|
|
762
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
763
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
764
|
+
delimit=None(),
|
|
694
765
|
) -> typing.Dict:
|
|
695
|
-
"""Limited Dissolve.
|
|
766
|
+
"""Limited Dissolve.Dissolve planar faces and co-linear edges.
|
|
696
767
|
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
768
|
+
:param bm: The bmesh to operate on.
|
|
769
|
+
:type bm: bmesh.types.BMesh
|
|
770
|
+
:param angle_limit: total rotation angle (radians)
|
|
771
|
+
:type angle_limit: float
|
|
772
|
+
:param use_dissolve_boundaries: dissolve all vertices in between face boundaries
|
|
773
|
+
:type use_dissolve_boundaries: bool
|
|
774
|
+
:param verts: input vertices
|
|
775
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
776
|
+
:param edges: input edges
|
|
777
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
778
|
+
:param delimit: delimit dissolve operation
|
|
779
|
+
:return: region:
|
|
780
|
+
|
|
781
|
+
type list of (`bmesh.types.BMFace`)
|
|
782
|
+
:rtype: typing.Dict
|
|
711
783
|
"""
|
|
712
784
|
|
|
713
785
|
...
|
|
714
786
|
|
|
715
787
|
def dissolve_verts(
|
|
716
|
-
bm:
|
|
717
|
-
verts: typing.List[
|
|
788
|
+
bm: bmesh.types.BMesh,
|
|
789
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
718
790
|
use_face_split: bool = False,
|
|
719
791
|
use_boundary_tear: bool = False,
|
|
720
792
|
):
|
|
721
793
|
"""Dissolve Verts.
|
|
722
794
|
|
|
723
795
|
:param bm: The bmesh to operate on.
|
|
724
|
-
:type bm:
|
|
796
|
+
:type bm: bmesh.types.BMesh
|
|
725
797
|
:param verts: input vertices
|
|
726
|
-
:type verts: typing.List[
|
|
798
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
727
799
|
:param use_face_split: split off face corners to maintain surrounding geometry
|
|
728
800
|
:type use_face_split: bool
|
|
729
801
|
:param use_boundary_tear: split off face corners instead of merging faces
|
|
@@ -733,333 +805,389 @@ def dissolve_verts(
|
|
|
733
805
|
...
|
|
734
806
|
|
|
735
807
|
def duplicate(
|
|
736
|
-
bm:
|
|
808
|
+
bm: bmesh.types.BMesh,
|
|
737
809
|
geom: typing.Union[
|
|
738
|
-
typing.List[
|
|
739
|
-
typing.List[
|
|
740
|
-
typing.List[
|
|
810
|
+
typing.List[bmesh.types.BMVert],
|
|
811
|
+
typing.List[bmesh.types.BMEdge],
|
|
812
|
+
typing.List[bmesh.types.BMFace],
|
|
741
813
|
] = [],
|
|
742
|
-
dest:
|
|
814
|
+
dest: bmesh.types.BMesh = None,
|
|
743
815
|
use_select_history: bool = False,
|
|
744
816
|
use_edge_flip_from_face: bool = False,
|
|
745
817
|
) -> typing.Dict:
|
|
746
|
-
"""Duplicate Geometry.
|
|
818
|
+
"""Duplicate Geometry.Utility operator to duplicate geometry,
|
|
819
|
+
optionally into a destination mesh.
|
|
747
820
|
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
821
|
+
:param bm: The bmesh to operate on.
|
|
822
|
+
:type bm: bmesh.types.BMesh
|
|
823
|
+
:param geom: input geometry
|
|
824
|
+
:type geom: typing.Union[typing.List[bmesh.types.BMVert], typing.List[bmesh.types.BMEdge], typing.List[bmesh.types.BMFace]]
|
|
825
|
+
:param dest: destination bmesh, if None will use current on
|
|
826
|
+
:type dest: bmesh.types.BMesh
|
|
827
|
+
:param use_select_history: Undocumented.
|
|
828
|
+
:type use_select_history: bool
|
|
829
|
+
:param use_edge_flip_from_face: Undocumented.
|
|
830
|
+
:type use_edge_flip_from_face: bool
|
|
831
|
+
:return: geom_orig:
|
|
832
|
+
|
|
833
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
834
|
+
|
|
835
|
+
geom:
|
|
836
|
+
|
|
837
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
838
|
+
|
|
839
|
+
vert_map:
|
|
840
|
+
|
|
841
|
+
type dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
|
|
842
|
+
|
|
843
|
+
edge_map:
|
|
844
|
+
|
|
845
|
+
type dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
|
|
846
|
+
|
|
847
|
+
face_map:
|
|
848
|
+
|
|
849
|
+
type dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
|
|
850
|
+
|
|
851
|
+
boundary_map:
|
|
852
|
+
|
|
853
|
+
type dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
|
|
854
|
+
|
|
855
|
+
isovert_map:
|
|
856
|
+
|
|
857
|
+
type dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
|
|
858
|
+
:rtype: typing.Dict
|
|
760
859
|
"""
|
|
761
860
|
|
|
762
861
|
...
|
|
763
862
|
|
|
764
863
|
def edgeloop_fill(
|
|
765
|
-
bm:
|
|
766
|
-
edges: typing.List[
|
|
864
|
+
bm: bmesh.types.BMesh,
|
|
865
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
767
866
|
mat_nr: int = 0,
|
|
768
867
|
use_smooth: bool = False,
|
|
769
868
|
) -> typing.Dict:
|
|
770
|
-
"""Edge Loop Fill.
|
|
869
|
+
"""Edge Loop Fill.Create faces defined by one or more non overlapping edge loops.
|
|
771
870
|
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
871
|
+
:param bm: The bmesh to operate on.
|
|
872
|
+
:type bm: bmesh.types.BMesh
|
|
873
|
+
:param edges: input edges
|
|
874
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
875
|
+
:param mat_nr: material to use
|
|
876
|
+
:type mat_nr: int
|
|
877
|
+
:param use_smooth: smooth state to use
|
|
878
|
+
:type use_smooth: bool
|
|
879
|
+
:return: faces: new faces
|
|
880
|
+
|
|
881
|
+
type list of (`bmesh.types.BMFace`)
|
|
882
|
+
:rtype: typing.Dict
|
|
782
883
|
"""
|
|
783
884
|
|
|
784
885
|
...
|
|
785
886
|
|
|
786
887
|
def edgenet_fill(
|
|
787
|
-
bm:
|
|
788
|
-
edges: typing.List[
|
|
888
|
+
bm: bmesh.types.BMesh,
|
|
889
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
789
890
|
mat_nr: int = 0,
|
|
790
891
|
use_smooth: bool = False,
|
|
791
892
|
sides: int = 0,
|
|
792
893
|
) -> typing.Dict:
|
|
793
|
-
"""Edge Net Fill.
|
|
894
|
+
"""Edge Net Fill.Create faces defined by enclosed edges.
|
|
794
895
|
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
896
|
+
:param bm: The bmesh to operate on.
|
|
897
|
+
:type bm: bmesh.types.BMesh
|
|
898
|
+
:param edges: input edges
|
|
899
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
900
|
+
:param mat_nr: material to use
|
|
901
|
+
:type mat_nr: int
|
|
902
|
+
:param use_smooth: smooth state to use
|
|
903
|
+
:type use_smooth: bool
|
|
904
|
+
:param sides: number of sides
|
|
905
|
+
:type sides: int
|
|
906
|
+
:return: faces: new faces
|
|
907
|
+
|
|
908
|
+
type list of (`bmesh.types.BMFace`)
|
|
909
|
+
:rtype: typing.Dict
|
|
807
910
|
"""
|
|
808
911
|
|
|
809
912
|
...
|
|
810
913
|
|
|
811
914
|
def edgenet_prepare(
|
|
812
|
-
bm:
|
|
915
|
+
bm: bmesh.types.BMesh, edges: typing.List[bmesh.types.BMEdge] = []
|
|
813
916
|
) -> typing.Dict:
|
|
814
|
-
"""Edge-net Prepare.
|
|
917
|
+
"""Edge-net Prepare.Identifies several useful edge loop cases and modifies them so
|
|
918
|
+
they'll become a face when edgenet_fill is called. The cases covered are:
|
|
815
919
|
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
920
|
+
:param bm: The bmesh to operate on.
|
|
921
|
+
:type bm: bmesh.types.BMesh
|
|
922
|
+
:param edges: input edges
|
|
923
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
924
|
+
:return: edges: new edges
|
|
925
|
+
|
|
926
|
+
type list of (`bmesh.types.BMEdge`)
|
|
927
|
+
:rtype: typing.Dict
|
|
822
928
|
"""
|
|
823
929
|
|
|
824
930
|
...
|
|
825
931
|
|
|
826
932
|
def extrude_discrete_faces(
|
|
827
|
-
bm:
|
|
828
|
-
faces: typing.List[
|
|
933
|
+
bm: bmesh.types.BMesh,
|
|
934
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
829
935
|
use_normal_flip: bool = False,
|
|
830
936
|
use_select_history: bool = False,
|
|
831
937
|
) -> typing.Dict:
|
|
832
|
-
"""Individual Face Extrude.
|
|
938
|
+
"""Individual Face Extrude.Extrudes faces individually.
|
|
833
939
|
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
940
|
+
:param bm: The bmesh to operate on.
|
|
941
|
+
:type bm: bmesh.types.BMesh
|
|
942
|
+
:param faces: input faces
|
|
943
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
944
|
+
:param use_normal_flip: Create faces with reversed direction.
|
|
945
|
+
:type use_normal_flip: bool
|
|
946
|
+
:param use_select_history: pass to duplicate
|
|
947
|
+
:type use_select_history: bool
|
|
948
|
+
:return: faces: output faces
|
|
949
|
+
|
|
950
|
+
type list of (`bmesh.types.BMFace`)
|
|
951
|
+
:rtype: typing.Dict
|
|
844
952
|
"""
|
|
845
953
|
|
|
846
954
|
...
|
|
847
955
|
|
|
848
956
|
def extrude_edge_only(
|
|
849
|
-
bm:
|
|
850
|
-
edges: typing.List[
|
|
957
|
+
bm: bmesh.types.BMesh,
|
|
958
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
851
959
|
use_normal_flip: bool = False,
|
|
852
960
|
use_select_history: bool = False,
|
|
853
961
|
) -> typing.Dict:
|
|
854
|
-
"""Extrude Only Edges.
|
|
962
|
+
"""Extrude Only Edges.Extrudes Edges into faces, note that this is very simple, there's no fancy
|
|
963
|
+
winged extrusion.
|
|
855
964
|
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
965
|
+
:param bm: The bmesh to operate on.
|
|
966
|
+
:type bm: bmesh.types.BMesh
|
|
967
|
+
:param edges: input vertices
|
|
968
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
969
|
+
:param use_normal_flip: Create faces with reversed direction.
|
|
970
|
+
:type use_normal_flip: bool
|
|
971
|
+
:param use_select_history: pass to duplicate
|
|
972
|
+
:type use_select_history: bool
|
|
973
|
+
:return: geom: output geometry
|
|
974
|
+
|
|
975
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
976
|
+
:rtype: typing.Dict
|
|
866
977
|
"""
|
|
867
978
|
|
|
868
979
|
...
|
|
869
980
|
|
|
870
981
|
def extrude_face_region(
|
|
871
|
-
bm:
|
|
982
|
+
bm: bmesh.types.BMesh,
|
|
872
983
|
geom: typing.Union[
|
|
873
|
-
typing.List[
|
|
874
|
-
typing.List[
|
|
875
|
-
typing.List[
|
|
984
|
+
typing.List[bmesh.types.BMVert],
|
|
985
|
+
typing.List[bmesh.types.BMEdge],
|
|
986
|
+
typing.List[bmesh.types.BMFace],
|
|
876
987
|
] = [],
|
|
877
|
-
edges_exclude
|
|
988
|
+
edges_exclude=None(),
|
|
878
989
|
use_keep_orig: bool = False,
|
|
879
990
|
use_normal_flip: bool = False,
|
|
880
991
|
use_normal_from_adjacent: bool = False,
|
|
881
992
|
use_dissolve_ortho_edges: bool = False,
|
|
882
993
|
use_select_history: bool = False,
|
|
883
994
|
) -> typing.Dict:
|
|
884
|
-
"""Extrude Faces.
|
|
995
|
+
"""Extrude Faces.Extrude operator (does not transform)
|
|
885
996
|
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
997
|
+
:param bm: The bmesh to operate on.
|
|
998
|
+
:type bm: bmesh.types.BMesh
|
|
999
|
+
:param geom: edges and faces
|
|
1000
|
+
:type geom: typing.Union[typing.List[bmesh.types.BMVert], typing.List[bmesh.types.BMEdge], typing.List[bmesh.types.BMFace]]
|
|
1001
|
+
:param edges_exclude: input edges to explicitly exclude from extrusion
|
|
1002
|
+
:param use_keep_orig: keep original geometry (requires geom to include edges).
|
|
1003
|
+
:type use_keep_orig: bool
|
|
1004
|
+
:param use_normal_flip: Create faces with reversed direction.
|
|
1005
|
+
:type use_normal_flip: bool
|
|
1006
|
+
:param use_normal_from_adjacent: Use winding from surrounding faces instead of this region.
|
|
1007
|
+
:type use_normal_from_adjacent: bool
|
|
1008
|
+
:param use_dissolve_ortho_edges: Dissolve edges whose faces form a flat surface.
|
|
1009
|
+
:type use_dissolve_ortho_edges: bool
|
|
1010
|
+
:param use_select_history: pass to duplicate
|
|
1011
|
+
:type use_select_history: bool
|
|
1012
|
+
:return: geom:
|
|
1013
|
+
|
|
1014
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
1015
|
+
:rtype: typing.Dict
|
|
904
1016
|
"""
|
|
905
1017
|
|
|
906
1018
|
...
|
|
907
1019
|
|
|
908
1020
|
def extrude_vert_indiv(
|
|
909
|
-
bm:
|
|
910
|
-
verts: typing.List[
|
|
1021
|
+
bm: bmesh.types.BMesh,
|
|
1022
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
911
1023
|
use_select_history: bool = False,
|
|
912
1024
|
) -> typing.Dict:
|
|
913
|
-
"""Individual Vertex Extrude.
|
|
1025
|
+
"""Individual Vertex Extrude.Extrudes wire edges from vertices.
|
|
914
1026
|
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
1027
|
+
:param bm: The bmesh to operate on.
|
|
1028
|
+
:type bm: bmesh.types.BMesh
|
|
1029
|
+
:param verts: input vertices
|
|
1030
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
1031
|
+
:param use_select_history: pass to duplicate
|
|
1032
|
+
:type use_select_history: bool
|
|
1033
|
+
:return: edges: output wire edges
|
|
1034
|
+
|
|
1035
|
+
type list of (`bmesh.types.BMEdge`)
|
|
1036
|
+
|
|
1037
|
+
verts: output vertices
|
|
1038
|
+
|
|
1039
|
+
type list of (`bmesh.types.BMVert`)
|
|
1040
|
+
:rtype: typing.Dict
|
|
923
1041
|
"""
|
|
924
1042
|
|
|
925
1043
|
...
|
|
926
1044
|
|
|
927
1045
|
def face_attribute_fill(
|
|
928
|
-
bm:
|
|
929
|
-
faces: typing.List[
|
|
1046
|
+
bm: bmesh.types.BMesh,
|
|
1047
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
930
1048
|
use_normals: bool = False,
|
|
931
1049
|
use_data: bool = False,
|
|
932
1050
|
) -> typing.Dict:
|
|
933
|
-
"""Face Attribute Fill.
|
|
1051
|
+
"""Face Attribute Fill.Fill in faces with data from adjacent faces.
|
|
934
1052
|
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
1053
|
+
:param bm: The bmesh to operate on.
|
|
1054
|
+
:type bm: bmesh.types.BMesh
|
|
1055
|
+
:param faces: input faces
|
|
1056
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
1057
|
+
:param use_normals: copy face winding
|
|
1058
|
+
:type use_normals: bool
|
|
1059
|
+
:param use_data: copy face data
|
|
1060
|
+
:type use_data: bool
|
|
1061
|
+
:return: faces_fail: faces that could not be handled
|
|
1062
|
+
|
|
1063
|
+
type list of (`bmesh.types.BMFace`)
|
|
1064
|
+
:rtype: typing.Dict
|
|
945
1065
|
"""
|
|
946
1066
|
|
|
947
1067
|
...
|
|
948
1068
|
|
|
949
1069
|
def find_doubles(
|
|
950
|
-
bm:
|
|
951
|
-
verts: typing.List[
|
|
952
|
-
keep_verts: typing.List[
|
|
1070
|
+
bm: bmesh.types.BMesh,
|
|
1071
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
1072
|
+
keep_verts: typing.List[bmesh.types.BMVert] = [],
|
|
953
1073
|
dist: float = 0,
|
|
954
1074
|
) -> typing.Dict:
|
|
955
|
-
"""Find Doubles.
|
|
1075
|
+
"""Find Doubles.Takes input verts and find vertices they should weld to.
|
|
1076
|
+
Outputs a mapping slot suitable for use with the weld verts BMOP.If keep_verts is used, vertices outside that set can only be merged
|
|
1077
|
+
with vertices in that set.
|
|
956
1078
|
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1079
|
+
:param bm: The bmesh to operate on.
|
|
1080
|
+
:type bm: bmesh.types.BMesh
|
|
1081
|
+
:param verts: input vertices
|
|
1082
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
1083
|
+
:param keep_verts: list of verts to keep
|
|
1084
|
+
:type keep_verts: typing.List[bmesh.types.BMVert]
|
|
1085
|
+
:param dist: maximum distance
|
|
1086
|
+
:type dist: float
|
|
1087
|
+
:return: targetmap:
|
|
1088
|
+
|
|
1089
|
+
type dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
|
|
1090
|
+
:rtype: typing.Dict
|
|
967
1091
|
"""
|
|
968
1092
|
|
|
969
1093
|
...
|
|
970
1094
|
|
|
971
1095
|
def flip_quad_tessellation(
|
|
972
|
-
bm:
|
|
1096
|
+
bm: bmesh.types.BMesh, faces: typing.List[bmesh.types.BMFace] = []
|
|
973
1097
|
):
|
|
974
|
-
"""Flip Quad
|
|
1098
|
+
"""Flip Quad TessellationFlip the tessellation direction of the selected quads.
|
|
975
1099
|
|
|
976
1100
|
:param bm: The bmesh to operate on.
|
|
977
|
-
:type bm:
|
|
1101
|
+
:type bm: bmesh.types.BMesh
|
|
978
1102
|
:param faces: Undocumented.
|
|
979
|
-
:type faces: typing.List[
|
|
1103
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
980
1104
|
"""
|
|
981
1105
|
|
|
982
1106
|
...
|
|
983
1107
|
|
|
984
1108
|
def grid_fill(
|
|
985
|
-
bm:
|
|
986
|
-
edges: typing.List[
|
|
1109
|
+
bm: bmesh.types.BMesh,
|
|
1110
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
987
1111
|
mat_nr: int = 0,
|
|
988
1112
|
use_smooth: bool = False,
|
|
989
1113
|
use_interp_simple: bool = False,
|
|
990
1114
|
) -> typing.Dict:
|
|
991
|
-
"""Grid Fill.
|
|
1115
|
+
"""Grid Fill.Create faces defined by 2 disconnected edge loops (which share edges).
|
|
992
1116
|
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1117
|
+
:param bm: The bmesh to operate on.
|
|
1118
|
+
:type bm: bmesh.types.BMesh
|
|
1119
|
+
:param edges: input edges
|
|
1120
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
1121
|
+
:param mat_nr: material to use
|
|
1122
|
+
:type mat_nr: int
|
|
1123
|
+
:param use_smooth: smooth state to use
|
|
1124
|
+
:type use_smooth: bool
|
|
1125
|
+
:param use_interp_simple: use simple interpolation
|
|
1126
|
+
:type use_interp_simple: bool
|
|
1127
|
+
:return: faces: new faces
|
|
1128
|
+
|
|
1129
|
+
type list of (`bmesh.types.BMFace`)
|
|
1130
|
+
:rtype: typing.Dict
|
|
1005
1131
|
"""
|
|
1006
1132
|
|
|
1007
1133
|
...
|
|
1008
1134
|
|
|
1009
1135
|
def holes_fill(
|
|
1010
|
-
bm:
|
|
1011
|
-
edges: typing.List["bmesh.types.BMEdge"] = [],
|
|
1012
|
-
sides: int = 0,
|
|
1136
|
+
bm: bmesh.types.BMesh, edges: typing.List[bmesh.types.BMEdge] = [], sides: int = 0
|
|
1013
1137
|
) -> typing.Dict:
|
|
1014
|
-
"""Fill Holes.
|
|
1138
|
+
"""Fill Holes.Fill boundary edges with faces, copying surrounding customdata.
|
|
1015
1139
|
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1140
|
+
:param bm: The bmesh to operate on.
|
|
1141
|
+
:type bm: bmesh.types.BMesh
|
|
1142
|
+
:param edges: input edges
|
|
1143
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
1144
|
+
:param sides: number of face sides to fill
|
|
1145
|
+
:type sides: int
|
|
1146
|
+
:return: faces: new faces
|
|
1147
|
+
|
|
1148
|
+
type list of (`bmesh.types.BMFace`)
|
|
1149
|
+
:rtype: typing.Dict
|
|
1024
1150
|
"""
|
|
1025
1151
|
|
|
1026
1152
|
...
|
|
1027
1153
|
|
|
1028
1154
|
def inset_individual(
|
|
1029
|
-
bm:
|
|
1030
|
-
faces: typing.List[
|
|
1155
|
+
bm: bmesh.types.BMesh,
|
|
1156
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
1031
1157
|
thickness: float = 0,
|
|
1032
1158
|
depth: float = 0,
|
|
1033
1159
|
use_even_offset: bool = False,
|
|
1034
1160
|
use_interpolate: bool = False,
|
|
1035
1161
|
use_relative_offset: bool = False,
|
|
1036
1162
|
) -> typing.Dict:
|
|
1037
|
-
"""Face Inset (Individual).
|
|
1163
|
+
"""Face Inset (Individual).Insets individual faces.
|
|
1038
1164
|
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1165
|
+
:param bm: The bmesh to operate on.
|
|
1166
|
+
:type bm: bmesh.types.BMesh
|
|
1167
|
+
:param faces: input faces
|
|
1168
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
1169
|
+
:param thickness: thickness
|
|
1170
|
+
:type thickness: float
|
|
1171
|
+
:param depth: depth
|
|
1172
|
+
:type depth: float
|
|
1173
|
+
:param use_even_offset: scale the offset to give more even thickness
|
|
1174
|
+
:type use_even_offset: bool
|
|
1175
|
+
:param use_interpolate: blend face data across the inset
|
|
1176
|
+
:type use_interpolate: bool
|
|
1177
|
+
:param use_relative_offset: scale the offset by surrounding geometry
|
|
1178
|
+
:type use_relative_offset: bool
|
|
1179
|
+
:return: faces: output faces
|
|
1180
|
+
|
|
1181
|
+
type list of (`bmesh.types.BMFace`)
|
|
1182
|
+
:rtype: typing.Dict
|
|
1055
1183
|
"""
|
|
1056
1184
|
|
|
1057
1185
|
...
|
|
1058
1186
|
|
|
1059
1187
|
def inset_region(
|
|
1060
|
-
bm:
|
|
1061
|
-
faces: typing.List[
|
|
1062
|
-
faces_exclude: typing.List[
|
|
1188
|
+
bm: bmesh.types.BMesh,
|
|
1189
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
1190
|
+
faces_exclude: typing.List[bmesh.types.BMFace] = [],
|
|
1063
1191
|
use_boundary: bool = False,
|
|
1064
1192
|
use_even_offset: bool = False,
|
|
1065
1193
|
use_interpolate: bool = False,
|
|
@@ -1069,39 +1197,41 @@ def inset_region(
|
|
|
1069
1197
|
depth: float = 0,
|
|
1070
1198
|
use_outset: bool = False,
|
|
1071
1199
|
) -> typing.Dict:
|
|
1072
|
-
"""Face Inset (Regions).
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1200
|
+
"""Face Inset (Regions).Inset or outset face regions.
|
|
1201
|
+
|
|
1202
|
+
:param bm: The bmesh to operate on.
|
|
1203
|
+
:type bm: bmesh.types.BMesh
|
|
1204
|
+
:param faces: input faces
|
|
1205
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
1206
|
+
:param faces_exclude: input faces to explicitly exclude from inset
|
|
1207
|
+
:type faces_exclude: typing.List[bmesh.types.BMFace]
|
|
1208
|
+
:param use_boundary: inset face boundaries
|
|
1209
|
+
:type use_boundary: bool
|
|
1210
|
+
:param use_even_offset: scale the offset to give more even thickness
|
|
1211
|
+
:type use_even_offset: bool
|
|
1212
|
+
:param use_interpolate: blend face data across the inset
|
|
1213
|
+
:type use_interpolate: bool
|
|
1214
|
+
:param use_relative_offset: scale the offset by surrounding geometry
|
|
1215
|
+
:type use_relative_offset: bool
|
|
1216
|
+
:param use_edge_rail: inset the region along existing edges
|
|
1217
|
+
:type use_edge_rail: bool
|
|
1218
|
+
:param thickness: thickness
|
|
1219
|
+
:type thickness: float
|
|
1220
|
+
:param depth: depth
|
|
1221
|
+
:type depth: float
|
|
1222
|
+
:param use_outset: outset rather than inset
|
|
1223
|
+
:type use_outset: bool
|
|
1224
|
+
:return: faces: output faces
|
|
1225
|
+
|
|
1226
|
+
type list of (`bmesh.types.BMFace`)
|
|
1227
|
+
:rtype: typing.Dict
|
|
1098
1228
|
"""
|
|
1099
1229
|
|
|
1100
1230
|
...
|
|
1101
1231
|
|
|
1102
1232
|
def join_triangles(
|
|
1103
|
-
bm:
|
|
1104
|
-
faces: typing.List[
|
|
1233
|
+
bm: bmesh.types.BMesh,
|
|
1234
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
1105
1235
|
cmp_seam: bool = False,
|
|
1106
1236
|
cmp_sharp: bool = False,
|
|
1107
1237
|
cmp_uvs: bool = False,
|
|
@@ -1110,62 +1240,64 @@ def join_triangles(
|
|
|
1110
1240
|
angle_face_threshold: float = 0,
|
|
1111
1241
|
angle_shape_threshold: float = 0,
|
|
1112
1242
|
) -> typing.Dict:
|
|
1113
|
-
"""Join Triangles.
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1243
|
+
"""Join Triangles.Tries to intelligently join triangles according
|
|
1244
|
+
to angle threshold and delimiters.
|
|
1245
|
+
|
|
1246
|
+
:param bm: The bmesh to operate on.
|
|
1247
|
+
:type bm: bmesh.types.BMesh
|
|
1248
|
+
:param faces: input geometry.
|
|
1249
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
1250
|
+
:param cmp_seam: Compare seam
|
|
1251
|
+
:type cmp_seam: bool
|
|
1252
|
+
:param cmp_sharp: Compare sharp
|
|
1253
|
+
:type cmp_sharp: bool
|
|
1254
|
+
:param cmp_uvs: Compare UVs
|
|
1255
|
+
:type cmp_uvs: bool
|
|
1256
|
+
:param cmp_vcols: compare VCols
|
|
1257
|
+
:type cmp_vcols: bool
|
|
1258
|
+
:param cmp_materials: compare materials
|
|
1259
|
+
:type cmp_materials: bool
|
|
1260
|
+
:param angle_face_threshold: Undocumented.
|
|
1261
|
+
:type angle_face_threshold: float
|
|
1262
|
+
:param angle_shape_threshold: Undocumented.
|
|
1263
|
+
:type angle_shape_threshold: float
|
|
1264
|
+
:return: faces: joined faces
|
|
1265
|
+
|
|
1266
|
+
type list of (`bmesh.types.BMFace`)
|
|
1267
|
+
:rtype: typing.Dict
|
|
1135
1268
|
"""
|
|
1136
1269
|
|
|
1137
1270
|
...
|
|
1138
1271
|
|
|
1139
1272
|
def mesh_to_bmesh(
|
|
1140
|
-
bm:
|
|
1141
|
-
mesh:
|
|
1142
|
-
object:
|
|
1273
|
+
bm: bmesh.types.BMesh,
|
|
1274
|
+
mesh: bpy.types.Mesh,
|
|
1275
|
+
object: bpy.types.Object,
|
|
1143
1276
|
use_shapekey: bool = False,
|
|
1144
1277
|
):
|
|
1145
|
-
"""Mesh to BMesh.
|
|
1278
|
+
"""Mesh to BMesh.Load the contents of a mesh into the bmesh. this BMOP is private, it's
|
|
1279
|
+
reserved exclusively for entering editmode.
|
|
1146
1280
|
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1281
|
+
:param bm: The bmesh to operate on.
|
|
1282
|
+
:type bm: bmesh.types.BMesh
|
|
1283
|
+
:param mesh: pointer to a Mesh structure
|
|
1284
|
+
:type mesh: bpy.types.Mesh
|
|
1285
|
+
:param object: pointer to an Object structure
|
|
1286
|
+
:type object: bpy.types.Object
|
|
1287
|
+
:param use_shapekey: load active shapekey coordinates into verts
|
|
1288
|
+
:type use_shapekey: bool
|
|
1155
1289
|
"""
|
|
1156
1290
|
|
|
1157
1291
|
...
|
|
1158
1292
|
|
|
1159
1293
|
def mirror(
|
|
1160
|
-
bm:
|
|
1294
|
+
bm: bmesh.types.BMesh,
|
|
1161
1295
|
geom: typing.Union[
|
|
1162
|
-
typing.List[
|
|
1163
|
-
typing.List[
|
|
1164
|
-
typing.List[
|
|
1296
|
+
typing.List[bmesh.types.BMVert],
|
|
1297
|
+
typing.List[bmesh.types.BMEdge],
|
|
1298
|
+
typing.List[bmesh.types.BMFace],
|
|
1165
1299
|
] = [],
|
|
1166
|
-
matrix: typing.Union[
|
|
1167
|
-
typing.Sequence[float], "mathutils.Matrix"
|
|
1168
|
-
] = "mathutils.Matrix.Identity(4)",
|
|
1300
|
+
matrix: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
1169
1301
|
merge_dist: float = 0,
|
|
1170
1302
|
axis: typing.Union[str, int] = "X",
|
|
1171
1303
|
mirror_u: bool = False,
|
|
@@ -1173,220 +1305,236 @@ def mirror(
|
|
|
1173
1305
|
mirror_udim: bool = False,
|
|
1174
1306
|
use_shapekey: bool = False,
|
|
1175
1307
|
) -> typing.Dict:
|
|
1176
|
-
"""Mirror.
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1308
|
+
"""Mirror.Mirrors geometry along an axis. The resulting geometry is welded on using
|
|
1309
|
+
merge_dist. Pairs of original/mirrored vertices are welded using the merge_dist
|
|
1310
|
+
parameter (which defines the minimum distance for welding to happen).
|
|
1311
|
+
|
|
1312
|
+
:param bm: The bmesh to operate on.
|
|
1313
|
+
:type bm: bmesh.types.BMesh
|
|
1314
|
+
:param geom: input geometry
|
|
1315
|
+
:type geom: typing.Union[typing.List[bmesh.types.BMVert], typing.List[bmesh.types.BMEdge], typing.List[bmesh.types.BMFace]]
|
|
1316
|
+
:param matrix: matrix defining the mirror transformation
|
|
1317
|
+
:type matrix: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
1318
|
+
:param merge_dist: maximum distance for merging. does no merging if 0.
|
|
1319
|
+
:type merge_dist: float
|
|
1320
|
+
:param axis: the axis to use.
|
|
1321
|
+
:type axis: typing.Union[str, int]
|
|
1322
|
+
:param mirror_u: mirror UVs across the u axis
|
|
1323
|
+
:type mirror_u: bool
|
|
1324
|
+
:param mirror_v: mirror UVs across the v axis
|
|
1325
|
+
:type mirror_v: bool
|
|
1326
|
+
:param mirror_udim: mirror UVs in each tile
|
|
1327
|
+
:type mirror_udim: bool
|
|
1328
|
+
:param use_shapekey: Transform shape keys too.
|
|
1329
|
+
:type use_shapekey: bool
|
|
1330
|
+
:return: geom: output geometry, mirrored
|
|
1331
|
+
|
|
1332
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
1333
|
+
:rtype: typing.Dict
|
|
1198
1334
|
"""
|
|
1199
1335
|
|
|
1200
1336
|
...
|
|
1201
1337
|
|
|
1202
1338
|
def object_load_bmesh(
|
|
1203
|
-
bm:
|
|
1339
|
+
bm: bmesh.types.BMesh, scene: bpy.types.Scene, object: bpy.types.Object
|
|
1204
1340
|
):
|
|
1205
|
-
"""Object Load BMesh.
|
|
1341
|
+
"""Object Load BMesh.Loads a bmesh into an object/mesh. This is a "private"
|
|
1342
|
+
BMOP.
|
|
1206
1343
|
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1344
|
+
:param bm: The bmesh to operate on.
|
|
1345
|
+
:type bm: bmesh.types.BMesh
|
|
1346
|
+
:param scene: pointer to an scene structure
|
|
1347
|
+
:type scene: bpy.types.Scene
|
|
1348
|
+
:param object: pointer to an object structure
|
|
1349
|
+
:type object: bpy.types.Object
|
|
1213
1350
|
"""
|
|
1214
1351
|
|
|
1215
1352
|
...
|
|
1216
1353
|
|
|
1217
1354
|
def offset_edgeloops(
|
|
1218
|
-
bm:
|
|
1219
|
-
edges: typing.List[
|
|
1355
|
+
bm: bmesh.types.BMesh,
|
|
1356
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
1220
1357
|
use_cap_endpoint: bool = False,
|
|
1221
1358
|
) -> typing.Dict:
|
|
1222
|
-
"""Edge-loop Offset.
|
|
1359
|
+
"""Edge-loop Offset.Creates edge loops based on simple edge-outset method.
|
|
1223
1360
|
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1361
|
+
:param bm: The bmesh to operate on.
|
|
1362
|
+
:type bm: bmesh.types.BMesh
|
|
1363
|
+
:param edges: input edges
|
|
1364
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
1365
|
+
:param use_cap_endpoint: extend loop around end-points
|
|
1366
|
+
:type use_cap_endpoint: bool
|
|
1367
|
+
:return: edges: output edges
|
|
1368
|
+
|
|
1369
|
+
type list of (`bmesh.types.BMEdge`)
|
|
1370
|
+
:rtype: typing.Dict
|
|
1232
1371
|
"""
|
|
1233
1372
|
|
|
1234
1373
|
...
|
|
1235
1374
|
|
|
1236
1375
|
def planar_faces(
|
|
1237
|
-
bm:
|
|
1238
|
-
faces: typing.List[
|
|
1376
|
+
bm: bmesh.types.BMesh,
|
|
1377
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
1239
1378
|
iterations: int = 0,
|
|
1240
1379
|
factor: float = 0,
|
|
1241
1380
|
) -> typing.Dict:
|
|
1242
|
-
"""Planar Faces.
|
|
1381
|
+
"""Planar Faces.Iteratively flatten faces.
|
|
1243
1382
|
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1383
|
+
:param bm: The bmesh to operate on.
|
|
1384
|
+
:type bm: bmesh.types.BMesh
|
|
1385
|
+
:param faces: input geometry.
|
|
1386
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
1387
|
+
:param iterations: Number of times to flatten faces (for when connected faces are used)
|
|
1388
|
+
:type iterations: int
|
|
1389
|
+
:param factor: Influence for making planar each iteration
|
|
1390
|
+
:type factor: float
|
|
1391
|
+
:return: geom: output slot, computed boundary geometry.
|
|
1392
|
+
|
|
1393
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
1394
|
+
:rtype: typing.Dict
|
|
1254
1395
|
"""
|
|
1255
1396
|
|
|
1256
1397
|
...
|
|
1257
1398
|
|
|
1258
1399
|
def pointmerge(
|
|
1259
|
-
bm:
|
|
1260
|
-
verts: typing.List[
|
|
1261
|
-
merge_co: typing.Union[
|
|
1262
|
-
typing.Sequence[float], "mathutils.Vector"
|
|
1263
|
-
] = "mathutils.Vector()",
|
|
1400
|
+
bm: bmesh.types.BMesh,
|
|
1401
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
1402
|
+
merge_co: typing.Union[typing.Sequence[float], mathutils.Vector] = None(),
|
|
1264
1403
|
):
|
|
1265
|
-
"""Point Merge.
|
|
1404
|
+
"""Point Merge.Merge verts together at a point.
|
|
1266
1405
|
|
|
1267
1406
|
:param bm: The bmesh to operate on.
|
|
1268
|
-
:type bm:
|
|
1407
|
+
:type bm: bmesh.types.BMesh
|
|
1269
1408
|
:param verts: input vertices (all verts will be merged into the first).
|
|
1270
|
-
:type verts: typing.List[
|
|
1409
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
1271
1410
|
:param merge_co: Position to merge at.
|
|
1272
|
-
:type merge_co: typing.Union[typing.Sequence[float],
|
|
1411
|
+
:type merge_co: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1273
1412
|
"""
|
|
1274
1413
|
|
|
1275
1414
|
...
|
|
1276
1415
|
|
|
1277
1416
|
def pointmerge_facedata(
|
|
1278
|
-
bm:
|
|
1279
|
-
verts: typing.List[
|
|
1280
|
-
|
|
1281
|
-
vert_snap: "bmesh.types.BMVert",
|
|
1417
|
+
bm: bmesh.types.BMesh,
|
|
1418
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
1419
|
+
vert_snap: bmesh.types.BMVert = None,
|
|
1282
1420
|
):
|
|
1283
|
-
"""Face-Data Point Merge.
|
|
1421
|
+
"""Face-Data Point Merge.Merge uv/vcols at a specific vertex.
|
|
1284
1422
|
|
|
1285
1423
|
:param bm: The bmesh to operate on.
|
|
1286
|
-
:type bm:
|
|
1424
|
+
:type bm: bmesh.types.BMesh
|
|
1287
1425
|
:param verts: input vertices
|
|
1288
|
-
:type verts: typing.List[
|
|
1426
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
1289
1427
|
:param vert_snap: snap vertex
|
|
1290
|
-
:type vert_snap:
|
|
1428
|
+
:type vert_snap: bmesh.types.BMVert
|
|
1291
1429
|
"""
|
|
1292
1430
|
|
|
1293
1431
|
...
|
|
1294
1432
|
|
|
1295
1433
|
def poke(
|
|
1296
|
-
bm:
|
|
1297
|
-
faces: typing.List[
|
|
1434
|
+
bm: bmesh.types.BMesh,
|
|
1435
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
1298
1436
|
offset: float = 0,
|
|
1299
1437
|
center_mode: typing.Union[str, int] = "MEAN_WEIGHTED",
|
|
1300
1438
|
use_relative_offset: bool = False,
|
|
1301
1439
|
) -> typing.Dict:
|
|
1302
|
-
"""Pokes a face.
|
|
1440
|
+
"""Pokes a face.Splits a face into a triangle fan.
|
|
1303
1441
|
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1442
|
+
:param bm: The bmesh to operate on.
|
|
1443
|
+
:type bm: bmesh.types.BMesh
|
|
1444
|
+
:param faces: input faces
|
|
1445
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
1446
|
+
:param offset: center vertex offset along normal
|
|
1447
|
+
:type offset: float
|
|
1448
|
+
:param center_mode: calculation mode for center vertex
|
|
1449
|
+
:type center_mode: typing.Union[str, int]
|
|
1450
|
+
:param use_relative_offset: apply offset
|
|
1451
|
+
:type use_relative_offset: bool
|
|
1452
|
+
:return: verts: output verts
|
|
1453
|
+
|
|
1454
|
+
type list of (`bmesh.types.BMVert`)
|
|
1455
|
+
|
|
1456
|
+
faces: output faces
|
|
1457
|
+
|
|
1458
|
+
type list of (`bmesh.types.BMFace`)
|
|
1459
|
+
:rtype: typing.Dict
|
|
1316
1460
|
"""
|
|
1317
1461
|
|
|
1318
1462
|
...
|
|
1319
1463
|
|
|
1320
1464
|
def recalc_face_normals(
|
|
1321
|
-
bm:
|
|
1465
|
+
bm: bmesh.types.BMesh, faces: typing.List[bmesh.types.BMFace] = []
|
|
1322
1466
|
):
|
|
1323
|
-
"""Right-Hand Faces.
|
|
1467
|
+
"""Right-Hand Faces.Computes an "outside" normal for the specified input faces.
|
|
1324
1468
|
|
|
1325
1469
|
:param bm: The bmesh to operate on.
|
|
1326
|
-
:type bm:
|
|
1470
|
+
:type bm: bmesh.types.BMesh
|
|
1327
1471
|
:param faces: input faces
|
|
1328
|
-
:type faces: typing.List[
|
|
1472
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
1329
1473
|
"""
|
|
1330
1474
|
|
|
1331
1475
|
...
|
|
1332
1476
|
|
|
1333
1477
|
def region_extend(
|
|
1334
|
-
bm:
|
|
1478
|
+
bm: bmesh.types.BMesh,
|
|
1335
1479
|
geom: typing.Union[
|
|
1336
|
-
typing.List[
|
|
1337
|
-
typing.List[
|
|
1338
|
-
typing.List[
|
|
1480
|
+
typing.List[bmesh.types.BMVert],
|
|
1481
|
+
typing.List[bmesh.types.BMEdge],
|
|
1482
|
+
typing.List[bmesh.types.BMFace],
|
|
1339
1483
|
] = [],
|
|
1340
1484
|
use_contract: bool = False,
|
|
1341
1485
|
use_faces: bool = False,
|
|
1342
1486
|
use_face_step: bool = False,
|
|
1343
1487
|
) -> typing.Dict:
|
|
1344
|
-
"""Region Extend.
|
|
1488
|
+
"""Region Extend.used to implement the select more/less tools.
|
|
1489
|
+
this puts some geometry surrounding regions of
|
|
1490
|
+
geometry in geom into geom.out.if use_faces is 0 then geom.out spits out verts and edges,
|
|
1491
|
+
otherwise it spits out faces.
|
|
1345
1492
|
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1493
|
+
:param bm: The bmesh to operate on.
|
|
1494
|
+
:type bm: bmesh.types.BMesh
|
|
1495
|
+
:param geom: input geometry
|
|
1496
|
+
:type geom: typing.Union[typing.List[bmesh.types.BMVert], typing.List[bmesh.types.BMEdge], typing.List[bmesh.types.BMFace]]
|
|
1497
|
+
:param use_contract: find boundary inside the regions, not outside.
|
|
1498
|
+
:type use_contract: bool
|
|
1499
|
+
:param use_faces: extend from faces instead of edges
|
|
1500
|
+
:type use_faces: bool
|
|
1501
|
+
:param use_face_step: step over connected faces
|
|
1502
|
+
:type use_face_step: bool
|
|
1503
|
+
:return: geom: output slot, computed boundary geometry.
|
|
1504
|
+
|
|
1505
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
1506
|
+
:rtype: typing.Dict
|
|
1358
1507
|
"""
|
|
1359
1508
|
|
|
1360
1509
|
...
|
|
1361
1510
|
|
|
1362
1511
|
def remove_doubles(
|
|
1363
|
-
bm:
|
|
1364
|
-
verts: typing.List["bmesh.types.BMVert"] = [],
|
|
1365
|
-
dist: float = 0,
|
|
1512
|
+
bm: bmesh.types.BMesh, verts: typing.List[bmesh.types.BMVert] = [], dist: float = 0
|
|
1366
1513
|
):
|
|
1367
|
-
"""Remove Doubles.
|
|
1514
|
+
"""Remove Doubles.Finds groups of vertices closer than dist and merges them together,
|
|
1515
|
+
using the weld verts BMOP.
|
|
1368
1516
|
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1517
|
+
:param bm: The bmesh to operate on.
|
|
1518
|
+
:type bm: bmesh.types.BMesh
|
|
1519
|
+
:param verts: input verts
|
|
1520
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
1521
|
+
:param dist: minimum distance
|
|
1522
|
+
:type dist: float
|
|
1375
1523
|
"""
|
|
1376
1524
|
|
|
1377
1525
|
...
|
|
1378
1526
|
|
|
1379
1527
|
def reverse_colors(
|
|
1380
|
-
bm:
|
|
1381
|
-
faces: typing.List[
|
|
1528
|
+
bm: bmesh.types.BMesh,
|
|
1529
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
1382
1530
|
color_index: int = 0,
|
|
1383
1531
|
):
|
|
1384
|
-
"""Color
|
|
1532
|
+
"""Color ReverseReverse the loop colors.
|
|
1385
1533
|
|
|
1386
1534
|
:param bm: The bmesh to operate on.
|
|
1387
|
-
:type bm:
|
|
1535
|
+
:type bm: bmesh.types.BMesh
|
|
1388
1536
|
:param faces: input faces
|
|
1389
|
-
:type faces: typing.List[
|
|
1537
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
1390
1538
|
:param color_index: index into color attribute list
|
|
1391
1539
|
:type color_index: int
|
|
1392
1540
|
"""
|
|
@@ -1394,59 +1542,54 @@ def reverse_colors(
|
|
|
1394
1542
|
...
|
|
1395
1543
|
|
|
1396
1544
|
def reverse_faces(
|
|
1397
|
-
bm:
|
|
1398
|
-
faces: typing.List[
|
|
1545
|
+
bm: bmesh.types.BMesh,
|
|
1546
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
1399
1547
|
flip_multires: bool = False,
|
|
1400
1548
|
):
|
|
1401
|
-
"""Reverse Faces.
|
|
1549
|
+
"""Reverse Faces.Reverses the winding (vertex order) of faces.
|
|
1550
|
+
This has the effect of flipping the normal.
|
|
1402
1551
|
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1552
|
+
:param bm: The bmesh to operate on.
|
|
1553
|
+
:type bm: bmesh.types.BMesh
|
|
1554
|
+
:param faces: input faces
|
|
1555
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
1556
|
+
:param flip_multires: maintain multi-res offset
|
|
1557
|
+
:type flip_multires: bool
|
|
1409
1558
|
"""
|
|
1410
1559
|
|
|
1411
1560
|
...
|
|
1412
1561
|
|
|
1413
|
-
def reverse_uvs(bm:
|
|
1414
|
-
"""UV Reverse.
|
|
1562
|
+
def reverse_uvs(bm: bmesh.types.BMesh, faces: typing.List[bmesh.types.BMFace] = []):
|
|
1563
|
+
"""UV Reverse.Reverse the UVs
|
|
1415
1564
|
|
|
1416
1565
|
:param bm: The bmesh to operate on.
|
|
1417
|
-
:type bm:
|
|
1566
|
+
:type bm: bmesh.types.BMesh
|
|
1418
1567
|
:param faces: input faces
|
|
1419
|
-
:type faces: typing.List[
|
|
1568
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
1420
1569
|
"""
|
|
1421
1570
|
|
|
1422
1571
|
...
|
|
1423
1572
|
|
|
1424
1573
|
def rotate(
|
|
1425
|
-
bm:
|
|
1426
|
-
cent: typing.Union[
|
|
1427
|
-
|
|
1428
|
-
] =
|
|
1429
|
-
|
|
1430
|
-
typing.Sequence[float], "mathutils.Matrix"
|
|
1431
|
-
] = "mathutils.Matrix.Identity(4)",
|
|
1432
|
-
verts: typing.List["bmesh.types.BMVert"] = [],
|
|
1433
|
-
space: typing.Union[
|
|
1434
|
-
typing.Sequence[float], "mathutils.Matrix"
|
|
1435
|
-
] = "mathutils.Matrix.Identity(4)",
|
|
1574
|
+
bm: bmesh.types.BMesh,
|
|
1575
|
+
cent: typing.Union[typing.Sequence[float], mathutils.Vector] = None(),
|
|
1576
|
+
matrix: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
1577
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
1578
|
+
space: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
1436
1579
|
use_shapekey: bool = False,
|
|
1437
1580
|
):
|
|
1438
|
-
"""Rotate.
|
|
1581
|
+
"""Rotate.Rotate vertices around a center, using a 3x3 rotation matrix.
|
|
1439
1582
|
|
|
1440
1583
|
:param bm: The bmesh to operate on.
|
|
1441
|
-
:type bm:
|
|
1584
|
+
:type bm: bmesh.types.BMesh
|
|
1442
1585
|
:param cent: center of rotation
|
|
1443
|
-
:type cent: typing.Union[typing.Sequence[float],
|
|
1586
|
+
:type cent: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1444
1587
|
:param matrix: matrix defining rotation
|
|
1445
|
-
:type matrix: typing.Union[typing.Sequence[float],
|
|
1588
|
+
:type matrix: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
1446
1589
|
:param verts: input vertices
|
|
1447
|
-
:type verts: typing.List[
|
|
1590
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
1448
1591
|
:param space: matrix to define the space (typically object matrix)
|
|
1449
|
-
:type space: typing.Union[typing.Sequence[float],
|
|
1592
|
+
:type space: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
1450
1593
|
:param use_shapekey: Transform shape keys too.
|
|
1451
1594
|
:type use_shapekey: bool
|
|
1452
1595
|
"""
|
|
@@ -1454,17 +1597,17 @@ def rotate(
|
|
|
1454
1597
|
...
|
|
1455
1598
|
|
|
1456
1599
|
def rotate_colors(
|
|
1457
|
-
bm:
|
|
1458
|
-
faces: typing.List[
|
|
1600
|
+
bm: bmesh.types.BMesh,
|
|
1601
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
1459
1602
|
use_ccw: bool = False,
|
|
1460
1603
|
color_index: int = 0,
|
|
1461
1604
|
):
|
|
1462
|
-
"""Color Rotation.
|
|
1605
|
+
"""Color Rotation.Cycle the loop colors
|
|
1463
1606
|
|
|
1464
1607
|
:param bm: The bmesh to operate on.
|
|
1465
|
-
:type bm:
|
|
1608
|
+
:type bm: bmesh.types.BMesh
|
|
1466
1609
|
:param faces: input faces
|
|
1467
|
-
:type faces: typing.List[
|
|
1610
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
1468
1611
|
:param use_ccw: rotate counter-clockwise if true, otherwise clockwise
|
|
1469
1612
|
:type use_ccw: bool
|
|
1470
1613
|
:param color_index: index into color attribute list
|
|
@@ -1474,35 +1617,38 @@ def rotate_colors(
|
|
|
1474
1617
|
...
|
|
1475
1618
|
|
|
1476
1619
|
def rotate_edges(
|
|
1477
|
-
bm:
|
|
1478
|
-
edges: typing.List[
|
|
1620
|
+
bm: bmesh.types.BMesh,
|
|
1621
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
1479
1622
|
use_ccw: bool = False,
|
|
1480
1623
|
) -> typing.Dict:
|
|
1481
|
-
"""Edge Rotate.
|
|
1624
|
+
"""Edge Rotate.Rotates edges topologically. Also known as "spin edge" to some people.
|
|
1625
|
+
Simple example: [/] becomes [|] then [].
|
|
1482
1626
|
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1627
|
+
:param bm: The bmesh to operate on.
|
|
1628
|
+
:type bm: bmesh.types.BMesh
|
|
1629
|
+
:param edges: input edges
|
|
1630
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
1631
|
+
:param use_ccw: rotate edge counter-clockwise if true, otherwise clockwise
|
|
1632
|
+
:type use_ccw: bool
|
|
1633
|
+
:return: edges: newly spun edges
|
|
1634
|
+
|
|
1635
|
+
type list of (`bmesh.types.BMEdge`)
|
|
1636
|
+
:rtype: typing.Dict
|
|
1491
1637
|
"""
|
|
1492
1638
|
|
|
1493
1639
|
...
|
|
1494
1640
|
|
|
1495
1641
|
def rotate_uvs(
|
|
1496
|
-
bm:
|
|
1497
|
-
faces: typing.List[
|
|
1642
|
+
bm: bmesh.types.BMesh,
|
|
1643
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
1498
1644
|
use_ccw: bool = False,
|
|
1499
1645
|
):
|
|
1500
|
-
"""UV Rotation.
|
|
1646
|
+
"""UV Rotation.Cycle the loop UVs
|
|
1501
1647
|
|
|
1502
1648
|
:param bm: The bmesh to operate on.
|
|
1503
|
-
:type bm:
|
|
1649
|
+
:type bm: bmesh.types.BMesh
|
|
1504
1650
|
:param faces: input faces
|
|
1505
|
-
:type faces: typing.List[
|
|
1651
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
1506
1652
|
:param use_ccw: rotate counter-clockwise if true, otherwise clockwise
|
|
1507
1653
|
:type use_ccw: bool
|
|
1508
1654
|
"""
|
|
@@ -1510,26 +1656,22 @@ def rotate_uvs(
|
|
|
1510
1656
|
...
|
|
1511
1657
|
|
|
1512
1658
|
def scale(
|
|
1513
|
-
bm:
|
|
1514
|
-
vec: typing.Union[
|
|
1515
|
-
|
|
1516
|
-
] =
|
|
1517
|
-
space: typing.Union[
|
|
1518
|
-
typing.Sequence[float], "mathutils.Matrix"
|
|
1519
|
-
] = "mathutils.Matrix.Identity(4)",
|
|
1520
|
-
verts: typing.List["bmesh.types.BMVert"] = [],
|
|
1659
|
+
bm: bmesh.types.BMesh,
|
|
1660
|
+
vec: typing.Union[typing.Sequence[float], mathutils.Vector] = None(),
|
|
1661
|
+
space: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
1662
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
1521
1663
|
use_shapekey: bool = False,
|
|
1522
1664
|
):
|
|
1523
|
-
"""Scale.
|
|
1665
|
+
"""Scale.Scales vertices by an offset.
|
|
1524
1666
|
|
|
1525
1667
|
:param bm: The bmesh to operate on.
|
|
1526
|
-
:type bm:
|
|
1668
|
+
:type bm: bmesh.types.BMesh
|
|
1527
1669
|
:param vec: scale factor
|
|
1528
|
-
:type vec: typing.Union[typing.Sequence[float],
|
|
1670
|
+
:type vec: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1529
1671
|
:param space: matrix to define the space (typically object matrix)
|
|
1530
|
-
:type space: typing.Union[typing.Sequence[float],
|
|
1672
|
+
:type space: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
1531
1673
|
:param verts: input vertices
|
|
1532
|
-
:type verts: typing.List[
|
|
1674
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
1533
1675
|
:param use_shapekey: Transform shape keys too.
|
|
1534
1676
|
:type use_shapekey: bool
|
|
1535
1677
|
"""
|
|
@@ -1537,8 +1679,8 @@ def scale(
|
|
|
1537
1679
|
...
|
|
1538
1680
|
|
|
1539
1681
|
def smooth_laplacian_vert(
|
|
1540
|
-
bm:
|
|
1541
|
-
verts: typing.List[
|
|
1682
|
+
bm: bmesh.types.BMesh,
|
|
1683
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
1542
1684
|
lambda_factor: float = 0,
|
|
1543
1685
|
lambda_border: float = 0,
|
|
1544
1686
|
use_x: bool = False,
|
|
@@ -1546,31 +1688,32 @@ def smooth_laplacian_vert(
|
|
|
1546
1688
|
use_z: bool = False,
|
|
1547
1689
|
preserve_volume: bool = False,
|
|
1548
1690
|
):
|
|
1549
|
-
"""Vertex Smooth Laplacian.
|
|
1691
|
+
"""Vertex Smooth Laplacian.Smooths vertices by using Laplacian smoothing propose by.
|
|
1692
|
+
Desbrun, et al. Implicit Fairing of Irregular Meshes using Diffusion and Curvature Flow.
|
|
1550
1693
|
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1694
|
+
:param bm: The bmesh to operate on.
|
|
1695
|
+
:type bm: bmesh.types.BMesh
|
|
1696
|
+
:param verts: input vertices
|
|
1697
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
1698
|
+
:param lambda_factor: lambda param
|
|
1699
|
+
:type lambda_factor: float
|
|
1700
|
+
:param lambda_border: lambda param in border
|
|
1701
|
+
:type lambda_border: float
|
|
1702
|
+
:param use_x: Smooth object along X axis
|
|
1703
|
+
:type use_x: bool
|
|
1704
|
+
:param use_y: Smooth object along Y axis
|
|
1705
|
+
:type use_y: bool
|
|
1706
|
+
:param use_z: Smooth object along Z axis
|
|
1707
|
+
:type use_z: bool
|
|
1708
|
+
:param preserve_volume: Apply volume preservation after smooth
|
|
1709
|
+
:type preserve_volume: bool
|
|
1567
1710
|
"""
|
|
1568
1711
|
|
|
1569
1712
|
...
|
|
1570
1713
|
|
|
1571
1714
|
def smooth_vert(
|
|
1572
|
-
bm:
|
|
1573
|
-
verts: typing.List[
|
|
1715
|
+
bm: bmesh.types.BMesh,
|
|
1716
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
1574
1717
|
factor: float = 0,
|
|
1575
1718
|
mirror_clip_x: bool = False,
|
|
1576
1719
|
mirror_clip_y: bool = False,
|
|
@@ -1580,12 +1723,12 @@ def smooth_vert(
|
|
|
1580
1723
|
use_axis_y: bool = False,
|
|
1581
1724
|
use_axis_z: bool = False,
|
|
1582
1725
|
):
|
|
1583
|
-
"""Vertex Smooth.
|
|
1726
|
+
"""Vertex Smooth.Smooths vertices by using a basic vertex averaging scheme.
|
|
1584
1727
|
|
|
1585
1728
|
:param bm: The bmesh to operate on.
|
|
1586
|
-
:type bm:
|
|
1729
|
+
:type bm: bmesh.types.BMesh
|
|
1587
1730
|
:param verts: input vertices
|
|
1588
|
-
:type verts: typing.List[
|
|
1731
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
1589
1732
|
:param factor: smoothing factor
|
|
1590
1733
|
:type factor: float
|
|
1591
1734
|
:param mirror_clip_x: set vertices close to the x axis before the operation to 0
|
|
@@ -1607,173 +1750,185 @@ def smooth_vert(
|
|
|
1607
1750
|
...
|
|
1608
1751
|
|
|
1609
1752
|
def solidify(
|
|
1610
|
-
bm:
|
|
1753
|
+
bm: bmesh.types.BMesh,
|
|
1611
1754
|
geom: typing.Union[
|
|
1612
|
-
typing.List[
|
|
1613
|
-
typing.List[
|
|
1614
|
-
typing.List[
|
|
1755
|
+
typing.List[bmesh.types.BMVert],
|
|
1756
|
+
typing.List[bmesh.types.BMEdge],
|
|
1757
|
+
typing.List[bmesh.types.BMFace],
|
|
1615
1758
|
] = [],
|
|
1616
1759
|
thickness: float = 0,
|
|
1617
1760
|
) -> typing.Dict:
|
|
1618
|
-
"""Solidify.
|
|
1761
|
+
"""Solidify.Turns a mesh into a shell with thickness
|
|
1619
1762
|
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1763
|
+
:param bm: The bmesh to operate on.
|
|
1764
|
+
:type bm: bmesh.types.BMesh
|
|
1765
|
+
:param geom: input geometry
|
|
1766
|
+
:type geom: typing.Union[typing.List[bmesh.types.BMVert], typing.List[bmesh.types.BMEdge], typing.List[bmesh.types.BMFace]]
|
|
1767
|
+
:param thickness: thickness
|
|
1768
|
+
:type thickness: float
|
|
1769
|
+
:return: geom:
|
|
1770
|
+
|
|
1771
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
1772
|
+
:rtype: typing.Dict
|
|
1628
1773
|
"""
|
|
1629
1774
|
|
|
1630
1775
|
...
|
|
1631
1776
|
|
|
1632
1777
|
def spin(
|
|
1633
|
-
bm:
|
|
1778
|
+
bm: bmesh.types.BMesh,
|
|
1634
1779
|
geom: typing.Union[
|
|
1635
|
-
typing.List[
|
|
1636
|
-
typing.List[
|
|
1637
|
-
typing.List[
|
|
1780
|
+
typing.List[bmesh.types.BMVert],
|
|
1781
|
+
typing.List[bmesh.types.BMEdge],
|
|
1782
|
+
typing.List[bmesh.types.BMFace],
|
|
1638
1783
|
] = [],
|
|
1639
|
-
cent: typing.Union[
|
|
1640
|
-
|
|
1641
|
-
]
|
|
1642
|
-
axis: typing.Union[
|
|
1643
|
-
typing.Sequence[float], "mathutils.Vector"
|
|
1644
|
-
] = "mathutils.Vector()",
|
|
1645
|
-
dvec: typing.Union[
|
|
1646
|
-
typing.Sequence[float], "mathutils.Vector"
|
|
1647
|
-
] = "mathutils.Vector()",
|
|
1784
|
+
cent: typing.Union[typing.Sequence[float], mathutils.Vector] = None(),
|
|
1785
|
+
axis: typing.Union[typing.Sequence[float], mathutils.Vector] = None(),
|
|
1786
|
+
dvec: typing.Union[typing.Sequence[float], mathutils.Vector] = None(),
|
|
1648
1787
|
angle: float = 0,
|
|
1649
|
-
space: typing.Union[
|
|
1650
|
-
typing.Sequence[float], "mathutils.Matrix"
|
|
1651
|
-
] = "mathutils.Matrix.Identity(4)",
|
|
1788
|
+
space: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
1652
1789
|
steps: int = 0,
|
|
1653
1790
|
use_merge: bool = False,
|
|
1654
1791
|
use_normal_flip: bool = False,
|
|
1655
1792
|
use_duplicate: bool = False,
|
|
1656
1793
|
) -> typing.Dict:
|
|
1657
|
-
"""Spin.
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1794
|
+
"""Spin.Extrude or duplicate geometry a number of times,
|
|
1795
|
+
rotating and possibly translating after each step
|
|
1796
|
+
|
|
1797
|
+
:param bm: The bmesh to operate on.
|
|
1798
|
+
:type bm: bmesh.types.BMesh
|
|
1799
|
+
:param geom: input geometry
|
|
1800
|
+
:type geom: typing.Union[typing.List[bmesh.types.BMVert], typing.List[bmesh.types.BMEdge], typing.List[bmesh.types.BMFace]]
|
|
1801
|
+
:param cent: rotation center
|
|
1802
|
+
:type cent: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1803
|
+
:param axis: rotation axis
|
|
1804
|
+
:type axis: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1805
|
+
:param dvec: translation delta per step
|
|
1806
|
+
:type dvec: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1807
|
+
:param angle: total rotation angle (radians)
|
|
1808
|
+
:type angle: float
|
|
1809
|
+
:param space: matrix to define the space (typically object matrix)
|
|
1810
|
+
:type space: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
1811
|
+
:param steps: number of steps
|
|
1812
|
+
:type steps: int
|
|
1813
|
+
:param use_merge: Merge first/last when the angle is a full revolution.
|
|
1814
|
+
:type use_merge: bool
|
|
1815
|
+
:param use_normal_flip: Create faces with reversed direction.
|
|
1816
|
+
:type use_normal_flip: bool
|
|
1817
|
+
:param use_duplicate: duplicate or extrude?
|
|
1818
|
+
:type use_duplicate: bool
|
|
1819
|
+
:return: geom_last: result of last step
|
|
1820
|
+
|
|
1821
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
1822
|
+
:rtype: typing.Dict
|
|
1683
1823
|
"""
|
|
1684
1824
|
|
|
1685
1825
|
...
|
|
1686
1826
|
|
|
1687
1827
|
def split(
|
|
1688
|
-
bm:
|
|
1828
|
+
bm: bmesh.types.BMesh,
|
|
1689
1829
|
geom: typing.Union[
|
|
1690
|
-
typing.List[
|
|
1691
|
-
typing.List[
|
|
1692
|
-
typing.List[
|
|
1830
|
+
typing.List[bmesh.types.BMVert],
|
|
1831
|
+
typing.List[bmesh.types.BMEdge],
|
|
1832
|
+
typing.List[bmesh.types.BMFace],
|
|
1693
1833
|
] = [],
|
|
1694
|
-
dest:
|
|
1834
|
+
dest: bmesh.types.BMesh = None,
|
|
1695
1835
|
use_only_faces: bool = False,
|
|
1696
1836
|
) -> typing.Dict:
|
|
1697
|
-
"""Split Off Geometry.
|
|
1837
|
+
"""Split Off Geometry.Disconnect geometry from adjacent edges and faces,
|
|
1838
|
+
optionally into a destination mesh.
|
|
1698
1839
|
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1840
|
+
:param bm: The bmesh to operate on.
|
|
1841
|
+
:type bm: bmesh.types.BMesh
|
|
1842
|
+
:param geom: input geometry
|
|
1843
|
+
:type geom: typing.Union[typing.List[bmesh.types.BMVert], typing.List[bmesh.types.BMEdge], typing.List[bmesh.types.BMFace]]
|
|
1844
|
+
:param dest: destination bmesh, if None will use current one
|
|
1845
|
+
:type dest: bmesh.types.BMesh
|
|
1846
|
+
:param use_only_faces: when enabled. don't duplicate loose verts/edges
|
|
1847
|
+
:type use_only_faces: bool
|
|
1848
|
+
:return: geom:
|
|
1849
|
+
|
|
1850
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
1851
|
+
|
|
1852
|
+
boundary_map:
|
|
1853
|
+
|
|
1854
|
+
type dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
|
|
1855
|
+
|
|
1856
|
+
isovert_map:
|
|
1857
|
+
|
|
1858
|
+
type dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
|
|
1859
|
+
:rtype: typing.Dict
|
|
1709
1860
|
"""
|
|
1710
1861
|
|
|
1711
1862
|
...
|
|
1712
1863
|
|
|
1713
1864
|
def split_edges(
|
|
1714
|
-
bm:
|
|
1715
|
-
edges: typing.List[
|
|
1716
|
-
verts: typing.List[
|
|
1865
|
+
bm: bmesh.types.BMesh,
|
|
1866
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
1867
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
1717
1868
|
use_verts: bool = False,
|
|
1718
1869
|
) -> typing.Dict:
|
|
1719
|
-
"""Edge Split.
|
|
1870
|
+
"""Edge Split.Disconnects faces along input edges.
|
|
1720
1871
|
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1872
|
+
:param bm: The bmesh to operate on.
|
|
1873
|
+
:type bm: bmesh.types.BMesh
|
|
1874
|
+
:param edges: input edges
|
|
1875
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
1876
|
+
:param verts: optional tag verts, use to have greater control of splits
|
|
1877
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
1878
|
+
:param use_verts: use 'verts' for splitting, else just find verts to split from edges
|
|
1879
|
+
:type use_verts: bool
|
|
1880
|
+
:return: edges: old output disconnected edges
|
|
1881
|
+
|
|
1882
|
+
type list of (`bmesh.types.BMEdge`)
|
|
1883
|
+
:rtype: typing.Dict
|
|
1731
1884
|
"""
|
|
1732
1885
|
|
|
1733
1886
|
...
|
|
1734
1887
|
|
|
1735
1888
|
def subdivide_edgering(
|
|
1736
|
-
bm:
|
|
1737
|
-
edges: typing.List[
|
|
1889
|
+
bm: bmesh.types.BMesh,
|
|
1890
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
1738
1891
|
interp_mode: typing.Union[str, int] = "LINEAR",
|
|
1739
1892
|
smooth: float = 0,
|
|
1740
1893
|
cuts: int = 0,
|
|
1741
1894
|
profile_shape: typing.Union[str, int] = "SMOOTH",
|
|
1742
1895
|
profile_shape_factor: float = 0,
|
|
1743
1896
|
) -> typing.Dict:
|
|
1744
|
-
"""Subdivide Edge-Ring.
|
|
1897
|
+
"""Subdivide Edge-Ring.Take an edge-ring, and subdivide with interpolation options.
|
|
1745
1898
|
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1899
|
+
:param bm: The bmesh to operate on.
|
|
1900
|
+
:type bm: bmesh.types.BMesh
|
|
1901
|
+
:param edges: input vertices
|
|
1902
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
1903
|
+
:param interp_mode: interpolation method
|
|
1904
|
+
:type interp_mode: typing.Union[str, int]
|
|
1905
|
+
:param smooth: smoothness factor
|
|
1906
|
+
:type smooth: float
|
|
1907
|
+
:param cuts: number of cuts
|
|
1908
|
+
:type cuts: int
|
|
1909
|
+
:param profile_shape: profile shape type
|
|
1910
|
+
:type profile_shape: typing.Union[str, int]
|
|
1911
|
+
:param profile_shape_factor: how much intermediary new edges are shrunk/expanded
|
|
1912
|
+
:type profile_shape_factor: float
|
|
1913
|
+
:return: faces: output faces
|
|
1914
|
+
|
|
1915
|
+
type list of (`bmesh.types.BMFace`)
|
|
1916
|
+
:rtype: typing.Dict
|
|
1762
1917
|
"""
|
|
1763
1918
|
|
|
1764
1919
|
...
|
|
1765
1920
|
|
|
1766
1921
|
def subdivide_edges(
|
|
1767
|
-
bm:
|
|
1768
|
-
edges: typing.List[
|
|
1922
|
+
bm: bmesh.types.BMesh,
|
|
1923
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
1769
1924
|
smooth: float = 0,
|
|
1770
1925
|
smooth_falloff: typing.Union[str, int] = "SMOOTH",
|
|
1771
1926
|
fractal: float = 0,
|
|
1772
1927
|
along_normal: float = 0,
|
|
1773
1928
|
cuts: int = 0,
|
|
1774
1929
|
seed: int = 0,
|
|
1775
|
-
custom_patterns
|
|
1776
|
-
edge_percents
|
|
1930
|
+
custom_patterns={},
|
|
1931
|
+
edge_percents={},
|
|
1777
1932
|
quad_corner_type: typing.Union[str, int] = "STRAIGHT_CUT",
|
|
1778
1933
|
use_grid_fill: bool = False,
|
|
1779
1934
|
use_single_edge: bool = False,
|
|
@@ -1781,123 +1936,130 @@ def subdivide_edges(
|
|
|
1781
1936
|
use_sphere: bool = False,
|
|
1782
1937
|
use_smooth_even: bool = False,
|
|
1783
1938
|
) -> typing.Dict:
|
|
1784
|
-
"""Subdivide Edges.
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1939
|
+
"""Subdivide Edges.Advanced operator for subdividing edges
|
|
1940
|
+
with options for face patterns, smoothing and randomization.
|
|
1941
|
+
|
|
1942
|
+
:param bm: The bmesh to operate on.
|
|
1943
|
+
:type bm: bmesh.types.BMesh
|
|
1944
|
+
:param edges: input edges
|
|
1945
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
1946
|
+
:param smooth: smoothness factor
|
|
1947
|
+
:type smooth: float
|
|
1948
|
+
:param smooth_falloff: smooth falloff type
|
|
1949
|
+
:type smooth_falloff: typing.Union[str, int]
|
|
1950
|
+
:param fractal: fractal randomness factor
|
|
1951
|
+
:type fractal: float
|
|
1952
|
+
:param along_normal: apply fractal displacement along normal only
|
|
1953
|
+
:type along_normal: float
|
|
1954
|
+
:param cuts: number of cuts
|
|
1955
|
+
:type cuts: int
|
|
1956
|
+
:param seed: seed for the random number generator
|
|
1957
|
+
:type seed: int
|
|
1958
|
+
:param custom_patterns: uses custom pointers
|
|
1959
|
+
:param edge_percents: Undocumented.
|
|
1960
|
+
:param quad_corner_type: quad corner type
|
|
1961
|
+
:type quad_corner_type: typing.Union[str, int]
|
|
1962
|
+
:param use_grid_fill: fill in fully-selected faces with a grid
|
|
1963
|
+
:type use_grid_fill: bool
|
|
1964
|
+
:param use_single_edge: tessellate the case of one edge selected in a quad or triangle
|
|
1965
|
+
:type use_single_edge: bool
|
|
1966
|
+
:param use_only_quads: Only subdivide quads (for loop-cut).
|
|
1967
|
+
:type use_only_quads: bool
|
|
1968
|
+
:param use_sphere: for making new primitives only
|
|
1969
|
+
:type use_sphere: bool
|
|
1970
|
+
:param use_smooth_even: maintain even offset when smoothing
|
|
1971
|
+
:type use_smooth_even: bool
|
|
1972
|
+
:return: geom_inner:
|
|
1973
|
+
|
|
1974
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
1975
|
+
|
|
1976
|
+
geom_split:
|
|
1977
|
+
|
|
1978
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
1979
|
+
|
|
1980
|
+
geom: contains all output geometry
|
|
1981
|
+
|
|
1982
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
1983
|
+
:rtype: typing.Dict
|
|
1820
1984
|
"""
|
|
1821
1985
|
|
|
1822
1986
|
...
|
|
1823
1987
|
|
|
1824
1988
|
def symmetrize(
|
|
1825
|
-
bm:
|
|
1989
|
+
bm: bmesh.types.BMesh,
|
|
1826
1990
|
input: typing.Union[
|
|
1827
|
-
typing.List[
|
|
1828
|
-
typing.List[
|
|
1829
|
-
typing.List[
|
|
1991
|
+
typing.List[bmesh.types.BMVert],
|
|
1992
|
+
typing.List[bmesh.types.BMEdge],
|
|
1993
|
+
typing.List[bmesh.types.BMFace],
|
|
1830
1994
|
] = [],
|
|
1831
1995
|
direction: typing.Union[str, int] = "-X",
|
|
1832
1996
|
dist: float = 0,
|
|
1833
1997
|
use_shapekey: bool = False,
|
|
1834
1998
|
) -> typing.Dict:
|
|
1835
|
-
"""Symmetrize.
|
|
1999
|
+
"""Symmetrize.Makes the mesh elements in the "input" slot symmetrical. Unlike
|
|
2000
|
+
normal mirroring, it only copies in one direction, as specified by
|
|
2001
|
+
the "direction" slot. The edges and faces that cross the plane of
|
|
2002
|
+
symmetry are split as needed to enforce symmetry.All new vertices, edges, and faces are added to the "geom.out" slot.
|
|
1836
2003
|
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
2004
|
+
:param bm: The bmesh to operate on.
|
|
2005
|
+
:type bm: bmesh.types.BMesh
|
|
2006
|
+
:param input: input geometry
|
|
2007
|
+
:type input: typing.Union[typing.List[bmesh.types.BMVert], typing.List[bmesh.types.BMEdge], typing.List[bmesh.types.BMFace]]
|
|
2008
|
+
:param direction: axis to use
|
|
2009
|
+
:type direction: typing.Union[str, int]
|
|
2010
|
+
:param dist: minimum distance
|
|
2011
|
+
:type dist: float
|
|
2012
|
+
:param use_shapekey: Transform shape keys too.
|
|
2013
|
+
:type use_shapekey: bool
|
|
2014
|
+
:return: geom:
|
|
2015
|
+
|
|
2016
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
2017
|
+
:rtype: typing.Dict
|
|
1849
2018
|
"""
|
|
1850
2019
|
|
|
1851
2020
|
...
|
|
1852
2021
|
|
|
1853
2022
|
def transform(
|
|
1854
|
-
bm:
|
|
1855
|
-
matrix: typing.Union[
|
|
1856
|
-
|
|
1857
|
-
] =
|
|
1858
|
-
space: typing.Union[
|
|
1859
|
-
typing.Sequence[float], "mathutils.Matrix"
|
|
1860
|
-
] = "mathutils.Matrix.Identity(4)",
|
|
1861
|
-
verts: typing.List["bmesh.types.BMVert"] = [],
|
|
2023
|
+
bm: bmesh.types.BMesh,
|
|
2024
|
+
matrix: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
2025
|
+
space: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
2026
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
1862
2027
|
use_shapekey: bool = False,
|
|
1863
2028
|
):
|
|
1864
|
-
"""Transform.
|
|
2029
|
+
"""Transform.Transforms a set of vertices by a matrix. Multiplies
|
|
2030
|
+
the vertex coordinates with the matrix.
|
|
1865
2031
|
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
2032
|
+
:param bm: The bmesh to operate on.
|
|
2033
|
+
:type bm: bmesh.types.BMesh
|
|
2034
|
+
:param matrix: transform matrix
|
|
2035
|
+
:type matrix: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
2036
|
+
:param space: matrix to define the space (typically object matrix)
|
|
2037
|
+
:type space: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
2038
|
+
:param verts: input vertices
|
|
2039
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
2040
|
+
:param use_shapekey: Transform shape keys too.
|
|
2041
|
+
:type use_shapekey: bool
|
|
1876
2042
|
"""
|
|
1877
2043
|
|
|
1878
2044
|
...
|
|
1879
2045
|
|
|
1880
2046
|
def translate(
|
|
1881
|
-
bm:
|
|
1882
|
-
vec: typing.Union[
|
|
1883
|
-
|
|
1884
|
-
] =
|
|
1885
|
-
space: typing.Union[
|
|
1886
|
-
typing.Sequence[float], "mathutils.Matrix"
|
|
1887
|
-
] = "mathutils.Matrix.Identity(4)",
|
|
1888
|
-
verts: typing.List["bmesh.types.BMVert"] = [],
|
|
2047
|
+
bm: bmesh.types.BMesh,
|
|
2048
|
+
vec: typing.Union[typing.Sequence[float], mathutils.Vector] = None(),
|
|
2049
|
+
space: typing.Union[typing.Sequence[float], mathutils.Matrix] = None(4),
|
|
2050
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
1889
2051
|
use_shapekey: bool = False,
|
|
1890
2052
|
):
|
|
1891
|
-
"""Translate.
|
|
2053
|
+
"""Translate.Translate vertices by an offset.
|
|
1892
2054
|
|
|
1893
2055
|
:param bm: The bmesh to operate on.
|
|
1894
|
-
:type bm:
|
|
2056
|
+
:type bm: bmesh.types.BMesh
|
|
1895
2057
|
:param vec: translation offset
|
|
1896
|
-
:type vec: typing.Union[typing.Sequence[float],
|
|
2058
|
+
:type vec: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1897
2059
|
:param space: matrix to define the space (typically object matrix)
|
|
1898
|
-
:type space: typing.Union[typing.Sequence[float],
|
|
2060
|
+
:type space: typing.Union[typing.Sequence[float], mathutils.Matrix]
|
|
1899
2061
|
:param verts: input vertices
|
|
1900
|
-
:type verts: typing.List[
|
|
2062
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
1901
2063
|
:param use_shapekey: Transform shape keys too.
|
|
1902
2064
|
:type use_shapekey: bool
|
|
1903
2065
|
"""
|
|
@@ -1905,85 +2067,100 @@ def translate(
|
|
|
1905
2067
|
...
|
|
1906
2068
|
|
|
1907
2069
|
def triangle_fill(
|
|
1908
|
-
bm:
|
|
2070
|
+
bm: bmesh.types.BMesh,
|
|
1909
2071
|
use_beauty: bool = False,
|
|
1910
2072
|
use_dissolve: bool = False,
|
|
1911
|
-
edges: typing.List[
|
|
1912
|
-
normal: typing.Union[
|
|
1913
|
-
typing.Sequence[float], "mathutils.Vector"
|
|
1914
|
-
] = "mathutils.Vector()",
|
|
2073
|
+
edges: typing.List[bmesh.types.BMEdge] = [],
|
|
2074
|
+
normal: typing.Union[typing.Sequence[float], mathutils.Vector] = None(),
|
|
1915
2075
|
) -> typing.Dict:
|
|
1916
|
-
"""Triangle Fill.
|
|
2076
|
+
"""Triangle Fill.Fill edges with triangles
|
|
1917
2077
|
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
2078
|
+
:param bm: The bmesh to operate on.
|
|
2079
|
+
:type bm: bmesh.types.BMesh
|
|
2080
|
+
:param use_beauty: use best triangulation division
|
|
2081
|
+
:type use_beauty: bool
|
|
2082
|
+
:param use_dissolve: dissolve resulting faces
|
|
2083
|
+
:type use_dissolve: bool
|
|
2084
|
+
:param edges: input edges
|
|
2085
|
+
:type edges: typing.List[bmesh.types.BMEdge]
|
|
2086
|
+
:param normal: optionally pass the fill normal to use
|
|
2087
|
+
:type normal: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
2088
|
+
:return: geom: new faces and edges
|
|
2089
|
+
|
|
2090
|
+
type list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
|
|
2091
|
+
:rtype: typing.Dict
|
|
1930
2092
|
"""
|
|
1931
2093
|
|
|
1932
2094
|
...
|
|
1933
2095
|
|
|
1934
2096
|
def triangulate(
|
|
1935
|
-
bm:
|
|
1936
|
-
faces: typing.List[
|
|
2097
|
+
bm: bmesh.types.BMesh,
|
|
2098
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
1937
2099
|
quad_method: typing.Union[str, int] = "BEAUTY",
|
|
1938
2100
|
ngon_method: typing.Union[str, int] = "BEAUTY",
|
|
1939
2101
|
) -> typing.Dict:
|
|
1940
2102
|
"""Triangulate.
|
|
1941
2103
|
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
2104
|
+
:param bm: The bmesh to operate on.
|
|
2105
|
+
:type bm: bmesh.types.BMesh
|
|
2106
|
+
:param faces: input faces
|
|
2107
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
2108
|
+
:param quad_method: method for splitting the quads into triangles
|
|
2109
|
+
:type quad_method: typing.Union[str, int]
|
|
2110
|
+
:param ngon_method: method for splitting the polygons into triangles
|
|
2111
|
+
:type ngon_method: typing.Union[str, int]
|
|
2112
|
+
:return: edges:
|
|
2113
|
+
|
|
2114
|
+
type list of (`bmesh.types.BMEdge`)
|
|
2115
|
+
|
|
2116
|
+
faces:
|
|
2117
|
+
|
|
2118
|
+
type list of (`bmesh.types.BMFace`)
|
|
2119
|
+
|
|
2120
|
+
face_map:
|
|
2121
|
+
|
|
2122
|
+
type dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
|
|
2123
|
+
|
|
2124
|
+
face_map_double: duplicate faces
|
|
2125
|
+
|
|
2126
|
+
type dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
|
|
2127
|
+
:rtype: typing.Dict
|
|
1952
2128
|
"""
|
|
1953
2129
|
|
|
1954
2130
|
...
|
|
1955
2131
|
|
|
1956
2132
|
def unsubdivide(
|
|
1957
|
-
bm:
|
|
1958
|
-
verts: typing.List[
|
|
2133
|
+
bm: bmesh.types.BMesh,
|
|
2134
|
+
verts: typing.List[bmesh.types.BMVert] = [],
|
|
1959
2135
|
iterations: int = 0,
|
|
1960
2136
|
):
|
|
1961
|
-
"""Un-Subdivide.
|
|
2137
|
+
"""Un-Subdivide.Reduce detail in geometry containing grids.
|
|
1962
2138
|
|
|
1963
2139
|
:param bm: The bmesh to operate on.
|
|
1964
|
-
:type bm:
|
|
2140
|
+
:type bm: bmesh.types.BMesh
|
|
1965
2141
|
:param verts: input vertices
|
|
1966
|
-
:type verts: typing.List[
|
|
2142
|
+
:type verts: typing.List[bmesh.types.BMVert]
|
|
1967
2143
|
:param iterations: number of times to unsubdivide
|
|
1968
2144
|
:type iterations: int
|
|
1969
2145
|
"""
|
|
1970
2146
|
|
|
1971
2147
|
...
|
|
1972
2148
|
|
|
1973
|
-
def weld_verts(bm:
|
|
1974
|
-
"""Weld Verts.
|
|
2149
|
+
def weld_verts(bm: bmesh.types.BMesh, targetmap={}):
|
|
2150
|
+
"""Weld Verts.Welds verts together (kind-of like remove doubles, merge, etc, all of which
|
|
2151
|
+
use or will use this BMOP). You pass in mappings from vertices to the vertices
|
|
2152
|
+
they weld with.
|
|
1975
2153
|
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
:type targetmap: typing.Dict
|
|
2154
|
+
:param bm: The bmesh to operate on.
|
|
2155
|
+
:type bm: bmesh.types.BMesh
|
|
2156
|
+
:param targetmap: maps welded vertices to verts they should weld to
|
|
1980
2157
|
"""
|
|
1981
2158
|
|
|
1982
2159
|
...
|
|
1983
2160
|
|
|
1984
2161
|
def wireframe(
|
|
1985
|
-
bm:
|
|
1986
|
-
faces: typing.List[
|
|
2162
|
+
bm: bmesh.types.BMesh,
|
|
2163
|
+
faces: typing.List[bmesh.types.BMFace] = [],
|
|
1987
2164
|
thickness: float = 0,
|
|
1988
2165
|
offset: float = 0,
|
|
1989
2166
|
use_replace: bool = False,
|
|
@@ -1994,32 +2171,34 @@ def wireframe(
|
|
|
1994
2171
|
use_relative_offset: bool = False,
|
|
1995
2172
|
material_offset: int = 0,
|
|
1996
2173
|
) -> typing.Dict:
|
|
1997
|
-
"""Wire Frame.
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2174
|
+
"""Wire Frame.Makes a wire-frame copy of faces.
|
|
2175
|
+
|
|
2176
|
+
:param bm: The bmesh to operate on.
|
|
2177
|
+
:type bm: bmesh.types.BMesh
|
|
2178
|
+
:param faces: input faces
|
|
2179
|
+
:type faces: typing.List[bmesh.types.BMFace]
|
|
2180
|
+
:param thickness: thickness
|
|
2181
|
+
:type thickness: float
|
|
2182
|
+
:param offset: offset the thickness from the center
|
|
2183
|
+
:type offset: float
|
|
2184
|
+
:param use_replace: remove original geometry
|
|
2185
|
+
:type use_replace: bool
|
|
2186
|
+
:param use_boundary: inset face boundaries
|
|
2187
|
+
:type use_boundary: bool
|
|
2188
|
+
:param use_even_offset: scale the offset to give more even thickness
|
|
2189
|
+
:type use_even_offset: bool
|
|
2190
|
+
:param use_crease: crease hub edges for improved subdivision surface
|
|
2191
|
+
:type use_crease: bool
|
|
2192
|
+
:param crease_weight: the mean crease weight for resulting edges
|
|
2193
|
+
:type crease_weight: float
|
|
2194
|
+
:param use_relative_offset: scale the offset by surrounding geometry
|
|
2195
|
+
:type use_relative_offset: bool
|
|
2196
|
+
:param material_offset: offset material index of generated faces
|
|
2197
|
+
:type material_offset: int
|
|
2198
|
+
:return: faces: output faces
|
|
2199
|
+
|
|
2200
|
+
type list of (`bmesh.types.BMFace`)
|
|
2201
|
+
:rtype: typing.Dict
|
|
2023
2202
|
"""
|
|
2024
2203
|
|
|
2025
2204
|
...
|