blender-python-stubs 5.0.1.0__tar.gz → 5.1.0.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-5.1.0.1/.python-version +1 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/PKG-INFO +7 -6
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/README.md +4 -3
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/aud/__init__.pyi +8 -5
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bl_math/__init__.pyi +9 -2
- blender_python_stubs-5.1.0.1/blf/__init__.pyi +117 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bmesh/__init__.pyi +11 -4
- blender_python_stubs-5.1.0.1/bmesh/geometry/__init__.pyi +13 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bmesh/types/__init__.pyi +500 -298
- blender_python_stubs-5.1.0.1/bmesh/utils/__init__.pyi +121 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy/__init__.pyi +1 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy/app/__init__.pyi +10 -2
- blender_python_stubs-5.1.0.1/bpy/msgbus/__init__.pyi +30 -0
- blender_python_stubs-5.1.0.1/bpy/ops/__init__.pyi +81726 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy/path/__init__.pyi +38 -8
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy/props/__init__.pyi +92 -28
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy/types/__init__.pyi +2052 -1144
- blender_python_stubs-5.1.0.1/bpy/utils/__init__.pyi +377 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy/utils/previews/__init__.pyi +14 -4
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy_extras/anim_utils/__init__.pyi +77 -21
- blender_python_stubs-5.1.0.1/bpy_extras/asset_utils/__init__.pyi +53 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy_extras/bmesh_utils/__init__.pyi +2 -0
- blender_python_stubs-5.1.0.1/bpy_extras/id_map_utils/__init__.pyi +12 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy_extras/image_utils/__init__.pyi +7 -4
- blender_python_stubs-5.1.0.1/bpy_extras/io_utils/__init__.pyi +139 -0
- blender_python_stubs-5.1.0.1/bpy_extras/keyconfig_utils/__init__.pyi +25 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy_extras/mesh_utils/__init__.pyi +27 -12
- blender_python_stubs-5.1.0.1/bpy_extras/node_utils/__init__.pyi +30 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy_extras/object_utils/__init__.pyi +32 -10
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy_extras/view3d_utils/__init__.pyi +17 -9
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/freestyle/chainingiterators/__init__.pyi +11 -11
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/freestyle/functions/__init__.pyi +1 -1
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/freestyle/types/__init__.pyi +9 -4
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/gpu/capabilities/__init__.pyi +9 -3
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/gpu/compute/__init__.pyi +5 -2
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/gpu/matrix/__init__.pyi +34 -13
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/gpu/platform/__init__.pyi +1 -1
- blender_python_stubs-5.1.0.1/gpu/select/__init__.pyi +7 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/gpu/shader/__init__.pyi +12 -8
- blender_python_stubs-5.1.0.1/gpu/state/__init__.pyi +135 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/gpu/texture/__init__.pyi +3 -1
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/gpu/types/__init__.pyi +318 -174
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/gpu_extras/batch/__init__.pyi +15 -2
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/gpu_extras/presets/__init__.pyi +9 -4
- blender_python_stubs-5.1.0.1/idprop/__init__.pyi +7 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/idprop/types/__init__.pyi +55 -18
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/imbuf/__init__.pyi +17 -5
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/imbuf/types/__init__.pyi +16 -8
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/mathutils/__init__.pyi +327 -165
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/mathutils/bvhtree/__init__.pyi +33 -12
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/mathutils/geometry/__init__.pyi +108 -32
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/mathutils/interpolate/__init__.pyi +4 -1
- blender_python_stubs-5.1.0.1/mathutils/kdtree/__init__.pyi +52 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/mathutils/noise/__init__.pyi +70 -21
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/pyproject.toml +3 -3
- blender_python_stubs-5.0.1.0/.python-version +0 -1
- blender_python_stubs-5.0.1.0/blf/__init__.pyi +0 -62
- blender_python_stubs-5.0.1.0/bmesh/geometry/__init__.pyi +0 -7
- blender_python_stubs-5.0.1.0/bmesh/utils/__init__.pyi +0 -69
- blender_python_stubs-5.0.1.0/bpy/ops/__init__.pyi +0 -176
- blender_python_stubs-5.0.1.0/bpy/utils/__init__.pyi +0 -228
- blender_python_stubs-5.0.1.0/bpy_extras/asset_utils/__init__.pyi +0 -25
- blender_python_stubs-5.0.1.0/bpy_extras/id_map_utils/__init__.pyi +0 -10
- blender_python_stubs-5.0.1.0/bpy_extras/io_utils/__init__.pyi +0 -83
- blender_python_stubs-5.0.1.0/bpy_extras/keyconfig_utils/__init__.pyi +0 -10
- blender_python_stubs-5.0.1.0/bpy_extras/node_utils/__init__.pyi +0 -18
- blender_python_stubs-5.0.1.0/gpu/select/__init__.pyi +0 -4
- blender_python_stubs-5.0.1.0/gpu/state/__init__.pyi +0 -96
- blender_python_stubs-5.0.1.0/idprop/__init__.pyi +0 -3
- blender_python_stubs-5.0.1.0/mathutils/kdtree/__init__.pyi +0 -35
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/.gitignore +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/LICENSE +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/aud/py.typed +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bl_math/py.typed +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/blf/py.typed +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bmesh/ops/__init__.pyi +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bmesh/py.typed +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy/py.typed +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy/utils/toolsystem/__init__.pyi +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy_extras/__init__.pyi +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy_extras/node_shader_utils/__init__.pyi +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/bpy_extras/py.typed +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/freestyle/__init__.pyi +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/freestyle/predicates/__init__.pyi +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/freestyle/py.typed +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/freestyle/shaders/__init__.pyi +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/freestyle/utils/__init__.pyi +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/gpu/__init__.pyi +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/gpu/py.typed +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/gpu_extras/__init__.pyi +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/gpu_extras/py.typed +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/idprop/py.typed +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/imbuf/py.typed +0 -0
- {blender_python_stubs-5.0.1.0 → blender_python_stubs-5.1.0.1}/mathutils/py.typed +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: blender-python-stubs
|
|
3
|
-
Version: 5.0.1
|
|
4
|
-
Summary: Type stubs for Blender 5.
|
|
3
|
+
Version: 5.1.0.1
|
|
4
|
+
Summary: Type stubs for Blender 5.1 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
|
|
@@ -16,19 +16,19 @@ Classifier: Programming Language :: Python :: 3
|
|
|
16
16
|
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
|
|
17
17
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
18
|
Classifier: Typing :: Stubs Only
|
|
19
|
-
Requires-Python: >=3.
|
|
19
|
+
Requires-Python: >=3.13
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
21
21
|
|
|
22
22
|
# blender-python-stubs
|
|
23
23
|
|
|
24
|
-
Type stubs for Blender 5.
|
|
24
|
+
Type stubs for Blender 5.1 Python API.
|
|
25
25
|
|
|
26
26
|
Provides autocomplete, type checking, and inline documentation for `bpy`, `mathutils`, `bmesh`, `gpu`, `freestyle`, and all other Blender Python modules.
|
|
27
27
|
|
|
28
28
|
## Installation
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
pip install "blender-python-stubs>=5.
|
|
31
|
+
pip install "blender-python-stubs>=5.1,<5.2"
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## Features
|
|
@@ -47,7 +47,8 @@ pip install "blender-python-stubs>=5.0,<5.1"
|
|
|
47
47
|
```python
|
|
48
48
|
import bpy
|
|
49
49
|
|
|
50
|
-
obj
|
|
50
|
+
obj = bpy.context.active_object
|
|
51
|
+
assert obj is not None
|
|
51
52
|
obj.location.x = 1.0
|
|
52
53
|
|
|
53
54
|
bpy.data.objects.new("Cube", bpy.data.meshes.new("Mesh"))
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# blender-python-stubs
|
|
2
2
|
|
|
3
|
-
Type stubs for Blender 5.
|
|
3
|
+
Type stubs for Blender 5.1 Python API.
|
|
4
4
|
|
|
5
5
|
Provides autocomplete, type checking, and inline documentation for `bpy`, `mathutils`, `bmesh`, `gpu`, `freestyle`, and all other Blender Python modules.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
pip install "blender-python-stubs>=5.
|
|
10
|
+
pip install "blender-python-stubs>=5.1,<5.2"
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Features
|
|
@@ -26,7 +26,8 @@ pip install "blender-python-stubs>=5.0,<5.1"
|
|
|
26
26
|
```python
|
|
27
27
|
import bpy
|
|
28
28
|
|
|
29
|
-
obj
|
|
29
|
+
obj = bpy.context.active_object
|
|
30
|
+
assert obj is not None
|
|
30
31
|
obj.location.x = 1.0
|
|
31
32
|
|
|
32
33
|
bpy.data.objects.new("Cube", bpy.data.meshes.new("Mesh"))
|
|
@@ -251,7 +251,7 @@ class DynamicMusic:
|
|
|
251
251
|
volume: object
|
|
252
252
|
"""The volume of the scene."""
|
|
253
253
|
|
|
254
|
-
def addScene(self, scene: Sound) -> int:
|
|
254
|
+
def addScene(self, scene: Sound, /) -> int:
|
|
255
255
|
"""Adds a new scene."""
|
|
256
256
|
|
|
257
257
|
def addTransition(self, ini: int, end: int, transition: Sound) -> bool:
|
|
@@ -531,7 +531,7 @@ class Sound:
|
|
|
531
531
|
Note that with additivity the signal is not monotonic anymore.
|
|
532
532
|
"""
|
|
533
533
|
|
|
534
|
-
def addSound(self, sound: Sound) -> None:
|
|
534
|
+
def addSound(self, sound: Sound, /) -> None:
|
|
535
535
|
"""Adds a new sound to a sound list."""
|
|
536
536
|
|
|
537
537
|
def animateableTimeStretchPitchScale(
|
|
@@ -570,6 +570,9 @@ class Sound:
|
|
|
570
570
|
def delay(self, time: float) -> Sound:
|
|
571
571
|
"""Delays by playing adding silence in front of the other sound's data."""
|
|
572
572
|
|
|
573
|
+
def echo(self, delay: float, feedback: float, mix: float) -> Sound:
|
|
574
|
+
"""Adds Echo effect to the sound."""
|
|
575
|
+
|
|
573
576
|
def envelope(
|
|
574
577
|
self, attack: float, release: float, threshold: float, arthreshold: float
|
|
575
578
|
) -> Sound:
|
|
@@ -609,7 +612,7 @@ class Sound:
|
|
|
609
612
|
function :math:`H(s) = s^2 / (s^2 + s/Q + 1)`
|
|
610
613
|
"""
|
|
611
614
|
|
|
612
|
-
def join(self, sound: Sound) -> Sound:
|
|
615
|
+
def join(self, sound: Sound, /) -> Sound:
|
|
613
616
|
"""Plays two factories in sequence."""
|
|
614
617
|
|
|
615
618
|
def limit(self, start: float, end: float) -> Sound:
|
|
@@ -625,10 +628,10 @@ class Sound:
|
|
|
625
628
|
def lowpass(self, frequency: float, Q: float = 0.5) -> Sound:
|
|
626
629
|
"""Creates a second order lowpass filter based on the transfer function :math:`H(s) = 1 / (s^2 + s/Q + 1)`"""
|
|
627
630
|
|
|
628
|
-
def mix(self, sound: Sound) -> Sound:
|
|
631
|
+
def mix(self, sound: Sound, /) -> Sound:
|
|
629
632
|
"""Mixes two factories."""
|
|
630
633
|
|
|
631
|
-
def modulate(self, sound: Sound) -> Sound:
|
|
634
|
+
def modulate(self, sound: Sound, /) -> Sound:
|
|
632
635
|
"""Modulates two factories."""
|
|
633
636
|
|
|
634
637
|
def mutable(self) -> Sound:
|
|
@@ -3,12 +3,19 @@
|
|
|
3
3
|
def clamp(value: float, min: float = 0, max: float = 1) -> float:
|
|
4
4
|
"""Clamps the float value between minimum and maximum. To avoid
|
|
5
5
|
confusion, any call must use either one or all three arguments.
|
|
6
|
+
|
|
7
|
+
:param value: The value to clamp.
|
|
6
8
|
"""
|
|
7
9
|
|
|
8
10
|
def lerp(from_value: float, to_value: float, factor: float) -> float:
|
|
9
|
-
"""Linearly interpolate between two float values based on factor.
|
|
11
|
+
"""Linearly interpolate between two float values based on factor.
|
|
12
|
+
|
|
13
|
+
:param from_value: The value to return when factor is 0.
|
|
14
|
+
"""
|
|
10
15
|
|
|
11
|
-
def smoothstep(from_value: float, to_value: float, value:
|
|
16
|
+
def smoothstep(from_value: float, to_value: float, value: float) -> float:
|
|
12
17
|
"""Performs smooth interpolation between 0 and 1 as value changes between from and to values.
|
|
13
18
|
Outside the range the function returns the same value as the nearest edge.
|
|
19
|
+
|
|
20
|
+
:param from_value: The edge value where the result is 0.
|
|
14
21
|
"""
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"""This module provides access to Blender's text drawing functions."""
|
|
2
|
+
|
|
3
|
+
import imbuf.types
|
|
4
|
+
|
|
5
|
+
CLIPPING: int
|
|
6
|
+
|
|
7
|
+
MONOCHROME: int
|
|
8
|
+
|
|
9
|
+
ROTATION: int
|
|
10
|
+
|
|
11
|
+
SHADOW: int
|
|
12
|
+
|
|
13
|
+
WORD_WRAP: int
|
|
14
|
+
|
|
15
|
+
def aspect(fontid: int, aspect: float) -> None:
|
|
16
|
+
"""Set the aspect for drawing text.
|
|
17
|
+
|
|
18
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
def bind_imbuf(
|
|
22
|
+
fontid: int, imbuf: imbuf.types.ImBuf, *, display_name: str | None = None
|
|
23
|
+
) -> object:
|
|
24
|
+
"""Context manager to draw text into an image buffer instead of the GPU's context.
|
|
25
|
+
|
|
26
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
def clipping(fontid: int, xmin: float, ymin: float, xmax: float, ymax: float) -> None:
|
|
30
|
+
"""Set the clipping, enable/disable using :data:`CLIPPING`.
|
|
31
|
+
|
|
32
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def color(fontid: int, r: float, g: float, b: float, a: float) -> None:
|
|
36
|
+
"""Set the color for drawing text.
|
|
37
|
+
|
|
38
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def dimensions(fontid: int, text: str) -> tuple[float, float]:
|
|
42
|
+
"""Return the width and height of the text.
|
|
43
|
+
|
|
44
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
def disable(fontid: int, option: int) -> None:
|
|
48
|
+
"""Disable a font drawing option.
|
|
49
|
+
|
|
50
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
def draw(fontid: int, text: str) -> None:
|
|
54
|
+
"""Draw text in the current context.
|
|
55
|
+
|
|
56
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
def draw_buffer(fontid: int, text: str) -> None:
|
|
60
|
+
"""Draw text into the image buffer bound via :func:`blf.bind_imbuf`.
|
|
61
|
+
|
|
62
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
def enable(fontid: int, option: int) -> None:
|
|
66
|
+
"""Enable a font drawing option.
|
|
67
|
+
|
|
68
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
def load(filepath: str | bytes) -> int:
|
|
72
|
+
"""Load a new font.
|
|
73
|
+
|
|
74
|
+
:param filepath: The filepath of the font.
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
def position(fontid: int, x: float, y: float, z: float) -> None:
|
|
78
|
+
"""Set the position for drawing text.
|
|
79
|
+
|
|
80
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
def rotation(fontid: int, angle: float) -> None:
|
|
84
|
+
"""Set the text rotation angle, enable/disable using :data:`ROTATION`.
|
|
85
|
+
|
|
86
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
def shadow(fontid: int, level: int, r: float, g: float, b: float, a: float) -> None:
|
|
90
|
+
"""Shadow options, enable/disable using :data:`SHADOW`.
|
|
91
|
+
|
|
92
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
93
|
+
"""
|
|
94
|
+
|
|
95
|
+
def shadow_offset(fontid: int, x: int, y: int) -> None:
|
|
96
|
+
"""Set the offset for shadow text, enable/disable using :data:`SHADOW`.
|
|
97
|
+
|
|
98
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
def size(fontid: int, size: float) -> None:
|
|
102
|
+
"""Set the size for drawing text.
|
|
103
|
+
|
|
104
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
def unload(filepath: str | bytes) -> None:
|
|
108
|
+
"""Unload an existing font.
|
|
109
|
+
|
|
110
|
+
:param filepath: The filepath of the font.
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
def word_wrap(fontid: int, wrap_width: int) -> None:
|
|
114
|
+
"""Set the wrap width, enable/disable using :data:`WORD_WRAP`.
|
|
115
|
+
|
|
116
|
+
:param fontid: The id of the typeface as returned by :func:`blf.load`, for default font use 0.
|
|
117
|
+
"""
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""This module provides access to
|
|
1
|
+
"""This module provides access to Blender's bmesh data structures.
|
|
2
2
|
|
|
3
3
|
.. include:: include__bmesh.rst"""
|
|
4
4
|
|
|
@@ -9,13 +9,20 @@ from . import utils as utils
|
|
|
9
9
|
import bmesh.types
|
|
10
10
|
import bpy.types
|
|
11
11
|
|
|
12
|
-
def from_edit_mesh(mesh: bpy.types.Mesh) -> bmesh.types.BMesh:
|
|
13
|
-
"""Return a BMesh from this mesh, currently the mesh must already be in editmode.
|
|
12
|
+
def from_edit_mesh(mesh: bpy.types.Mesh, /) -> bmesh.types.BMesh:
|
|
13
|
+
"""Return a BMesh from this mesh, currently the mesh must already be in editmode.
|
|
14
|
+
|
|
15
|
+
:param mesh: The editmode mesh.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
def new(*, use_operators: bool = True) -> bmesh.types.BMesh:
|
|
19
|
+
""":param use_operators: Support calling operators in :mod:`bmesh.ops` (uses some extra memory per vert/edge/face)."""
|
|
14
20
|
|
|
15
|
-
def new(*, use_operators: bool = True) -> bmesh.types.BMesh: ...
|
|
16
21
|
def update_edit_mesh(
|
|
17
22
|
mesh: bpy.types.Mesh, *, loop_triangles: bool = True, destructive: bool = True
|
|
18
23
|
) -> None:
|
|
19
24
|
"""Update the mesh after changes to the BMesh in editmode,
|
|
20
25
|
optionally recalculating n-gon tessellation.
|
|
26
|
+
|
|
27
|
+
:param mesh: The editmode mesh.
|
|
21
28
|
"""
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""This module provides access to bmesh geometry evaluation functions."""
|
|
2
|
+
|
|
3
|
+
from collections.abc import Sequence
|
|
4
|
+
import bmesh
|
|
5
|
+
import bmesh.types
|
|
6
|
+
|
|
7
|
+
def intersect_face_point(
|
|
8
|
+
face: bmesh.types.BMFace, point: tuple[float, float, float] | Sequence[float]
|
|
9
|
+
) -> bool:
|
|
10
|
+
"""Tests if the projection of a point is inside a face (using the face's normal).
|
|
11
|
+
|
|
12
|
+
:param face: The face to test.
|
|
13
|
+
"""
|