fake-bpy-module 20241103__py3-none-any.whl → 20241112__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.

Files changed (57) hide show
  1. addon_utils/__init__.pyi +28 -13
  2. bl_console_utils/autocomplete/complete_calltip/__init__.pyi +1 -2
  3. bl_console_utils/autocomplete/complete_import/__init__.pyi +3 -6
  4. bl_console_utils/autocomplete/complete_namespace/__init__.pyi +1 -2
  5. bl_console_utils/autocomplete/intellisense/__init__.pyi +2 -6
  6. bl_operators/image_as_planes/__init__.pyi +12 -39
  7. bl_operators/uvcalc_transform/__init__.pyi +4 -42
  8. bl_operators/wm/__init__.pyi +8 -0
  9. bl_ui/generic_ui_list/__init__.pyi +2 -1
  10. bl_ui/properties_grease_pencil_common/__init__.pyi +0 -7
  11. bl_ui/space_userpref/__init__.pyi +2 -2
  12. blf/__init__.pyi +3 -5
  13. bmesh/types/__init__.pyi +22 -33
  14. bmesh/utils/__init__.pyi +6 -16
  15. bpy/app/icons/__init__.pyi +5 -11
  16. bpy/app/translations/__init__.pyi +7 -14
  17. bpy/msgbus/__init__.pyi +7 -8
  18. bpy/ops/curves/__init__.pyi +16 -0
  19. bpy/ops/nla/__init__.pyi +1 -1
  20. bpy/ops/sequencer/__init__.pyi +3 -0
  21. bpy/path/__init__.pyi +6 -16
  22. bpy/props/__init__.pyi +122 -135
  23. bpy/types/__init__.pyi +418 -615
  24. bpy/typing/__init__.pyi +1 -1
  25. bpy/utils/__init__.pyi +30 -29
  26. bpy/utils/previews/__init__.pyi +1 -2
  27. bpy/utils/units/__init__.pyi +1 -2
  28. bpy_extras/anim_utils/__init__.pyi +5 -12
  29. bpy_extras/bmesh_utils/__init__.pyi +1 -2
  30. bpy_extras/image_utils/__init__.pyi +2 -5
  31. bpy_extras/io_utils/__init__.pyi +8 -14
  32. bpy_extras/mesh_utils/__init__.pyi +14 -29
  33. bpy_extras/object_utils/__init__.pyi +1 -1
  34. bpy_extras/view3d_utils/__init__.pyi +3 -10
  35. {fake_bpy_module-20241103.dist-info → fake_bpy_module-20241112.dist-info}/METADATA +1 -1
  36. {fake_bpy_module-20241103.dist-info → fake_bpy_module-20241112.dist-info}/RECORD +57 -57
  37. {fake_bpy_module-20241103.dist-info → fake_bpy_module-20241112.dist-info}/WHEEL +1 -1
  38. freestyle/chainingiterators/__init__.pyi +2 -7
  39. freestyle/functions/__init__.pyi +4 -16
  40. freestyle/types/__init__.pyi +29 -63
  41. freestyle/utils/ContextFunctions/__init__.pyi +2 -2
  42. freestyle/utils/__init__.pyi +1 -2
  43. gpu/__init__.pyi +19 -5
  44. gpu/matrix/__init__.pyi +2 -2
  45. gpu/state/__init__.pyi +16 -8
  46. gpu/types/__init__.pyi +14 -29
  47. gpu_extras/batch/__init__.pyi +9 -9
  48. gpu_extras/presets/__init__.pyi +4 -11
  49. idprop/types/__init__.pyi +1 -2
  50. imbuf/__init__.pyi +2 -4
  51. mathutils/__init__.pyi +30 -95
  52. mathutils/bvhtree/__init__.pyi +13 -17
  53. mathutils/geometry/__init__.pyi +26 -45
  54. mathutils/interpolate/__init__.pyi +2 -2
  55. mathutils/kdtree/__init__.pyi +13 -28
  56. rna_info/__init__.pyi +1 -2
  57. {fake_bpy_module-20241103.dist-info → fake_bpy_module-20241112.dist-info}/top_level.txt +0 -0
@@ -70,7 +70,7 @@ def integrate(
70
70
  it: freestyle.types.Interface0DIterator,
71
71
  it_end: freestyle.types.Interface0DIterator,
72
72
  integration_type: freestyle.types.IntegrationType,
73
- ) -> float:
73
+ ):
74
74
  """Returns a single value from a set of values evaluated at each 0D
75
75
  element of this 1D element.
76
76
 
@@ -91,7 +91,6 @@ def integrate(
91
91
  value type is float if func is of the `UnaryFunction0DDouble`
92
92
  or `UnaryFunction0DFloat` type, and int if func is of the
93
93
  `UnaryFunction0DUnsigned` type.
94
- :rtype: float
95
94
  """
96
95
 
97
96
  def is_poly_clockwise(stroke):
gpu/__init__.pyi CHANGED
@@ -22,7 +22,13 @@ A batch contains the necessary data to perform the drawing.
22
22
  That includes an obligatory *Vertex Buffer* and an optional *Index Buffer*,
23
23
  each of which is described in more detail in the following sections.
24
24
  A batch also defines a draw type.
25
- Typical draw types are POINTS, LINES and TRIS.
25
+ Typical draw types are POINTS
26
+
27
+ , LINES
28
+
29
+ and TRIS
30
+
31
+ .
26
32
  The draw type determines how the data will be interpreted and drawn.
27
33
 
28
34
 
@@ -78,7 +84,9 @@ indices = ((0, 1, 2), (2, 1, 3))
78
84
  ibo = gpu.types.GPUIndexBuf(type='TRIS', seq=indices)
79
85
  ```
80
86
 
81
- Here the first tuple in indices describes which vertices should be used for the first triangle
87
+ Here the first tuple in indices
88
+
89
+ describes which vertices should be used for the first triangle
82
90
  (same for the second tuple).
83
91
  Note how the diagonal vertices 1 and 2 are shared between both triangles.
84
92
 
@@ -92,12 +100,18 @@ Typically multiple shaders are linked together into a *Program*.
92
100
  However, in the Blender Python API the term *Shader* refers to an OpenGL Program.
93
101
  Every gpu.types.GPUShader consists of a vertex shader, a fragment shader and an optional geometry shader.
94
102
  For common drawing tasks there are some built-in shaders accessible from gpu.shader.from_builtin
95
- with an identifier such as UNIFORM_COLOR or FLAT_COLOR.
103
+ with an identifier such as UNIFORM_COLOR
104
+
105
+ or FLAT_COLOR
106
+
107
+ .
96
108
 
97
109
  Every shader defines a set of attributes and uniforms that have to be set in order to use the shader.
98
110
  Attributes are properties that are set using a vertex buffer and can be different for individual vertices.
99
111
  Uniforms are properties that are constant per draw call.
100
- They can be set using the shader.uniform_* functions after the shader has been bound.
112
+ They can be set using the shader.uniform_*
113
+
114
+ functions after the shader has been bound.
101
115
 
102
116
 
103
117
  --------------------
@@ -123,7 +137,7 @@ This is called Offscreen Rendering.
123
137
  In Blender Offscreen Rendering is done using the gpu.types.GPUOffScreen type.
124
138
 
125
139
  [WARNING]
126
- GPUOffScreen objects are bound to the OpenGL context they have been created in.
140
+ gpu.types.GPUOffScreen objects are bound to the OpenGL context they have been created in.
127
141
  This means that once Blender discards this context (i.e. the window is closed),
128
142
  the offscreen instance will be freed.
129
143
 
gpu/matrix/__init__.pyi CHANGED
@@ -86,7 +86,7 @@ def reset():
86
86
  def scale(scale):
87
87
  """Scale the current stack matrix.
88
88
 
89
- :param scale: Scale the current stack matrix.
89
+ :param scale: Scale the current stack matrix with 2 or 3 floats.
90
90
  """
91
91
 
92
92
  def scale_uniform(scale: float):
@@ -99,5 +99,5 @@ def scale_uniform(scale: float):
99
99
  def translate(offset):
100
100
  """Scale the current stack matrix.
101
101
 
102
- :param offset: Translate the current stack matrix.
102
+ :param offset: Translate the current stack matrix with 2 or 3 floats.
103
103
  """
gpu/state/__init__.pyi CHANGED
@@ -17,14 +17,22 @@ def blend_set(mode: str):
17
17
  """Defines the fixed pipeline blending equation.
18
18
 
19
19
  :param mode: The type of blend mode.
20
- * NONE No blending.
21
- * ALPHA The original color channels are interpolated according to the alpha value.
22
- * ALPHA_PREMULT The original color channels are interpolated according to the alpha value with the new colors pre-multiplied by this value.
23
- * ADDITIVE The original color channels are added by the corresponding ones.
24
- * ADDITIVE_PREMULT The original color channels are added by the corresponding ones that are pre-multiplied by the alpha value.
25
- * MULTIPLY The original color channels are multiplied by the corresponding ones.
26
- * SUBTRACT The original color channels are subtracted by the corresponding ones.
27
- * INVERT The original color channels are replaced by its complementary color.
20
+
21
+ NONE No blending.
22
+
23
+ ALPHA The original color channels are interpolated according to the alpha value.
24
+
25
+ ALPHA_PREMULT The original color channels are interpolated according to the alpha value with the new colors pre-multiplied by this value.
26
+
27
+ ADDITIVE The original color channels are added by the corresponding ones.
28
+
29
+ ADDITIVE_PREMULT The original color channels are added by the corresponding ones that are pre-multiplied by the alpha value.
30
+
31
+ MULTIPLY The original color channels are multiplied by the corresponding ones.
32
+
33
+ SUBTRACT The original color channels are subtracted by the corresponding ones.
34
+
35
+ INVERT The original color channels are replaced by its complementary color.
28
36
  :type mode: str
29
37
  """
30
38
 
gpu/types/__init__.pyi CHANGED
@@ -41,8 +41,7 @@ class GPUBatch:
41
41
  def draw_range(
42
42
  self, program: GPUShader, *, elem_start: int = 0, elem_count: int = 0
43
43
  ):
44
- """Run the drawing program with the parameters assigned to the batch. Only draw
45
- the elem_count elements of the index buffer starting at elem_start
44
+ """Run the drawing program with the parameters assigned to the batch. Only draw the elem_count elements of the index buffer starting at elem_start.
46
45
 
47
46
  :param program: Program that performs the drawing operations.
48
47
  :type program: GPUShader
@@ -93,7 +92,7 @@ class GPUFrameBuffer:
93
92
  """Fill color, depth and stencil textures with specific value.
94
93
  Common values: color=(0.0, 0.0, 0.0, 1.0), depth=1.0, stencil=0.
95
94
 
96
- :param color: float sequence each representing (r, g, b, a).
95
+ :param color: Sequence of 3 or 4 floats representing (r, g, b, a).
97
96
  :param depth: depth value.
98
97
  :type depth: float | None
99
98
  :param stencil: stencil value.
@@ -272,11 +271,10 @@ class GPUShader:
272
271
  :rtype: int
273
272
  """
274
273
 
275
- def attrs_info_get(self) -> tuple:
274
+ def attrs_info_get(self):
276
275
  """Information about the attributes used in the Shader.
277
276
 
278
277
  :return: tuples containing information about the attributes in order (name, type)
279
- :rtype: tuple
280
278
  """
281
279
 
282
280
  def bind(self):
@@ -315,22 +313,20 @@ class GPUShader:
315
313
  :rtype: int
316
314
  """
317
315
 
318
- def uniform_bool(self, name: str, value: bool):
316
+ def uniform_bool(self, name: str, value):
319
317
  """Specify the value of a uniform variable for the current program object.
320
318
 
321
319
  :param name: Name of the uniform variable whose value is to be changed.
322
320
  :type name: str
323
321
  :param value: Value that will be used to update the specified uniform variable.
324
- :type value: bool
325
322
  """
326
323
 
327
- def uniform_float(self, name: str, value: list[float]):
324
+ def uniform_float(self, name: str, value):
328
325
  """Specify the value of a uniform variable for the current program object.
329
326
 
330
327
  :param name: Name of the uniform variable whose value is to be changed.
331
328
  :type name: str
332
329
  :param value: Value that will be used to update the specified uniform variable.
333
- :type value: list[float]
334
330
  """
335
331
 
336
332
  def uniform_from_name(self, name: str) -> int:
@@ -342,13 +338,12 @@ class GPUShader:
342
338
  :rtype: int
343
339
  """
344
340
 
345
- def uniform_int(self, name: str, seq: list[int]):
341
+ def uniform_int(self, name: str, seq):
346
342
  """Specify the value of a uniform variable for the current program object.
347
343
 
348
344
  :param name: name of the uniform variable whose value is to be changed.
349
345
  :type name: str
350
346
  :param seq: Value that will be used to update the specified uniform variable.
351
- :type seq: list[int]
352
347
  """
353
348
 
354
349
  def uniform_sampler(self, name: str, texture: GPUTexture):
@@ -360,15 +355,12 @@ class GPUShader:
360
355
  :type texture: GPUTexture
361
356
  """
362
357
 
363
- def uniform_vector_float(
364
- self, location: int, buffer: list[float], length: int, count: int
365
- ):
358
+ def uniform_vector_float(self, location: int, buffer, length: int, count: int):
366
359
  """Set the buffer to fill the uniform.
367
360
 
368
361
  :param location: Location of the uniform variable to be modified.
369
362
  :type location: int
370
363
  :param buffer: The data that should be set. Can support the buffer protocol.
371
- :type buffer: list[float]
372
364
  :param length: Size of the uniform data type:
373
365
 
374
366
  1: float
@@ -464,12 +456,7 @@ class GPUShaderCreateInfo:
464
456
  """
465
457
 
466
458
  def image(
467
- self,
468
- slot: int,
469
- format: str,
470
- type: str,
471
- name: str,
472
- qualifiers: set = {"NO_RESTRICT"},
459
+ self, slot: int, format: str, type: str, name: str, qualifiers={"NO_RESTRICT"}
473
460
  ):
474
461
  """Specify an image resource used for arbitrary load and store operations.
475
462
 
@@ -637,7 +624,6 @@ class GPUShaderCreateInfo:
637
624
  - NO_RESTRICT
638
625
  - READ
639
626
  - WRITE
640
- :type qualifiers: set
641
627
  """
642
628
 
643
629
  def local_group_size(self, x: int, y: int = -1, z: int = -1):
@@ -651,7 +637,7 @@ class GPUShaderCreateInfo:
651
637
  :type z: int
652
638
  """
653
639
 
654
- def push_constant(self, type: str, name: str, size=0):
640
+ def push_constant(self, type: str, name: str, size: int = 0):
655
641
  """Specify a global access constant.
656
642
 
657
643
  :param type: One of these types:
@@ -689,6 +675,7 @@ class GPUShaderCreateInfo:
689
675
  :param name: Name of the constant.
690
676
  :type name: str
691
677
  :param size: If not zero, indicates that the constant is an array with the specified size.
678
+ :type size: int
692
679
  """
693
680
 
694
681
  def sampler(self, slot: int, type: str, name: str):
@@ -773,7 +760,7 @@ class GPUShaderCreateInfo:
773
760
  """
774
761
 
775
762
  def uniform_buf(self, slot: int, type_name: str, name: str):
776
- """Specify a uniform variable whose type can be one of those declared in typedef_source.
763
+ """Specify a uniform variable whose type can be one of those declared in `gpu.types.GPUShaderCreateInfo.typedef_source`.
777
764
 
778
765
  :param slot: The uniform variable index.
779
766
  :type slot: int
@@ -991,7 +978,7 @@ class GPUTexture:
991
978
  :param format: The format that describes the content of a single item.
992
979
  Possible values are FLOAT, INT, UINT, UBYTE, UINT_24_8 and 10_11_11_REV.
993
980
  :type format: str
994
- :param value: sequence each representing the value to fill.
981
+ :param value: Sequence each representing the value to fill. Sizes 1..4 are supported.
995
982
  """
996
983
 
997
984
  def read(self):
@@ -1009,13 +996,11 @@ class GPUUniformBuf:
1009
996
  class GPUVertBuf:
1010
997
  """Contains a VBO."""
1011
998
 
1012
- def attr_fill(self, id: int | str, data: list[float]):
999
+ def attr_fill(self, id, data):
1013
1000
  """Insert data into the buffer for a single attribute.
1014
1001
 
1015
1002
  :param id: Either the name or the id of the attribute.
1016
- :type id: int | str
1017
- :param data: Sequence of data that should be stored in the buffer
1018
- :type data: list[float]
1003
+ :param data: Buffer or sequence of data that should be stored in the buffer
1019
1004
  """
1020
1005
 
1021
1006
  class GPUVertFormat:
@@ -4,16 +4,16 @@ import typing_extensions
4
4
  import gpu.types
5
5
 
6
6
  def batch_for_shader(
7
- shader: gpu.types.GPUShader, type: str, content: dict, *, indices=None
7
+ shader: gpu.types.GPUShader, type: str, content, *, indices=None
8
8
  ) -> gpu.types.GPUBatch:
9
9
  """Return a batch already configured and compatible with the shader.
10
10
 
11
- :param shader: shader for which a compatible format will be computed.
12
- :type shader: gpu.types.GPUShader
13
- :param type: "'POINTS', 'LINES', 'TRIS' or 'LINES_ADJ'".
14
- :type type: str
15
- :param content: Maps the name of the shader attribute with the data to fill the vertex buffer.
16
- :type content: dict
17
- :return: compatible batch
18
- :rtype: gpu.types.GPUBatch
11
+ :param shader: shader for which a compatible format will be computed.
12
+ :type shader: gpu.types.GPUShader
13
+ :param type: "'POINTS', 'LINES', 'TRIS' or 'LINES_ADJ'".
14
+ :type type: str
15
+ :param content: Maps the name of the shader attribute with the data to fill the vertex buffer.
16
+ For the dictionary values see documentation for `gpu.types.GPUVertBuf.attr_fill` data argument.
17
+ :return: compatible batch
18
+ :rtype: gpu.types.GPUBatch
19
19
  """
@@ -4,24 +4,17 @@ import typing_extensions
4
4
  import gpu.types
5
5
  import mathutils
6
6
 
7
- def draw_circle_2d(
8
- position: collections.abc.Sequence[float] | mathutils.Vector,
9
- color,
10
- radius: float,
11
- *,
12
- segments: int | None = None,
13
- ):
7
+ def draw_circle_2d(position, color, radius: float, *, segments=None):
14
8
  """Draw a circle.
15
9
 
16
- :param position: Position where the circle will be drawn.
17
- :type position: collections.abc.Sequence[float] | mathutils.Vector
18
- :param color: Color of the circle. To use transparency GL_BLEND has to be enabled.
10
+ :param position: 2D position where the circle will be drawn.
11
+ :param color: Color of the circle (RGBA).
12
+ To use transparency blend must be set to ALPHA, see: `gpu.state.blend_set`.
19
13
  :param radius: Radius of the circle.
20
14
  :type radius: float
21
15
  :param segments: How many segments will be used to draw the circle.
22
16
  Higher values give better results but the drawing will take longer.
23
17
  If None or not specified, an automatic value will be calculated.
24
- :type segments: int | None
25
18
  """
26
19
 
27
20
  def draw_texture_2d(
idprop/types/__init__.pyi CHANGED
@@ -40,11 +40,10 @@ class IDPropertyGroup:
40
40
  def to_dict(self):
41
41
  """Return a purely Python version of the group."""
42
42
 
43
- def update(self, other: dict | typing_extensions.Self):
43
+ def update(self, other):
44
44
  """Update key, values.
45
45
 
46
46
  :param other: Updates the values in the group with this.
47
- :type other: dict | typing_extensions.Self
48
47
  """
49
48
 
50
49
  def values(self):
imbuf/__init__.pyi CHANGED
@@ -18,11 +18,10 @@ import imbuf.types
18
18
 
19
19
  from . import types as types
20
20
 
21
- def load(filepath: bytes | str) -> imbuf.types.ImBuf:
21
+ def load(filepath) -> imbuf.types.ImBuf:
22
22
  """Load an image from a file.
23
23
 
24
24
  :param filepath: the filepath of the image.
25
- :type filepath: bytes | str
26
25
  :return: the newly loaded image.
27
26
  :rtype: imbuf.types.ImBuf
28
27
  """
@@ -35,11 +34,10 @@ def new(size) -> imbuf.types.ImBuf:
35
34
  :rtype: imbuf.types.ImBuf
36
35
  """
37
36
 
38
- def write(image: imbuf.types.ImBuf, filepath: bytes | str = image.filepath):
37
+ def write(image: imbuf.types.ImBuf, filepath=image.filepath):
39
38
  """Write an image.
40
39
 
41
40
  :param image: the image to write.
42
41
  :type image: imbuf.types.ImBuf
43
42
  :param filepath: Optional filepath of the image (fallback to the images file path).
44
- :type filepath: bytes | str
45
43
  """