fake-bpy-module 20240417__py3-none-any.whl → 20240418__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fake-bpy-module might be problematic. Click here for more details.
- _bpy_internal/__init__.pyi +4 -0
- _bpy_internal/freedesktop/__init__.pyi +88 -0
- _bpy_internal/freedesktop/py.typed +0 -0
- _bpy_internal/py.typed +0 -0
- aud/__init__.pyi +121 -48
- bgl/__init__.pyi +2443 -1265
- bl_math/__init__.pyi +19 -3
- blf/__init__.pyi +63 -13
- bmesh/__init__.pyi +13 -0
- bmesh/geometry/__init__.pyi +5 -0
- bmesh/ops/__init__.pyi +157 -68
- bmesh/types/__init__.pyi +109 -62
- bmesh/utils/__init__.pyi +11 -2
- bpy/__init__.pyi +7 -0
- bpy/app/__init__.pyi +13 -0
- bpy/app/handlers/__init__.pyi +41 -0
- bpy/app/icons/__init__.pyi +4 -2
- bpy/app/timers/__init__.pyi +38 -2
- bpy/app/translations/__init__.pyi +58 -0
- bpy/msgbus/__init__.pyi +46 -0
- bpy/ops/__init__.pyi +151 -0
- bpy/ops/action/__init__.pyi +76 -76
- bpy/ops/anim/__init__.pyi +104 -104
- bpy/ops/armature/__init__.pyi +96 -96
- bpy/ops/asset/__init__.pyi +32 -32
- bpy/ops/boid/__init__.pyi +16 -16
- bpy/ops/brush/__init__.pyi +18 -18
- bpy/ops/buttons/__init__.pyi +12 -12
- bpy/ops/cachefile/__init__.pyi +10 -10
- bpy/ops/camera/__init__.pyi +4 -4
- bpy/ops/clip/__init__.pyi +184 -184
- bpy/ops/cloth/__init__.pyi +2 -2
- bpy/ops/collection/__init__.pyi +18 -18
- bpy/ops/console/__init__.pyi +42 -42
- bpy/ops/constraint/__init__.pyi +36 -36
- bpy/ops/curve/__init__.pyi +102 -102
- bpy/ops/curves/__init__.pyi +54 -54
- bpy/ops/cycles/__init__.pyi +6 -6
- bpy/ops/dpaint/__init__.pyi +10 -10
- bpy/ops/ed/__init__.pyi +24 -24
- bpy/ops/export_anim/__init__.pyi +2 -2
- bpy/ops/export_mesh/__init__.pyi +2 -2
- bpy/ops/export_scene/__init__.pyi +7 -7
- bpy/ops/file/__init__.pyi +80 -80
- bpy/ops/fluid/__init__.pyi +28 -28
- bpy/ops/font/__init__.pyi +46 -46
- bpy/ops/geometry/__init__.pyi +20 -20
- bpy/ops/gizmogroup/__init__.pyi +4 -4
- bpy/ops/gpencil/__init__.pyi +300 -300
- bpy/ops/graph/__init__.pyi +130 -130
- bpy/ops/grease_pencil/__init__.pyi +112 -112
- bpy/ops/image/__init__.pyi +92 -92
- bpy/ops/import_anim/__init__.pyi +2 -2
- bpy/ops/import_curve/__init__.pyi +2 -2
- bpy/ops/import_mesh/__init__.pyi +2 -2
- bpy/ops/import_scene/__init__.pyi +6 -6
- bpy/ops/info/__init__.pyi +14 -14
- bpy/ops/lattice/__init__.pyi +16 -16
- bpy/ops/marker/__init__.pyi +22 -22
- bpy/ops/mask/__init__.pyi +78 -78
- bpy/ops/material/__init__.pyi +6 -6
- bpy/ops/mball/__init__.pyi +16 -16
- bpy/ops/mesh/__init__.pyi +326 -326
- bpy/ops/nla/__init__.pyi +79 -79
- bpy/ops/node/__init__.pyi +202 -202
- bpy/ops/object/__init__.pyi +488 -500
- bpy/ops/outliner/__init__.pyi +138 -138
- bpy/ops/paint/__init__.pyi +104 -104
- bpy/ops/paintcurve/__init__.pyi +16 -16
- bpy/ops/palette/__init__.pyi +14 -14
- bpy/ops/particle/__init__.pyi +72 -72
- bpy/ops/pose/__init__.pyi +78 -78
- bpy/ops/poselib/__init__.pyi +18 -18
- bpy/ops/preferences/__init__.pyi +76 -76
- bpy/ops/ptcache/__init__.pyi +14 -14
- bpy/ops/render/__init__.pyi +24 -24
- bpy/ops/rigidbody/__init__.pyi +26 -26
- bpy/ops/scene/__init__.pyi +78 -78
- bpy/ops/screen/__init__.pyi +78 -78
- bpy/ops/script/__init__.pyi +6 -6
- bpy/ops/sculpt/__init__.pyi +62 -62
- bpy/ops/sculpt_curves/__init__.pyi +8 -8
- bpy/ops/sequencer/__init__.pyi +170 -170
- bpy/ops/sound/__init__.pyi +14 -14
- bpy/ops/spreadsheet/__init__.pyi +8 -8
- bpy/ops/surface/__init__.pyi +12 -12
- bpy/ops/text/__init__.pyi +86 -86
- bpy/ops/text_editor/__init__.pyi +2 -2
- bpy/ops/texture/__init__.pyi +8 -8
- bpy/ops/transform/__init__.pyi +54 -54
- bpy/ops/ui/__init__.pyi +64 -64
- bpy/ops/uilist/__init__.pyi +6 -6
- bpy/ops/uv/__init__.pyi +98 -98
- bpy/ops/view2d/__init__.pyi +28 -28
- bpy/ops/view3d/__init__.pyi +134 -134
- bpy/ops/wm/__init__.pyi +224 -224
- bpy/ops/workspace/__init__.pyi +14 -14
- bpy/ops/world/__init__.pyi +2 -2
- bpy/path/__init__.pyi +6 -0
- bpy/props/__init__.pyi +141 -29
- bpy/types/__init__.pyi +101490 -5018
- bpy/utils/__init__.pyi +18 -3
- bpy/utils/previews/__init__.pyi +15 -0
- bpy/utils/units/__init__.pyi +11 -3
- bpy_extras/__init__.pyi +19 -0
- bpy_extras/asset_utils/__init__.pyi +5 -0
- {fake_bpy_module-20240417.dist-info → fake_bpy_module-20240418.dist-info}/METADATA +1 -1
- {fake_bpy_module-20240417.dist-info → fake_bpy_module-20240418.dist-info}/RECORD +137 -133
- {fake_bpy_module-20240417.dist-info → fake_bpy_module-20240418.dist-info}/top_level.txt +1 -0
- freestyle/__init__.pyi +18 -0
- freestyle/chainingiterators/__init__.pyi +20 -5
- freestyle/functions/__init__.pyi +151 -155
- freestyle/predicates/__init__.pyi +53 -46
- freestyle/shaders/__init__.pyi +91 -32
- freestyle/types/__init__.pyi +362 -120
- freestyle/utils/ContextFunctions/__init__.pyi +32 -7
- freestyle/utils/__init__.pyi +13 -1
- gpu/__init__.pyi +225 -0
- gpu/capabilities/__init__.pyi +37 -15
- gpu/matrix/__init__.pyi +7 -1
- gpu/platform/__init__.pyi +5 -0
- gpu/select/__init__.pyi +5 -0
- gpu/shader/__init__.pyi +77 -0
- gpu/state/__init__.pyi +15 -4
- gpu/texture/__init__.pyi +5 -0
- gpu/types/__init__.pyi +91 -33
- gpu_extras/__init__.pyi +15 -0
- gpu_extras/presets/__init__.pyi +16 -4
- imbuf/__init__.pyi +13 -0
- imbuf/types/__init__.pyi +20 -5
- mathutils/__init__.pyi +349 -227
- mathutils/bvhtree/__init__.pyi +21 -8
- mathutils/geometry/__init__.pyi +23 -9
- mathutils/interpolate/__init__.pyi +5 -0
- mathutils/kdtree/__init__.pyi +19 -5
- mathutils/noise/__init__.pyi +87 -41
- {fake_bpy_module-20240417.dist-info → fake_bpy_module-20240418.dist-info}/WHEEL +0 -0
bpy/app/icons/__init__.pyi
CHANGED
|
@@ -4,7 +4,7 @@ GenericType = typing.TypeVar("GenericType")
|
|
|
4
4
|
|
|
5
5
|
def new_triangles(
|
|
6
6
|
range: tuple, coords: typing.Sequence[bytes], colors: typing.Sequence[bytes]
|
|
7
|
-
):
|
|
7
|
+
) -> int:
|
|
8
8
|
"""Create a new icon from triangle geometry.
|
|
9
9
|
|
|
10
10
|
:param range: Pair of ints.
|
|
@@ -14,16 +14,18 @@ def new_triangles(
|
|
|
14
14
|
:param colors: Sequence of ints (12 for one triangles) for RGBA.
|
|
15
15
|
:type colors: typing.Sequence[bytes]
|
|
16
16
|
:return: Unique icon value (pass to interface icon_value argument).
|
|
17
|
+
:rtype: int
|
|
17
18
|
"""
|
|
18
19
|
|
|
19
20
|
...
|
|
20
21
|
|
|
21
|
-
def new_triangles_from_file(filepath: str):
|
|
22
|
+
def new_triangles_from_file(filepath: str) -> int:
|
|
22
23
|
"""Create a new icon from triangle geometry.
|
|
23
24
|
|
|
24
25
|
:param filepath: File path.
|
|
25
26
|
:type filepath: str
|
|
26
27
|
:return: Unique icon value (pass to interface icon_value argument).
|
|
28
|
+
:rtype: int
|
|
27
29
|
"""
|
|
28
30
|
|
|
29
31
|
...
|
bpy/app/timers/__init__.pyi
CHANGED
|
@@ -1,18 +1,53 @@
|
|
|
1
|
+
"""
|
|
2
|
+
|
|
3
|
+
--------------------
|
|
4
|
+
|
|
5
|
+
```../examples/bpy.app.timers.1.py```
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
--------------------
|
|
9
|
+
|
|
10
|
+
```../examples/bpy.app.timers.2.py```
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
--------------------
|
|
14
|
+
|
|
15
|
+
```../examples/bpy.app.timers.3.py```
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
--------------------
|
|
19
|
+
|
|
20
|
+
```../examples/bpy.app.timers.4.py```
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
--------------------
|
|
24
|
+
|
|
25
|
+
You should never modify Blender data at arbitrary points in time in separate threads.
|
|
26
|
+
However you can use a queue to collect all the actions that should be executed when Blender is in the right state again.
|
|
27
|
+
Pythons queue.Queue can be used here, because it implements the required locking semantics.
|
|
28
|
+
|
|
29
|
+
```../examples/bpy.app.timers.5.py```
|
|
30
|
+
|
|
31
|
+
"""
|
|
32
|
+
|
|
1
33
|
import typing
|
|
2
34
|
|
|
3
35
|
GenericType = typing.TypeVar("GenericType")
|
|
4
36
|
|
|
5
|
-
def is_registered(function) -> bool:
|
|
37
|
+
def is_registered(function: int) -> bool:
|
|
6
38
|
"""Check if this function is registered as a timer.
|
|
7
39
|
|
|
8
40
|
:param function: Function to check.
|
|
41
|
+
:type function: int
|
|
9
42
|
:return: True when this function is registered, otherwise False.
|
|
10
43
|
:rtype: bool
|
|
11
44
|
"""
|
|
12
45
|
|
|
13
46
|
...
|
|
14
47
|
|
|
15
|
-
def register(
|
|
48
|
+
def register(
|
|
49
|
+
function: typing.Callable, first_interval: float = 0, persistent: bool = False
|
|
50
|
+
):
|
|
16
51
|
"""Add a new function that will be called after the specified amount of seconds.
|
|
17
52
|
The function gets no arguments and is expected to return either None or a float.
|
|
18
53
|
If None is returned, the timer will be unregistered.
|
|
@@ -22,6 +57,7 @@ def register(function: typing.Callable, first_interval=0, persistent: bool = Fal
|
|
|
22
57
|
:param function: The function that should called.
|
|
23
58
|
:type function: typing.Callable
|
|
24
59
|
:param first_interval: Seconds until the callback should be called the first time.
|
|
60
|
+
:type first_interval: float
|
|
25
61
|
:param persistent: Don't remove timer when a new file is loaded.
|
|
26
62
|
:type persistent: bool
|
|
27
63
|
"""
|
|
@@ -1,3 +1,61 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This object contains some data/methods regarding internationalization in Blender, and allows every py script
|
|
3
|
+
to feature translations for its own UI messages.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
--------------------
|
|
7
|
+
|
|
8
|
+
[WARNING]
|
|
9
|
+
Most of this object should only be useful if you actually manipulate i18n stuff from Python.
|
|
10
|
+
If you are a regular add-on, you should only bother about contexts member,
|
|
11
|
+
and the register/unregister functions! The pgettext family of functions
|
|
12
|
+
should only be used in rare, specific cases (like e.g. complex "composited" UI strings...).
|
|
13
|
+
|
|
14
|
+
To add translations to your python script, you must define a dictionary formatted like that:
|
|
15
|
+
{locale: {msg_key: msg_translation, ...}, ...}
|
|
16
|
+
|
|
17
|
+
where:
|
|
18
|
+
|
|
19
|
+
* locale is either a lang iso code (e.g. fr
|
|
20
|
+
|
|
21
|
+
), a lang+country code (e.g. pt_BR
|
|
22
|
+
|
|
23
|
+
),
|
|
24
|
+
a lang+variant code (e.g. sr@latin
|
|
25
|
+
|
|
26
|
+
), or a full code (e.g. uz_UZ@cyrilic
|
|
27
|
+
|
|
28
|
+
).
|
|
29
|
+
* msg_key is a tuple (context, org message) - use, as much as possible, the predefined contexts.
|
|
30
|
+
* msg_translation is the translated message in given language!
|
|
31
|
+
|
|
32
|
+
Then, call bpy.app.translations.register(__name__, your_dict)
|
|
33
|
+
|
|
34
|
+
in your register()
|
|
35
|
+
|
|
36
|
+
function, and
|
|
37
|
+
bpy.app.translations.unregister(__name__)
|
|
38
|
+
|
|
39
|
+
in your unregister()
|
|
40
|
+
|
|
41
|
+
one.
|
|
42
|
+
|
|
43
|
+
The Manage UI translations
|
|
44
|
+
|
|
45
|
+
add-on has several functions to help you collect strings to translate, and
|
|
46
|
+
generate the needed python code (the translation dictionary), as well as optional intermediary po files
|
|
47
|
+
if you want some... See
|
|
48
|
+
How to Translate Blender and
|
|
49
|
+
Using i18n in Blender Code
|
|
50
|
+
for more info.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
--------------------
|
|
54
|
+
|
|
55
|
+
```../examples/bpy.app.translations.py```
|
|
56
|
+
|
|
57
|
+
"""
|
|
58
|
+
|
|
1
59
|
import typing
|
|
2
60
|
|
|
3
61
|
GenericType = typing.TypeVar("GenericType")
|
bpy/msgbus/__init__.pyi
CHANGED
|
@@ -1,3 +1,49 @@
|
|
|
1
|
+
"""
|
|
2
|
+
The message bus system can be used to receive notifications when properties of
|
|
3
|
+
Blender datablocks are changed via the data API.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
--------------------
|
|
7
|
+
|
|
8
|
+
The message bus system is triggered by updates via the RNA system. This means
|
|
9
|
+
that the following updates will result in a notification on the message bus:
|
|
10
|
+
|
|
11
|
+
* Changes via the Python API, for example some_object.location.x += 3
|
|
12
|
+
|
|
13
|
+
.
|
|
14
|
+
* Changes via the sliders, fields, and buttons in the user interface.
|
|
15
|
+
|
|
16
|
+
The following updates do not trigger message bus notifications:
|
|
17
|
+
|
|
18
|
+
* Moving objects in the 3D Viewport.
|
|
19
|
+
* Changes performed by the animation system.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
--------------------
|
|
23
|
+
|
|
24
|
+
Below is an example of subscription to changes in the active object's location.
|
|
25
|
+
|
|
26
|
+
```../examples/bpy.msgbus.1.py```
|
|
27
|
+
|
|
28
|
+
Some properties are converted to Python objects when you retrieve them. This
|
|
29
|
+
needs to be avoided in order to create the subscription, by using
|
|
30
|
+
datablock.path_resolve("property_name", False)
|
|
31
|
+
|
|
32
|
+
:
|
|
33
|
+
|
|
34
|
+
```../examples/bpy.msgbus.2.py```
|
|
35
|
+
|
|
36
|
+
It is also possible to create subscriptions on a property of all instances of a
|
|
37
|
+
certain type:
|
|
38
|
+
|
|
39
|
+
```../examples/bpy.msgbus.3.py```
|
|
40
|
+
|
|
41
|
+
[NOTE]
|
|
42
|
+
All subscribers will be cleared on file-load. Subscribers can be re-registered on load,
|
|
43
|
+
see bpy.app.handlers.load_post.
|
|
44
|
+
|
|
45
|
+
"""
|
|
46
|
+
|
|
1
47
|
import typing
|
|
2
48
|
|
|
3
49
|
GenericType = typing.TypeVar("GenericType")
|
bpy/ops/__init__.pyi
CHANGED
|
@@ -1,3 +1,154 @@
|
|
|
1
|
+
"""
|
|
2
|
+
|
|
3
|
+
--------------------
|
|
4
|
+
|
|
5
|
+
Provides python access to calling operators, this includes operators written in
|
|
6
|
+
C, Python or macros.
|
|
7
|
+
|
|
8
|
+
Only keyword arguments can be used to pass operator properties.
|
|
9
|
+
|
|
10
|
+
Operators don't have return values as you might expect,
|
|
11
|
+
instead they return a set() which is made up of:
|
|
12
|
+
{'RUNNING_MODAL', 'CANCELLED', 'FINISHED', 'PASS_THROUGH'}
|
|
13
|
+
|
|
14
|
+
.
|
|
15
|
+
Common return values are {'FINISHED'}
|
|
16
|
+
|
|
17
|
+
and {'CANCELLED'}
|
|
18
|
+
|
|
19
|
+
, the latter
|
|
20
|
+
meaning that the operator execution was aborted without making any changes or
|
|
21
|
+
saving an undo history entry.
|
|
22
|
+
|
|
23
|
+
Calling an operator in the wrong context will raise a RuntimeError
|
|
24
|
+
|
|
25
|
+
,
|
|
26
|
+
there is a poll() method to avoid this problem.
|
|
27
|
+
|
|
28
|
+
Note that the operator ID (bl_idname) in this example is mesh.subdivide
|
|
29
|
+
|
|
30
|
+
,
|
|
31
|
+
bpy.ops
|
|
32
|
+
|
|
33
|
+
is just the access path for python.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
--------------------
|
|
37
|
+
|
|
38
|
+
For calling operators keywords are used for operator properties and
|
|
39
|
+
positional arguments are used to define how the operator is called.
|
|
40
|
+
|
|
41
|
+
There are 2 optional positional arguments (documented in detail below).
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
bpy.ops.test.operator(execution_context, undo)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
* execution_context - str
|
|
48
|
+
|
|
49
|
+
(enum).
|
|
50
|
+
* undo - bool
|
|
51
|
+
|
|
52
|
+
type.
|
|
53
|
+
|
|
54
|
+
Each of these arguments is optional, but must be given in the order above.
|
|
55
|
+
|
|
56
|
+
```../examples/bpy.ops.py```
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
--------------------
|
|
60
|
+
|
|
61
|
+
It is possible to override context members that the operator sees, so that they
|
|
62
|
+
act on specified rather than the selected or active data, or to execute an
|
|
63
|
+
operator in the different part of the user interface.
|
|
64
|
+
|
|
65
|
+
The context overrides are passed as a dictionary, with keys matching the context
|
|
66
|
+
member names in bpy.context.
|
|
67
|
+
For example to override bpy.context.active_object
|
|
68
|
+
|
|
69
|
+
,
|
|
70
|
+
you would pass {'active_object': object}
|
|
71
|
+
|
|
72
|
+
to bpy.types.Context.temp_override.
|
|
73
|
+
|
|
74
|
+
[NOTE]
|
|
75
|
+
You will nearly always want to use a copy of the actual current context as basis
|
|
76
|
+
(otherwise, you'll have to find and gather all needed data yourself).
|
|
77
|
+
|
|
78
|
+
```../examples/bpy.ops.1.py```
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
--------------------
|
|
82
|
+
|
|
83
|
+
When calling an operator you may want to pass the execution context.
|
|
84
|
+
|
|
85
|
+
This determines the context that is given for the operator to run in, and whether
|
|
86
|
+
invoke() is called or only execute().
|
|
87
|
+
|
|
88
|
+
EXEC_DEFAULT
|
|
89
|
+
|
|
90
|
+
is used by default, running only the execute()
|
|
91
|
+
|
|
92
|
+
method, but you may
|
|
93
|
+
want the operator to take user interaction with INVOKE_DEFAULT
|
|
94
|
+
|
|
95
|
+
which will also
|
|
96
|
+
call invoke() if existing.
|
|
97
|
+
|
|
98
|
+
The execution context is one of:
|
|
99
|
+
|
|
100
|
+
* INVOKE_DEFAULT
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
* INVOKE_REGION_WIN
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
* INVOKE_REGION_CHANNELS
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
* INVOKE_REGION_PREVIEW
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
* INVOKE_AREA
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
* INVOKE_SCREEN
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
* EXEC_DEFAULT
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
* EXEC_REGION_WIN
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
* EXEC_REGION_CHANNELS
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
* EXEC_REGION_PREVIEW
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
* EXEC_AREA
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
* EXEC_SCREEN
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
```../examples/bpy.ops.2.py```
|
|
138
|
+
|
|
139
|
+
It is also possible to run an operator in a particular part of the user
|
|
140
|
+
interface. For this we need to pass the window, area and sometimes a region.
|
|
141
|
+
|
|
142
|
+
```../examples/bpy.ops.3.py```
|
|
143
|
+
|
|
144
|
+
bpy.ops.*
|
|
145
|
+
|
|
146
|
+
:caption: Submodules
|
|
147
|
+
:maxdepth: 1
|
|
148
|
+
:glob:
|
|
149
|
+
|
|
150
|
+
"""
|
|
151
|
+
|
|
1
152
|
import typing
|
|
2
153
|
from . import action
|
|
3
154
|
from . import anim
|