blender-python-stubs 4.5.8.2__tar.gz → 5.0.1.1__tar.gz
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.
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/PKG-INFO +4 -4
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/README.md +2 -2
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/aud/__init__.pyi +68 -1
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bl_math/__init__.pyi +1 -1
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/blf/__init__.pyi +1 -1
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bmesh/__init__.pyi +2 -2
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bmesh/ops/__init__.pyi +5 -5
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bmesh/types/__init__.pyi +107 -33
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bmesh/utils/__init__.pyi +6 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy/app/__init__.pyi +4 -3
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy/msgbus/__init__.pyi +2 -1
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy/ops/__init__.pyi +3157 -1671
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy/props/__init__.pyi +40 -8
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy/types/__init__.pyi +2295 -3146
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy/utils/__init__.pyi +3 -3
- blender_python_stubs-5.0.1.1/bpy_extras/anim_utils/__init__.pyi +186 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy_extras/id_map_utils/__init__.pyi +1 -1
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy_extras/io_utils/__init__.pyi +2 -2
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy_extras/node_shader_utils/__init__.pyi +0 -5
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/freestyle/shaders/__init__.pyi +2 -4
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/freestyle/types/__init__.pyi +5 -6
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu/compute/__init__.pyi +1 -1
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu/shader/__init__.pyi +14 -2
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu/state/__init__.pyi +10 -4
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu/texture/__init__.pyi +2 -2
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu/types/__init__.pyi +158 -112
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu_extras/presets/__init__.pyi +1 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/imbuf/__init__.pyi +1 -1
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/imbuf/types/__init__.pyi +5 -5
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/mathutils/__init__.pyi +100 -52
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/mathutils/bvhtree/__init__.pyi +4 -3
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/mathutils/geometry/__init__.pyi +40 -11
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/mathutils/interpolate/__init__.pyi +2 -2
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/mathutils/kdtree/__init__.pyi +4 -1
- blender_python_stubs-5.0.1.1/mathutils/noise/__init__.pyi +271 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/pyproject.toml +2 -2
- blender_python_stubs-4.5.8.2/bpy_extras/anim_utils/__init__.pyi +0 -86
- blender_python_stubs-4.5.8.2/mathutils/noise/__init__.pyi +0 -117
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/.gitignore +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/.python-version +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/LICENSE +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/aud/py.typed +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bl_math/py.typed +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/blf/py.typed +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bmesh/geometry/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bmesh/py.typed +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy/path/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy/py.typed +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy/utils/previews/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy/utils/toolsystem/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy_extras/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy_extras/asset_utils/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy_extras/bmesh_utils/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy_extras/image_utils/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy_extras/keyconfig_utils/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy_extras/mesh_utils/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy_extras/node_utils/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy_extras/object_utils/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy_extras/py.typed +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/bpy_extras/view3d_utils/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/freestyle/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/freestyle/chainingiterators/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/freestyle/functions/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/freestyle/predicates/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/freestyle/py.typed +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/freestyle/utils/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu/capabilities/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu/matrix/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu/platform/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu/py.typed +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu/select/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu_extras/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu_extras/batch/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/gpu_extras/py.typed +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/idprop/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/idprop/py.typed +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/idprop/types/__init__.pyi +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/imbuf/py.typed +0 -0
- {blender_python_stubs-4.5.8.2 → blender_python_stubs-5.0.1.1}/mathutils/py.typed +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: blender-python-stubs
|
|
3
|
-
Version:
|
|
4
|
-
Summary: Type stubs for Blender
|
|
3
|
+
Version: 5.0.1.1
|
|
4
|
+
Summary: Type stubs for Blender 5.0 Python API
|
|
5
5
|
Project-URL: Homepage, https://git.autourdeminuit.com/autour_de_minuit/blender-python-stubs
|
|
6
6
|
Project-URL: Issues, https://git.autourdeminuit.com/autour_de_minuit/blender-python-stubs/issues
|
|
7
7
|
Project-URL: Repository, https://git.autourdeminuit.com/autour_de_minuit/blender-python-stubs
|
|
@@ -23,14 +23,14 @@ Description-Content-Type: text/markdown
|
|
|
23
23
|
|
|
24
24
|
[](https://pypi.org/project/blender-python-stubs/)
|
|
25
25
|
|
|
26
|
-
Strict type stubs for Blender
|
|
26
|
+
Strict type stubs for Blender 5.0 Python API.
|
|
27
27
|
|
|
28
28
|
Provides autocomplete, type checking, and inline documentation for `bpy`, `mathutils`, `bmesh`, `gpu`, `freestyle`, and all other Blender Python modules. Generated stubs pass [basedpyright](https://docs.basedpyright.com) `all` mode with 0 errors and use zero `typing.Any`.
|
|
29
29
|
|
|
30
30
|
## Installation
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
pip install "blender-python-stubs>=
|
|
33
|
+
pip install "blender-python-stubs>=5.0,<5.1"
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
## Features
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://pypi.org/project/blender-python-stubs/)
|
|
4
4
|
|
|
5
|
-
Strict type stubs for Blender
|
|
5
|
+
Strict type stubs for Blender 5.0 Python API.
|
|
6
6
|
|
|
7
7
|
Provides autocomplete, type checking, and inline documentation for `bpy`, `mathutils`, `bmesh`, `gpu`, `freestyle`, and all other Blender Python modules. Generated stubs pass [basedpyright](https://docs.basedpyright.com) `all` mode with 0 errors and use zero `typing.Any`.
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
pip install "blender-python-stubs>=
|
|
12
|
+
pip install "blender-python-stubs>=5.0,<5.1"
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Features
|
|
@@ -14,6 +14,10 @@ AP_PANNING: int
|
|
|
14
14
|
|
|
15
15
|
AP_PITCH: int
|
|
16
16
|
|
|
17
|
+
AP_PITCH_SCALE: int
|
|
18
|
+
|
|
19
|
+
AP_TIME_STRETCH: int
|
|
20
|
+
|
|
17
21
|
AP_VOLUME: int
|
|
18
22
|
|
|
19
23
|
CHANNELS_INVALID: int
|
|
@@ -128,6 +132,50 @@ STATUS_PLAYING: int
|
|
|
128
132
|
|
|
129
133
|
STATUS_STOPPED: int
|
|
130
134
|
|
|
135
|
+
STRETCHER_QUALITY_CONSISTENT: int
|
|
136
|
+
|
|
137
|
+
STRETCHER_QUALITY_FAST: int
|
|
138
|
+
|
|
139
|
+
STRETCHER_QUALITY_HIGH: int
|
|
140
|
+
|
|
141
|
+
class AnimateableProperty:
|
|
142
|
+
"""An AnimateableProperty object stores an array of float values for animating sound properties (e.g. pan, volume, pitch-scale)"""
|
|
143
|
+
|
|
144
|
+
animated: object
|
|
145
|
+
"""Whether the property is animated."""
|
|
146
|
+
|
|
147
|
+
count: object
|
|
148
|
+
"""The count of floats for a property."""
|
|
149
|
+
|
|
150
|
+
def read(self, position: float) -> object:
|
|
151
|
+
"""Reads the properties value at the given position.
|
|
152
|
+
|
|
153
|
+
:param position: The position in the animation in frames.
|
|
154
|
+
"""
|
|
155
|
+
|
|
156
|
+
def readSingle(self, position: float) -> float:
|
|
157
|
+
"""Reads the properties value at the given position, assuming there is exactly one value.
|
|
158
|
+
|
|
159
|
+
:param position: The position in the animation in frames.
|
|
160
|
+
"""
|
|
161
|
+
|
|
162
|
+
def write(self, data: object, position: int) -> None:
|
|
163
|
+
"""Writes the properties value.
|
|
164
|
+
|
|
165
|
+
If `position` is also given, the property is marked animated and
|
|
166
|
+
the values are written starting at `position`.
|
|
167
|
+
|
|
168
|
+
:param data: numpy array of float32 values.
|
|
169
|
+
"""
|
|
170
|
+
|
|
171
|
+
def writeConstantRange(
|
|
172
|
+
self, data: object, position_start: int, position_end: int
|
|
173
|
+
) -> None:
|
|
174
|
+
"""Fills the properties frame range with a constant value and marks it animated.
|
|
175
|
+
|
|
176
|
+
:param data: numpy array of float values representing the constant value.
|
|
177
|
+
"""
|
|
178
|
+
|
|
131
179
|
class Device:
|
|
132
180
|
"""Device objects represent an audio output backend like OpenAL or SDL, but might also represent a file output or RAM buffer output."""
|
|
133
181
|
|
|
@@ -462,7 +510,7 @@ class Sound:
|
|
|
462
510
|
"""Sound objects are immutable and represent a sound that can be played simultaneously multiple times. They are called factories because they create reader objects internally that are used for playback."""
|
|
463
511
|
|
|
464
512
|
length: object
|
|
465
|
-
"""The
|
|
513
|
+
"""The sample specification of the sound as a tuple with rate and channel count."""
|
|
466
514
|
|
|
467
515
|
specs: object
|
|
468
516
|
"""The sample specification of the sound as a tuple with rate and channel count."""
|
|
@@ -486,6 +534,16 @@ class Sound:
|
|
|
486
534
|
def addSound(self, sound: Sound) -> None:
|
|
487
535
|
"""Adds a new sound to a sound list."""
|
|
488
536
|
|
|
537
|
+
def animateableTimeStretchPitchScale(
|
|
538
|
+
self,
|
|
539
|
+
fps: float,
|
|
540
|
+
time_stretch: float | object,
|
|
541
|
+
pitch_scale: float | object,
|
|
542
|
+
quality: int,
|
|
543
|
+
preserve_formant: bool,
|
|
544
|
+
) -> Sound:
|
|
545
|
+
"""Applies time-stretching and pitch-scaling to the sound."""
|
|
546
|
+
|
|
489
547
|
def binaural(self, hrtf: HRTF, source: Source, threadPool: ThreadPool) -> Sound:
|
|
490
548
|
"""Creates a binaural sound using another sound as source. The original sound must be mono"""
|
|
491
549
|
|
|
@@ -620,6 +678,15 @@ class Sound:
|
|
|
620
678
|
all between to 0.
|
|
621
679
|
"""
|
|
622
680
|
|
|
681
|
+
def timeStretchPitchScale(
|
|
682
|
+
self,
|
|
683
|
+
time_stretch: float,
|
|
684
|
+
pitch_scale: float,
|
|
685
|
+
quality: int,
|
|
686
|
+
preserve_formant: bool,
|
|
687
|
+
) -> Sound:
|
|
688
|
+
"""Applies time-stretching and pitch-scaling to the sound."""
|
|
689
|
+
|
|
623
690
|
@classmethod
|
|
624
691
|
def triangle(cls, frequency: float, rate: int) -> Sound:
|
|
625
692
|
"""Creates a triangle sound which plays a triangle wave."""
|
|
@@ -13,7 +13,7 @@ WORD_WRAP: int
|
|
|
13
13
|
def aspect(fontid: int, aspect: float) -> None:
|
|
14
14
|
"""Set the aspect for drawing text."""
|
|
15
15
|
|
|
16
|
-
def bind_imbuf(fontid: int, image: object
|
|
16
|
+
def bind_imbuf(fontid: int, image: object) -> object:
|
|
17
17
|
"""Context manager to draw text into an image buffer instead of the GPU's context."""
|
|
18
18
|
|
|
19
19
|
def clipping(fontid: int, xmin: float, ymin: float, xmax: float, ymax: float) -> None:
|
|
@@ -12,9 +12,9 @@ import bpy.types
|
|
|
12
12
|
def from_edit_mesh(mesh: bpy.types.Mesh) -> bmesh.types.BMesh:
|
|
13
13
|
"""Return a BMesh from this mesh, currently the mesh must already be in editmode."""
|
|
14
14
|
|
|
15
|
-
def new(use_operators: bool = True) -> bmesh.types.BMesh: ...
|
|
15
|
+
def new(*, use_operators: bool = True) -> bmesh.types.BMesh: ...
|
|
16
16
|
def update_edit_mesh(
|
|
17
|
-
mesh: bpy.types.Mesh, loop_triangles: bool = True, destructive: bool = True
|
|
17
|
+
mesh: bpy.types.Mesh, *, loop_triangles: bool = True, destructive: bool = True
|
|
18
18
|
) -> None:
|
|
19
19
|
"""Update the mesh after changes to the BMesh in editmode,
|
|
20
20
|
optionally recalculating n-gon tessellation.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Access to BMesh operators"""
|
|
1
|
+
"""Access to BMesh operators."""
|
|
2
2
|
|
|
3
3
|
def average_vert_facedata(*args: object, **kwargs: object) -> None:
|
|
4
4
|
"""BMeshOpFunc bmesh.ops.average_vert_facedata(bmesh, verts=[])
|
|
@@ -176,7 +176,7 @@ def extrude_edge_only(*args: object, **kwargs: object) -> None:
|
|
|
176
176
|
"""
|
|
177
177
|
|
|
178
178
|
def extrude_face_region(*args: object, **kwargs: object) -> None:
|
|
179
|
-
"""BMeshOpFunc bmesh.ops.extrude_face_region(bmesh, geom=[], edges_exclude={}, use_keep_orig=False, use_normal_flip=False, use_normal_from_adjacent=False, use_dissolve_ortho_edges=False, use_select_history=False)
|
|
179
|
+
"""BMeshOpFunc bmesh.ops.extrude_face_region(bmesh, geom=[], edges_exclude={}, use_keep_orig=False, use_normal_flip=False, use_normal_from_adjacent=False, use_dissolve_ortho_edges=False, use_select_history=False, skip_input_flip=False)
|
|
180
180
|
-> dict(geom=[])
|
|
181
181
|
"""
|
|
182
182
|
|
|
@@ -191,7 +191,7 @@ def face_attribute_fill(*args: object, **kwargs: object) -> None:
|
|
|
191
191
|
"""
|
|
192
192
|
|
|
193
193
|
def find_doubles(*args: object, **kwargs: object) -> None:
|
|
194
|
-
"""BMeshOpFunc bmesh.ops.find_doubles(bmesh, verts=[], keep_verts=[], dist=0.0)
|
|
194
|
+
"""BMeshOpFunc bmesh.ops.find_doubles(bmesh, verts=[], keep_verts=[], use_connected=False, dist=0.0)
|
|
195
195
|
-> dict(targetmap={})
|
|
196
196
|
"""
|
|
197
197
|
|
|
@@ -276,7 +276,7 @@ def region_extend(*args: object, **kwargs: object) -> None:
|
|
|
276
276
|
"""
|
|
277
277
|
|
|
278
278
|
def remove_doubles(*args: object, **kwargs: object) -> None:
|
|
279
|
-
"""BMeshOpFunc bmesh.ops.remove_doubles(bmesh, verts=[], dist=0.0)
|
|
279
|
+
"""BMeshOpFunc bmesh.ops.remove_doubles(bmesh, verts=[], use_connected=False, dist=0.0)
|
|
280
280
|
-> dict()
|
|
281
281
|
"""
|
|
282
282
|
|
|
@@ -391,7 +391,7 @@ def unsubdivide(*args: object, **kwargs: object) -> None:
|
|
|
391
391
|
"""
|
|
392
392
|
|
|
393
393
|
def weld_verts(*args: object, **kwargs: object) -> None:
|
|
394
|
-
"""BMeshOpFunc bmesh.ops.weld_verts(bmesh, targetmap={})
|
|
394
|
+
"""BMeshOpFunc bmesh.ops.weld_verts(bmesh, targetmap={}, use_centroid=False)
|
|
395
395
|
-> dict()
|
|
396
396
|
"""
|
|
397
397
|
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
+
""".. |UV_STICKY_SELECT_MODE_REF| replace:: (:class:`bpy.types.ToolSettings.uv_sticky_select_mode` which may be passed in directly).
|
|
2
|
+
|
|
3
|
+
.. |UV_STICKY_SELECT_MODE_TYPE| replace:: Literal['SHARED_LOCATION', 'DISABLED', 'SHARED_VERTEX']
|
|
4
|
+
|
|
5
|
+
.. |UV_SELECT_FLUSH_MODE_NEEDED| replace:: This function selection-mode independent, typically :class:`BMesh.uv_select_flush_mode` should be called afterwards.
|
|
6
|
+
|
|
7
|
+
.. |UV_SELECT_SYNC_TO_MESH_NEEDED| replace:: This function doesn't flush the selection to the mesh, typically :class:`BMesh.uv_select_sync_to_mesh` should be called afterwards.
|
|
8
|
+
"""
|
|
9
|
+
|
|
1
10
|
from collections.abc import Callable
|
|
11
|
+
from collections.abc import Iterable
|
|
2
12
|
from collections.abc import Iterator
|
|
3
13
|
from collections.abc import Sequence
|
|
14
|
+
from typing import Literal
|
|
4
15
|
import bpy.types
|
|
5
16
|
import mathutils
|
|
6
17
|
|
|
@@ -217,6 +228,7 @@ class BMEdgeSeq:
|
|
|
217
228
|
|
|
218
229
|
def sort(
|
|
219
230
|
self,
|
|
231
|
+
*,
|
|
220
232
|
key: Callable[[BMVert | BMEdge | BMFace], int] | None = None,
|
|
221
233
|
reverse: bool = False,
|
|
222
234
|
) -> None:
|
|
@@ -352,6 +364,11 @@ class BMFace:
|
|
|
352
364
|
tag: bool
|
|
353
365
|
"""Generic attribute scripts can use for own logic
|
|
354
366
|
|
|
367
|
+
:type: bool"""
|
|
368
|
+
|
|
369
|
+
uv_select: bool
|
|
370
|
+
"""UV selected state of this element.
|
|
371
|
+
|
|
355
372
|
:type: bool"""
|
|
356
373
|
|
|
357
374
|
@property
|
|
@@ -401,7 +418,7 @@ class BMFace:
|
|
|
401
418
|
def calc_tangent_vert_diagonal(self) -> mathutils.Vector:
|
|
402
419
|
"""Return face tangent based on the two most distant vertices."""
|
|
403
420
|
|
|
404
|
-
def copy(self, verts: bool = True, edges: bool = True) -> BMFace:
|
|
421
|
+
def copy(self, *, verts: bool = True, edges: bool = True) -> BMFace:
|
|
405
422
|
"""Make a copy of this face."""
|
|
406
423
|
|
|
407
424
|
def copy_from(self, other: object) -> None:
|
|
@@ -428,13 +445,16 @@ class BMFace:
|
|
|
428
445
|
This is different from the *select* attribute because it updates the selection state of associated geometry.
|
|
429
446
|
"""
|
|
430
447
|
|
|
448
|
+
def uv_select_set(self, select: bool) -> None:
|
|
449
|
+
"""Select the face."""
|
|
450
|
+
|
|
431
451
|
def __iter__(self) -> Iterator[object]: ...
|
|
432
452
|
|
|
433
453
|
class BMFaceSeq:
|
|
434
454
|
active: BMFace | None
|
|
435
455
|
"""active face.
|
|
436
456
|
|
|
437
|
-
:type: :class:`BMFace`
|
|
457
|
+
:type: :class:`BMFace` | None"""
|
|
438
458
|
|
|
439
459
|
@property
|
|
440
460
|
def layers(self) -> BMLayerAccessFace:
|
|
@@ -477,6 +497,7 @@ class BMFaceSeq:
|
|
|
477
497
|
|
|
478
498
|
def sort(
|
|
479
499
|
self,
|
|
500
|
+
*,
|
|
480
501
|
key: Callable[[BMVert | BMEdge | BMFace], int] | None = None,
|
|
481
502
|
reverse: bool = False,
|
|
482
503
|
) -> None:
|
|
@@ -520,11 +541,6 @@ class BMLayerAccessEdge:
|
|
|
520
541
|
|
|
521
542
|
:type: :class:`BMLayerCollection` of :class:`mathutils.Vector`"""
|
|
522
543
|
|
|
523
|
-
freestyle: BMLayerCollection
|
|
524
|
-
"""Accessor for Freestyle edge layer.
|
|
525
|
-
|
|
526
|
-
:type: :class:`BMLayerCollection`"""
|
|
527
|
-
|
|
528
544
|
int: object
|
|
529
545
|
"""Generic int custom-data layer.
|
|
530
546
|
|
|
@@ -563,11 +579,6 @@ class BMLayerAccessFace:
|
|
|
563
579
|
|
|
564
580
|
:type: :class:`BMLayerCollection` of :class:`mathutils.Vector`"""
|
|
565
581
|
|
|
566
|
-
freestyle: BMLayerCollection
|
|
567
|
-
"""Accessor for Freestyle face layer.
|
|
568
|
-
|
|
569
|
-
:type: :class:`BMLayerCollection`"""
|
|
570
|
-
|
|
571
582
|
int: object
|
|
572
583
|
"""Generic int custom-data layer.
|
|
573
584
|
|
|
@@ -660,7 +671,7 @@ class BMLayerAccessVert:
|
|
|
660
671
|
:type: :class:`BMLayerCollection` of int"""
|
|
661
672
|
|
|
662
673
|
shape: object
|
|
663
|
-
"""Vertex
|
|
674
|
+
"""Vertex shape-key absolute location (as a 3D Vector).
|
|
664
675
|
|
|
665
676
|
:type: :class:`BMLayerCollection` of :class:`mathutils.Vector`"""
|
|
666
677
|
|
|
@@ -811,6 +822,16 @@ class BMLoop:
|
|
|
811
822
|
tag: bool
|
|
812
823
|
"""Generic attribute scripts can use for own logic
|
|
813
824
|
|
|
825
|
+
:type: bool"""
|
|
826
|
+
|
|
827
|
+
uv_select_edge: bool
|
|
828
|
+
"""UV selected state of this element.
|
|
829
|
+
|
|
830
|
+
:type: bool"""
|
|
831
|
+
|
|
832
|
+
uv_select_vert: bool
|
|
833
|
+
"""UV selected state of this element.
|
|
834
|
+
|
|
814
835
|
:type: bool"""
|
|
815
836
|
|
|
816
837
|
@property
|
|
@@ -851,6 +872,12 @@ class BMLoop:
|
|
|
851
872
|
) -> None:
|
|
852
873
|
"""Interpolate the customdata from a face onto this loop (the loops vert should overlap the face)."""
|
|
853
874
|
|
|
875
|
+
def uv_select_edge_set(self, select: bool) -> None:
|
|
876
|
+
"""Set the UV edge selection state."""
|
|
877
|
+
|
|
878
|
+
def uv_select_vert_set(self, select: bool) -> None:
|
|
879
|
+
"""Select the UV vertex."""
|
|
880
|
+
|
|
854
881
|
def __iter__(self) -> Iterator[object]: ...
|
|
855
882
|
|
|
856
883
|
class BMLoopSeq:
|
|
@@ -864,16 +891,6 @@ class BMLoopUV:
|
|
|
864
891
|
pin_uv: bool
|
|
865
892
|
"""UV pin state.
|
|
866
893
|
|
|
867
|
-
:type: bool"""
|
|
868
|
-
|
|
869
|
-
select: bool
|
|
870
|
-
"""UV select state.
|
|
871
|
-
|
|
872
|
-
:type: bool"""
|
|
873
|
-
|
|
874
|
-
select_edge: bool
|
|
875
|
-
"""UV edge select state.
|
|
876
|
-
|
|
877
894
|
:type: bool"""
|
|
878
895
|
|
|
879
896
|
@property
|
|
@@ -1057,6 +1074,7 @@ class BMVertSeq:
|
|
|
1057
1074
|
|
|
1058
1075
|
def sort(
|
|
1059
1076
|
self,
|
|
1077
|
+
*,
|
|
1060
1078
|
key: Callable[[BMVert | BMEdge | BMFace], int] | None = None,
|
|
1061
1079
|
reverse: bool = False,
|
|
1062
1080
|
) -> None:
|
|
@@ -1102,10 +1120,14 @@ class BMesh:
|
|
|
1102
1120
|
|
|
1103
1121
|
:type: :class:`BMEditSelSeq`"""
|
|
1104
1122
|
|
|
1105
|
-
select_mode: set[
|
|
1106
|
-
"""The selection mode,
|
|
1123
|
+
select_mode: set[Literal["VERT", "EDGE", "FACE"]]
|
|
1124
|
+
"""The selection mode, cannot be assigned an empty set.
|
|
1125
|
+
|
|
1126
|
+
:type: set[Literal['VERT', 'EDGE', 'FACE']]"""
|
|
1107
1127
|
|
|
1108
|
-
:
|
|
1128
|
+
uv_select_sync_valid: bool
|
|
1129
|
+
"""When true, the UV selection has been synchronized. Setting to False means the UV selection will be ignored. While setting to true is supported it is up to the script author to ensure a correct selection state before doing so.
|
|
1130
|
+
:type: bool"""
|
|
1109
1131
|
|
|
1110
1132
|
@property
|
|
1111
1133
|
def verts(self) -> BMVertSeq:
|
|
@@ -1116,7 +1138,7 @@ class BMesh:
|
|
|
1116
1138
|
def calc_loop_triangles(self) -> list[tuple[BMLoop, BMLoop, BMLoop]]:
|
|
1117
1139
|
"""Calculate triangle tessellation from quads/ngons."""
|
|
1118
1140
|
|
|
1119
|
-
def calc_volume(self, signed: bool = False) -> float:
|
|
1141
|
+
def calc_volume(self, *, signed: bool = False) -> float:
|
|
1120
1142
|
"""Calculate mesh volume based on face normals."""
|
|
1121
1143
|
|
|
1122
1144
|
def clear(self) -> None:
|
|
@@ -1129,17 +1151,19 @@ class BMesh:
|
|
|
1129
1151
|
def from_mesh(
|
|
1130
1152
|
self,
|
|
1131
1153
|
mesh: bpy.types.Mesh,
|
|
1154
|
+
*,
|
|
1132
1155
|
face_normals: bool = True,
|
|
1133
1156
|
vertex_normals: bool = True,
|
|
1134
1157
|
use_shape_key: bool = False,
|
|
1135
1158
|
shape_key_index: int = 0,
|
|
1136
1159
|
) -> None:
|
|
1137
|
-
"""Initialize this bmesh from existing mesh
|
|
1160
|
+
"""Initialize this bmesh from existing mesh data-block."""
|
|
1138
1161
|
|
|
1139
1162
|
def from_object(
|
|
1140
1163
|
self,
|
|
1141
1164
|
object: bpy.types.Object,
|
|
1142
1165
|
depsgraph: bpy.types.Depsgraph,
|
|
1166
|
+
*,
|
|
1143
1167
|
cage: bool = False,
|
|
1144
1168
|
face_normals: bool = True,
|
|
1145
1169
|
vertex_normals: bool = True,
|
|
@@ -1150,15 +1174,65 @@ class BMesh:
|
|
|
1150
1174
|
"""Update normals of mesh faces and verts."""
|
|
1151
1175
|
|
|
1152
1176
|
def select_flush(self, select: bool) -> None:
|
|
1153
|
-
"""Flush selection, independent of the current selection mode."""
|
|
1177
|
+
"""Flush selection from vertices, independent of the current selection mode."""
|
|
1154
1178
|
|
|
1155
|
-
def select_flush_mode(self) -> None:
|
|
1156
|
-
"""
|
|
1179
|
+
def select_flush_mode(self, *, flush_down: bool = False) -> None:
|
|
1180
|
+
"""Flush selection based on the current mode current :class:`BMesh.select_mode`."""
|
|
1157
1181
|
|
|
1158
1182
|
def to_mesh(self, mesh: bpy.types.Mesh) -> None:
|
|
1159
|
-
"""Writes this BMesh data into an existing Mesh
|
|
1183
|
+
"""Writes this BMesh data into an existing Mesh data-block."""
|
|
1160
1184
|
|
|
1161
1185
|
def transform(
|
|
1162
|
-
self,
|
|
1186
|
+
self,
|
|
1187
|
+
matrix: mathutils.Matrix,
|
|
1188
|
+
*,
|
|
1189
|
+
filter: set[Literal["SELECT", "HIDE", "SEAM", "SMOOTH", "TAG"]] | None = None,
|
|
1163
1190
|
) -> None:
|
|
1164
1191
|
"""Transform the mesh (optionally filtering flagged data only)."""
|
|
1192
|
+
|
|
1193
|
+
def uv_select_flush(self, select: bool) -> None:
|
|
1194
|
+
"""Flush selection from UV vertices to edges & faces independent of the selection mode."""
|
|
1195
|
+
|
|
1196
|
+
def uv_select_flush_mode(self, *, flush_down: bool = False) -> None:
|
|
1197
|
+
"""Flush selection based on the current mode current :class:`BMesh.select_mode`."""
|
|
1198
|
+
|
|
1199
|
+
def uv_select_flush_shared(self, select: bool) -> None:
|
|
1200
|
+
"""Flush selection from UV vertices to contiguous UV's independent of the selection mode."""
|
|
1201
|
+
|
|
1202
|
+
def uv_select_foreach_set(
|
|
1203
|
+
self,
|
|
1204
|
+
select: bool,
|
|
1205
|
+
/,
|
|
1206
|
+
*,
|
|
1207
|
+
loop_verts: Iterable[BMLoop] = (),
|
|
1208
|
+
loop_edges: Iterable[BMLoop] = (),
|
|
1209
|
+
faces: Iterable[BMFace] = (),
|
|
1210
|
+
sticky_select_mode: str = "SHARED_LOCATION",
|
|
1211
|
+
) -> None:
|
|
1212
|
+
"""Set the UV selection state for loop-vertices, loop-edges & faces.
|
|
1213
|
+
|
|
1214
|
+
This is a close equivalent to selecting in the UV editor.
|
|
1215
|
+
"""
|
|
1216
|
+
|
|
1217
|
+
def uv_select_foreach_set_from_mesh(
|
|
1218
|
+
self,
|
|
1219
|
+
select: bool,
|
|
1220
|
+
/,
|
|
1221
|
+
*,
|
|
1222
|
+
verts: Iterable[BMVert] = (),
|
|
1223
|
+
edges: Iterable[BMEdge] = (),
|
|
1224
|
+
faces: Iterable[BMFace] = (),
|
|
1225
|
+
sticky_select_mode: str = "SHARED_LOCATION",
|
|
1226
|
+
) -> None:
|
|
1227
|
+
"""Select or de-select mesh elements, updating the UV selection.
|
|
1228
|
+
|
|
1229
|
+
An equivalent to selecting from the 3D viewport for selection operations that support maintaining a synchronized UV selection.
|
|
1230
|
+
"""
|
|
1231
|
+
|
|
1232
|
+
def uv_select_sync_from_mesh(
|
|
1233
|
+
self, *, sticky_select_mode: str = "SHARED_LOCATION"
|
|
1234
|
+
) -> None:
|
|
1235
|
+
"""Sync selection from mesh to UVs."""
|
|
1236
|
+
|
|
1237
|
+
def uv_select_sync_to_mesh(self) -> None:
|
|
1238
|
+
"""Sync selection from UVs to the mesh."""
|
|
@@ -24,6 +24,7 @@ def face_split(
|
|
|
24
24
|
face: bmesh.types.BMFace,
|
|
25
25
|
vert_a: bmesh.types.BMVert,
|
|
26
26
|
vert_b: bmesh.types.BMVert,
|
|
27
|
+
*,
|
|
27
28
|
coords: Sequence[Sequence[float]] = (),
|
|
28
29
|
use_exist: bool = True,
|
|
29
30
|
example: bmesh.types.BMEdge | None = None,
|
|
@@ -41,6 +42,11 @@ def face_vert_separate(face: bmesh.types.BMFace, vert: bmesh.types.BMVert) -> No
|
|
|
41
42
|
def loop_separate(loop: bmesh.types.BMLoop) -> None:
|
|
42
43
|
"""Rip a vertex in a face away and add a new vertex."""
|
|
43
44
|
|
|
45
|
+
def uv_select_check(
|
|
46
|
+
bm: object, /, *, sync: bool = True, flush: bool = False, contiguous: bool = False
|
|
47
|
+
) -> dict[str, int] | None:
|
|
48
|
+
"""Split an edge, return the newly created data."""
|
|
49
|
+
|
|
44
50
|
def vert_collapse_edge(
|
|
45
51
|
vert: bmesh.types.BMVert, edge: bmesh.types.BMEdge
|
|
46
52
|
) -> bmesh.types.BMEdge:
|
|
@@ -56,8 +56,6 @@ debug_depsgraph_time: bool
|
|
|
56
56
|
|
|
57
57
|
debug_events: bool
|
|
58
58
|
|
|
59
|
-
debug_ffmpeg: bool
|
|
60
|
-
|
|
61
59
|
debug_freestyle: bool
|
|
62
60
|
|
|
63
61
|
debug_handlers: bool
|
|
@@ -131,7 +129,7 @@ version_string: str
|
|
|
131
129
|
def count(value: object, /) -> None:
|
|
132
130
|
"""Return number of occurrences of value."""
|
|
133
131
|
|
|
134
|
-
def help_text(all: bool) ->
|
|
132
|
+
def help_text(all: bool) -> str:
|
|
135
133
|
"""Return the help text as a string."""
|
|
136
134
|
|
|
137
135
|
def index(
|
|
@@ -144,3 +142,6 @@ def index(
|
|
|
144
142
|
|
|
145
143
|
def is_job_running(job_type: str) -> bool:
|
|
146
144
|
"""Check whether a job of the given type is running."""
|
|
145
|
+
|
|
146
|
+
def memory_usage_undo() -> int:
|
|
147
|
+
"""Get undo memory usage information."""
|