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.

Files changed (137) hide show
  1. _bpy_internal/__init__.pyi +4 -0
  2. _bpy_internal/freedesktop/__init__.pyi +88 -0
  3. _bpy_internal/freedesktop/py.typed +0 -0
  4. _bpy_internal/py.typed +0 -0
  5. aud/__init__.pyi +121 -48
  6. bgl/__init__.pyi +2443 -1265
  7. bl_math/__init__.pyi +19 -3
  8. blf/__init__.pyi +63 -13
  9. bmesh/__init__.pyi +13 -0
  10. bmesh/geometry/__init__.pyi +5 -0
  11. bmesh/ops/__init__.pyi +157 -68
  12. bmesh/types/__init__.pyi +109 -62
  13. bmesh/utils/__init__.pyi +11 -2
  14. bpy/__init__.pyi +7 -0
  15. bpy/app/__init__.pyi +13 -0
  16. bpy/app/handlers/__init__.pyi +41 -0
  17. bpy/app/icons/__init__.pyi +4 -2
  18. bpy/app/timers/__init__.pyi +38 -2
  19. bpy/app/translations/__init__.pyi +58 -0
  20. bpy/msgbus/__init__.pyi +46 -0
  21. bpy/ops/__init__.pyi +151 -0
  22. bpy/ops/action/__init__.pyi +76 -76
  23. bpy/ops/anim/__init__.pyi +104 -104
  24. bpy/ops/armature/__init__.pyi +96 -96
  25. bpy/ops/asset/__init__.pyi +32 -32
  26. bpy/ops/boid/__init__.pyi +16 -16
  27. bpy/ops/brush/__init__.pyi +18 -18
  28. bpy/ops/buttons/__init__.pyi +12 -12
  29. bpy/ops/cachefile/__init__.pyi +10 -10
  30. bpy/ops/camera/__init__.pyi +4 -4
  31. bpy/ops/clip/__init__.pyi +184 -184
  32. bpy/ops/cloth/__init__.pyi +2 -2
  33. bpy/ops/collection/__init__.pyi +18 -18
  34. bpy/ops/console/__init__.pyi +42 -42
  35. bpy/ops/constraint/__init__.pyi +36 -36
  36. bpy/ops/curve/__init__.pyi +102 -102
  37. bpy/ops/curves/__init__.pyi +54 -54
  38. bpy/ops/cycles/__init__.pyi +6 -6
  39. bpy/ops/dpaint/__init__.pyi +10 -10
  40. bpy/ops/ed/__init__.pyi +24 -24
  41. bpy/ops/export_anim/__init__.pyi +2 -2
  42. bpy/ops/export_mesh/__init__.pyi +2 -2
  43. bpy/ops/export_scene/__init__.pyi +7 -7
  44. bpy/ops/file/__init__.pyi +80 -80
  45. bpy/ops/fluid/__init__.pyi +28 -28
  46. bpy/ops/font/__init__.pyi +46 -46
  47. bpy/ops/geometry/__init__.pyi +20 -20
  48. bpy/ops/gizmogroup/__init__.pyi +4 -4
  49. bpy/ops/gpencil/__init__.pyi +300 -300
  50. bpy/ops/graph/__init__.pyi +130 -130
  51. bpy/ops/grease_pencil/__init__.pyi +112 -112
  52. bpy/ops/image/__init__.pyi +92 -92
  53. bpy/ops/import_anim/__init__.pyi +2 -2
  54. bpy/ops/import_curve/__init__.pyi +2 -2
  55. bpy/ops/import_mesh/__init__.pyi +2 -2
  56. bpy/ops/import_scene/__init__.pyi +6 -6
  57. bpy/ops/info/__init__.pyi +14 -14
  58. bpy/ops/lattice/__init__.pyi +16 -16
  59. bpy/ops/marker/__init__.pyi +22 -22
  60. bpy/ops/mask/__init__.pyi +78 -78
  61. bpy/ops/material/__init__.pyi +6 -6
  62. bpy/ops/mball/__init__.pyi +16 -16
  63. bpy/ops/mesh/__init__.pyi +326 -326
  64. bpy/ops/nla/__init__.pyi +79 -79
  65. bpy/ops/node/__init__.pyi +202 -202
  66. bpy/ops/object/__init__.pyi +488 -500
  67. bpy/ops/outliner/__init__.pyi +138 -138
  68. bpy/ops/paint/__init__.pyi +104 -104
  69. bpy/ops/paintcurve/__init__.pyi +16 -16
  70. bpy/ops/palette/__init__.pyi +14 -14
  71. bpy/ops/particle/__init__.pyi +72 -72
  72. bpy/ops/pose/__init__.pyi +78 -78
  73. bpy/ops/poselib/__init__.pyi +18 -18
  74. bpy/ops/preferences/__init__.pyi +76 -76
  75. bpy/ops/ptcache/__init__.pyi +14 -14
  76. bpy/ops/render/__init__.pyi +24 -24
  77. bpy/ops/rigidbody/__init__.pyi +26 -26
  78. bpy/ops/scene/__init__.pyi +78 -78
  79. bpy/ops/screen/__init__.pyi +78 -78
  80. bpy/ops/script/__init__.pyi +6 -6
  81. bpy/ops/sculpt/__init__.pyi +62 -62
  82. bpy/ops/sculpt_curves/__init__.pyi +8 -8
  83. bpy/ops/sequencer/__init__.pyi +170 -170
  84. bpy/ops/sound/__init__.pyi +14 -14
  85. bpy/ops/spreadsheet/__init__.pyi +8 -8
  86. bpy/ops/surface/__init__.pyi +12 -12
  87. bpy/ops/text/__init__.pyi +86 -86
  88. bpy/ops/text_editor/__init__.pyi +2 -2
  89. bpy/ops/texture/__init__.pyi +8 -8
  90. bpy/ops/transform/__init__.pyi +54 -54
  91. bpy/ops/ui/__init__.pyi +64 -64
  92. bpy/ops/uilist/__init__.pyi +6 -6
  93. bpy/ops/uv/__init__.pyi +98 -98
  94. bpy/ops/view2d/__init__.pyi +28 -28
  95. bpy/ops/view3d/__init__.pyi +134 -134
  96. bpy/ops/wm/__init__.pyi +224 -224
  97. bpy/ops/workspace/__init__.pyi +14 -14
  98. bpy/ops/world/__init__.pyi +2 -2
  99. bpy/path/__init__.pyi +6 -0
  100. bpy/props/__init__.pyi +141 -29
  101. bpy/types/__init__.pyi +101490 -5018
  102. bpy/utils/__init__.pyi +18 -3
  103. bpy/utils/previews/__init__.pyi +15 -0
  104. bpy/utils/units/__init__.pyi +11 -3
  105. bpy_extras/__init__.pyi +19 -0
  106. bpy_extras/asset_utils/__init__.pyi +5 -0
  107. {fake_bpy_module-20240417.dist-info → fake_bpy_module-20240418.dist-info}/METADATA +1 -1
  108. {fake_bpy_module-20240417.dist-info → fake_bpy_module-20240418.dist-info}/RECORD +137 -133
  109. {fake_bpy_module-20240417.dist-info → fake_bpy_module-20240418.dist-info}/top_level.txt +1 -0
  110. freestyle/__init__.pyi +18 -0
  111. freestyle/chainingiterators/__init__.pyi +20 -5
  112. freestyle/functions/__init__.pyi +151 -155
  113. freestyle/predicates/__init__.pyi +53 -46
  114. freestyle/shaders/__init__.pyi +91 -32
  115. freestyle/types/__init__.pyi +362 -120
  116. freestyle/utils/ContextFunctions/__init__.pyi +32 -7
  117. freestyle/utils/__init__.pyi +13 -1
  118. gpu/__init__.pyi +225 -0
  119. gpu/capabilities/__init__.pyi +37 -15
  120. gpu/matrix/__init__.pyi +7 -1
  121. gpu/platform/__init__.pyi +5 -0
  122. gpu/select/__init__.pyi +5 -0
  123. gpu/shader/__init__.pyi +77 -0
  124. gpu/state/__init__.pyi +15 -4
  125. gpu/texture/__init__.pyi +5 -0
  126. gpu/types/__init__.pyi +91 -33
  127. gpu_extras/__init__.pyi +15 -0
  128. gpu_extras/presets/__init__.pyi +16 -4
  129. imbuf/__init__.pyi +13 -0
  130. imbuf/types/__init__.pyi +20 -5
  131. mathutils/__init__.pyi +349 -227
  132. mathutils/bvhtree/__init__.pyi +21 -8
  133. mathutils/geometry/__init__.pyi +23 -9
  134. mathutils/interpolate/__init__.pyi +5 -0
  135. mathutils/kdtree/__init__.pyi +19 -5
  136. mathutils/noise/__init__.pyi +87 -41
  137. {fake_bpy_module-20240417.dist-info → fake_bpy_module-20240418.dist-info}/WHEEL +0 -0
gpu/state/__init__.pyi CHANGED
@@ -1,3 +1,8 @@
1
+ """
2
+ This module provides access to the gpu state.
3
+
4
+ """
5
+
1
6
  import typing
2
7
 
3
8
  GenericType = typing.TypeVar("GenericType")
@@ -24,10 +29,11 @@ def blend_set(mode: str):
24
29
 
25
30
  ...
26
31
 
27
- def clip_distances_set(distances_enabled):
32
+ def clip_distances_set(distances_enabled: int):
28
33
  """Sets the number of gl_ClipDistance planes used for clip geometry.
29
34
 
30
35
  :param distances_enabled: Number of clip distances enabled.
36
+ :type distances_enabled: int
31
37
  """
32
38
 
33
39
  ...
@@ -114,7 +120,7 @@ def program_point_size_set(enable: bool):
114
120
 
115
121
  ...
116
122
 
117
- def scissor_get():
123
+ def scissor_get() -> typing.Union[int, int]:
118
124
  """Retrieve the scissors of the active framebuffer.
119
125
  Note: Only valid between 'scissor_set' and a framebuffer rebind.
120
126
 
@@ -122,16 +128,19 @@ def scissor_get():
122
128
  (x, y, xsize, ysize).
123
129
  x, y: lower left corner of the scissor rectangle, in pixels.
124
130
  xsize, ysize: width and height of the scissor rectangle.
131
+ :rtype: typing.Union[int, int]
125
132
  """
126
133
 
127
134
  ...
128
135
 
129
- def scissor_set(x, y, xsize, ysize):
136
+ def scissor_set(x: int, y, xsize: int, ysize):
130
137
  """Specifies the scissor area of the active framebuffer.
131
138
  Note: The scissor state is not saved upon framebuffer rebind.
132
139
 
133
140
  :param x: lower left corner of the scissor rectangle, in pixels.
141
+ :type x: int
134
142
  :param xsize: width and height of the scissor rectangle.
143
+ :type xsize: int
135
144
  """
136
145
 
137
146
  ...
@@ -151,12 +160,14 @@ def viewport_get():
151
160
 
152
161
  ...
153
162
 
154
- def viewport_set(x, y, xsize, ysize):
163
+ def viewport_set(x: int, y, xsize: int, ysize):
155
164
  """Specifies the viewport of the active framebuffer.
156
165
  Note: The viewport state is not saved upon framebuffer rebind.
157
166
 
158
167
  :param x: lower left corner of the viewport_set rectangle, in pixels.
168
+ :type x: int
159
169
  :param xsize: width and height of the viewport_set.
170
+ :type xsize: int
160
171
  """
161
172
 
162
173
  ...
gpu/texture/__init__.pyi CHANGED
@@ -1,3 +1,8 @@
1
+ """
2
+ This module provides utils for textures.
3
+
4
+ """
5
+
1
6
  import typing
2
7
  import bpy.types
3
8
  import gpu.types
gpu/types/__init__.pyi CHANGED
@@ -22,7 +22,9 @@ class GPUBatch:
22
22
  """
23
23
  ...
24
24
 
25
- def draw_instanced(self, program: GPUShader, instance_start=0, instance_count=0):
25
+ def draw_instanced(
26
+ self, program: GPUShader, instance_start: int = 0, instance_count: int = 0
27
+ ):
26
28
  """Draw multiple instances of the drawing program with the parameters assigned
27
29
  to the batch. In the vertex shader, gl_InstanceID will contain the instance
28
30
  number being drawn.
@@ -30,13 +32,15 @@ class GPUBatch:
30
32
  :param program: Program that performs the drawing operations.
31
33
  :type program: GPUShader
32
34
  :param instance_start: Number of the first instance to draw.
35
+ :type instance_start: int
33
36
  :param instance_count: Number of instances to draw. When not provided or set to 0
34
37
  the number of instances will be determined by the number of rows in the first
35
38
  vertex buffer.
39
+ :type instance_count: int
36
40
  """
37
41
  ...
38
42
 
39
- def draw_range(self, program: GPUShader, elem_start=0, elem_count=0):
43
+ def draw_range(self, program: GPUShader, elem_start: int = 0, elem_count: int = 0):
40
44
  """Run the drawing program with the parameters assigned to the batch. Only draw
41
45
  the elem_count elements of the index buffer starting at elem_start
42
46
 
@@ -44,9 +48,11 @@ class GPUBatch:
44
48
  :type program: GPUShader
45
49
  :param elem_start: First index to draw. When not provided or set to 0 drawing
46
50
  will start from the first element of the index buffer.
51
+ :type elem_start: int
47
52
  :param elem_count: Number of elements of the index buffer to draw. When not
48
53
  provided or set to 0 all elements from elem_start to the end of the
49
54
  index buffer will be drawn.
55
+ :type elem_count: int
50
56
  """
51
57
  ...
52
58
 
@@ -87,27 +93,40 @@ class GPUFrameBuffer:
87
93
  """Context manager to ensure balanced bind calls, even in the case of an error."""
88
94
  ...
89
95
 
90
- def clear(self, color=None, depth=None, stencil=None):
96
+ def clear(self, color=None, depth: float = None, stencil: int = None):
91
97
  """Fill color, depth and stencil textures with specific value.
92
98
  Common values: color=(0.0, 0.0, 0.0, 1.0), depth=1.0, stencil=0.
93
99
 
94
100
  :param color: float sequence each representing (r, g, b, a).
95
101
  :param depth: depth value.
102
+ :type depth: float
96
103
  :param stencil: stencil value.
104
+ :type stencil: int
97
105
  """
98
106
  ...
99
107
 
100
108
  def read_color(
101
- self, x, y, xsize, ysize, channels, slot, format: str, data: Buffer = None
109
+ self,
110
+ x: int,
111
+ y,
112
+ xsize,
113
+ ysize,
114
+ channels: int,
115
+ slot: int,
116
+ format: str,
117
+ data: Buffer = None,
102
118
  ) -> Buffer:
103
119
  """Read a block of pixels from the frame buffer.
104
120
 
105
121
  :param x: Lower left corner of a rectangular block of pixels.
122
+ :type x: int
106
123
  :param y:
107
124
  :param xsize: Dimensions of the pixel rectangle.
108
125
  :param ysize:
109
126
  :param channels: Number of components to read.
127
+ :type channels: int
110
128
  :param slot: The framebuffer slot to read data from.
129
+ :type slot: int
111
130
  :param format: The format that describes the content of a single channel.
112
131
  Possible values are FLOAT, INT, UINT, UBYTE, UINT_24_8 and 10_11_11_REV.
113
132
  :type format: str
@@ -118,12 +137,14 @@ class GPUFrameBuffer:
118
137
  """
119
138
  ...
120
139
 
121
- def read_depth(self, x, y, xsize, ysize, data: Buffer = None) -> Buffer:
140
+ def read_depth(self, x: int, y, xsize: int, ysize, data: Buffer = None) -> Buffer:
122
141
  """Read a pixel depth block from the frame buffer.
123
142
 
124
143
  :param x: Lower left corner of a rectangular block of pixels.
144
+ :type x: int
125
145
  :param y:
126
146
  :param xsize: Dimensions of the pixel rectangle.
147
+ :type xsize: int
127
148
  :param ysize:
128
149
  :param data: Optional Buffer object to fill with the pixels values.
129
150
  :type data: Buffer
@@ -136,13 +157,15 @@ class GPUFrameBuffer:
136
157
  """Returns position and dimension to current viewport."""
137
158
  ...
138
159
 
139
- def viewport_set(self, x, y, xsize, ysize):
160
+ def viewport_set(self, x: int, y, xsize: int, ysize):
140
161
  """Set the viewport for this framebuffer object.
141
162
  Note: The viewport state is not saved upon framebuffer rebind.
142
163
 
143
164
  :param x: lower left corner of the viewport_set rectangle, in pixels.
165
+ :type x: int
144
166
  :param y:
145
167
  :param xsize: width and height of the viewport_set.
168
+ :type xsize: int
146
169
  :param ysize:
147
170
  """
148
171
  ...
@@ -155,11 +178,17 @@ class GPUIndexBuf:
155
178
  class GPUOffScreen:
156
179
  """This object gives access to off screen buffers."""
157
180
 
158
- color_texture: typing.Any
159
- """ OpenGL bindcode for the color texture."""
181
+ color_texture: int
182
+ """ OpenGL bindcode for the color texture.
183
+
184
+ :type: int
185
+ """
186
+
187
+ height: int
188
+ """ Height of the texture.
160
189
 
161
- height: typing.Any
162
- """ Height of the texture."""
190
+ :type: int
191
+ """
163
192
 
164
193
  texture_color: GPUTexture
165
194
  """ The color texture attached.
@@ -167,8 +196,11 @@ class GPUOffScreen:
167
196
  :type: GPUTexture
168
197
  """
169
198
 
170
- width: typing.Any
171
- """ Width of the texture."""
199
+ width: int
200
+ """ Width of the texture.
201
+
202
+ :type: int
203
+ """
172
204
 
173
205
  def bind(self):
174
206
  """Context manager to ensure balanced bind calls, even in the case of an error."""
@@ -238,19 +270,23 @@ class GPUShader:
238
270
  :type: str
239
271
  """
240
272
 
241
- program: typing.Any
242
- """ The name of the program object for use by the OpenGL API (read-only)."""
273
+ program: int
274
+ """ The name of the program object for use by the OpenGL API (read-only).
275
+
276
+ :type: int
277
+ """
243
278
 
244
- def attr_from_name(self, name: str) -> str:
279
+ def attr_from_name(self, name: str) -> int:
245
280
  """Get attribute location by name.
246
281
 
247
282
  :param name: The name of the attribute variable whose location is to be queried.
248
283
  :type name: str
249
284
  :return: The location of an attribute variable.
285
+ :rtype: int
250
286
  """
251
287
  ...
252
288
 
253
- def attrs_info_get(self):
289
+ def attrs_info_get(self) -> typing.Tuple:
254
290
  """Information about the attributes used in the Shader.
255
291
 
256
292
  :return: tuples containing information about the attributes in order (name, type)
@@ -262,7 +298,7 @@ class GPUShader:
262
298
  """Bind the shader object. Required to be able to change uniforms of this shader."""
263
299
  ...
264
300
 
265
- def format_calc(self) -> typing.Tuple:
301
+ def format_calc(self) -> GPUVertFormat:
266
302
  """Build a new format based on the attributes of the shader.
267
303
 
268
304
  :return: vertex attribute format for the shader
@@ -289,12 +325,13 @@ class GPUShader:
289
325
  """
290
326
  ...
291
327
 
292
- def uniform_block_from_name(self, name: str) -> str:
328
+ def uniform_block_from_name(self, name: str) -> int:
293
329
  """Get uniform block location by name.
294
330
 
295
331
  :param name: Name of the uniform block variable whose location is to be queried.
296
332
  :type name: str
297
333
  :return: The location of the uniform block variable.
334
+ :rtype: int
298
335
  """
299
336
  ...
300
337
 
@@ -317,12 +354,13 @@ class GPUShader:
317
354
  """
318
355
  ...
319
356
 
320
- def uniform_from_name(self, name: str) -> str:
357
+ def uniform_from_name(self, name: str) -> int:
321
358
  """Get uniform location by name.
322
359
 
323
360
  :param name: Name of the uniform variable whose location is to be queried.
324
361
  :type name: str
325
362
  :return: Location of the uniform variable.
363
+ :rtype: int
326
364
  """
327
365
  ...
328
366
 
@@ -345,10 +383,13 @@ class GPUShader:
345
383
  """
346
384
  ...
347
385
 
348
- def uniform_vector_float(self, location, buffer: typing.List[float], length, count):
386
+ def uniform_vector_float(
387
+ self, location: int, buffer: typing.List[float], length: int, count: int
388
+ ):
349
389
  """Set the buffer to fill the uniform.
350
390
 
351
391
  :param location: Location of the uniform variable to be modified.
392
+ :type location: int
352
393
  :param buffer: The data that should be set. Can support the buffer protocol.
353
394
  :type buffer: typing.List[float]
354
395
  :param length: Size of the uniform data type:
@@ -364,7 +405,9 @@ class GPUShader:
364
405
  9: mat3
365
406
 
366
407
  16: mat4
408
+ :type length: int
367
409
  :param count: Specifies the number of elements, vector or matrices that are to be modified.
410
+ :type count: int
368
411
  """
369
412
  ...
370
413
 
@@ -397,10 +440,11 @@ class GPUShaderCreateInfo:
397
440
  """
398
441
  ...
399
442
 
400
- def fragment_out(self, slot, type: str, name: str, blend: str = "NONE"):
443
+ def fragment_out(self, slot: int, type: str, name: str, blend: str = "NONE"):
401
444
  """Specify a fragment output corresponding to a framebuffer target slot.
402
445
 
403
446
  :param slot: The attribute index.
447
+ :type slot: int
404
448
  :param type: One of these types:
405
449
 
406
450
  FLOAT
@@ -450,7 +494,7 @@ class GPUShaderCreateInfo:
450
494
 
451
495
  def image(
452
496
  self,
453
- slot,
497
+ slot: int,
454
498
  format: str,
455
499
  type: str,
456
500
  name: str,
@@ -459,6 +503,7 @@ class GPUShaderCreateInfo:
459
503
  """Specify an image resource used for arbitrary load and store operations.
460
504
 
461
505
  :param slot: The image resource index.
506
+ :type slot: int
462
507
  :param format: The GPUTexture format that is passed to the shader. Possible values are:
463
508
 
464
509
  RGBA8UI
@@ -625,12 +670,15 @@ class GPUShaderCreateInfo:
625
670
  """
626
671
  ...
627
672
 
628
- def local_group_size(self, x, y=-1, z=-1):
673
+ def local_group_size(self, x: int, y: int = -1, z: int = -1):
629
674
  """Specify the local group size for compute shaders.
630
675
 
631
676
  :param x: The local group size in the x dimension.
677
+ :type x: int
632
678
  :param y: The local group size in the y dimension. Optional. Defaults to -1.
679
+ :type y: int
633
680
  :param z: The local group size in the z dimension. Optional. Defaults to -1.
681
+ :type z: int
634
682
  """
635
683
  ...
636
684
 
@@ -675,10 +723,11 @@ class GPUShaderCreateInfo:
675
723
  """
676
724
  ...
677
725
 
678
- def sampler(self, slot, type: str, name: str):
726
+ def sampler(self, slot: int, type: str, name: str):
679
727
  """Specify an image texture sampler.
680
728
 
681
729
  :param slot: The image texture sampler index.
730
+ :type slot: int
682
731
  :param type: The data type describing the format of each sampler unit. Possible values are:
683
732
 
684
733
  FLOAT_BUFFER
@@ -757,10 +806,11 @@ class GPUShaderCreateInfo:
757
806
  """
758
807
  ...
759
808
 
760
- def uniform_buf(self, slot, type_name: str, name: str):
809
+ def uniform_buf(self, slot: int, type_name: str, name: str):
761
810
  """Specify a uniform variable whose type can be one of those declared in typedef_source.
762
811
 
763
812
  :param slot: The uniform variable index.
813
+ :type slot: int
764
814
  :param type_name: Name of the data type. It can be a struct type defined in the source passed through the `gpu.types.GPUShaderCreateInfo.typedef_source`.
765
815
  :type type_name: str
766
816
  :param name: The uniform variable name.
@@ -768,10 +818,11 @@ class GPUShaderCreateInfo:
768
818
  """
769
819
  ...
770
820
 
771
- def vertex_in(self, slot, type: str, name: str):
821
+ def vertex_in(self, slot: int, type: str, name: str):
772
822
  """Add a vertex shader input attribute.
773
823
 
774
824
  :param slot: The attribute index.
825
+ :type slot: int
775
826
  :param type: One of these types:
776
827
 
777
828
  FLOAT
@@ -963,11 +1014,17 @@ class GPUTexture:
963
1014
  :type: str
964
1015
  """
965
1016
 
966
- height: typing.Any
967
- """ Height of the texture."""
1017
+ height: int
1018
+ """ Height of the texture.
968
1019
 
969
- width: typing.Any
970
- """ Width of the texture."""
1020
+ :type: int
1021
+ """
1022
+
1023
+ width: int
1024
+ """ Width of the texture.
1025
+
1026
+ :type: int
1027
+ """
971
1028
 
972
1029
  def clear(self, format: str = "FLOAT", value=(0.0, 0.0, 0.0, 1.0)):
973
1030
  """Fill texture with specific value.
@@ -996,11 +1053,11 @@ class GPUUniformBuf:
996
1053
  class GPUVertBuf:
997
1054
  """Contains a VBO."""
998
1055
 
999
- def attr_fill(self, id: str, data: typing.List[float]):
1056
+ def attr_fill(self, id: typing.Union[int, str], data: typing.List[float]):
1000
1057
  """Insert data into the buffer for a single attribute.
1001
1058
 
1002
1059
  :param id: Either the name or the id of the attribute.
1003
- :type id: str
1060
+ :type id: typing.Union[int, str]
1004
1061
  :param data: Sequence of data that should be stored in the buffer
1005
1062
  :type data: typing.List[float]
1006
1063
  """
@@ -1009,7 +1066,7 @@ class GPUVertBuf:
1009
1066
  class GPUVertFormat:
1010
1067
  """This object contains information about the structure of a vertex buffer."""
1011
1068
 
1012
- def attr_add(self, id: str, comp_type: str, len, fetch_mode: str):
1069
+ def attr_add(self, id: str, comp_type: str, len: int, fetch_mode: str):
1013
1070
  """Add a new attribute to the format.
1014
1071
 
1015
1072
  :param id: Name the attribute. Often position, normal, ...
@@ -1019,6 +1076,7 @@ class GPUVertFormat:
1019
1076
  :type comp_type: str
1020
1077
  :param len: How many individual values the attribute consists of
1021
1078
  (e.g. 2 for uv coordinates).
1079
+ :type len: int
1022
1080
  :param fetch_mode: How values from memory will be converted when used in the shader.
1023
1081
  This is mainly useful for memory optimizations when you want to store values with
1024
1082
  reduced precision. E.g. you can store a float in only 1 byte but it will be
gpu_extras/__init__.pyi CHANGED
@@ -1,3 +1,18 @@
1
+ """
2
+ gpu_extras.batch.rst
3
+ gpu_extras.presets.rst
4
+
5
+ :maxdepth: 1
6
+ :caption: Submodules
7
+
8
+ gpu_extras.batch.rst
9
+ gpu_extras.presets.rst
10
+
11
+ :maxdepth: 1
12
+ :caption: Submodules
13
+
14
+ """
15
+
1
16
  import typing
2
17
  from . import batch
3
18
  from . import presets
@@ -4,13 +4,14 @@ import mathutils
4
4
 
5
5
  GenericType = typing.TypeVar("GenericType")
6
6
 
7
- def draw_circle_2d(position: mathutils.Vector, color, radius, segments=None):
7
+ def draw_circle_2d(position: mathutils.Vector, color, radius: float, segments=None):
8
8
  """Draw a circle.
9
9
 
10
10
  :param position: Position where the circle will be drawn.
11
11
  :type position: mathutils.Vector
12
12
  :param color: Color of the circle. To use transparency GL_BLEND has to be enabled.
13
13
  :param radius: Radius of the circle.
14
+ :type radius: float
14
15
  :param segments: How many segments will be used to draw the circle.
15
16
  Higher values give better results but the drawing will take longer.
16
17
  If None or not specified, an automatic value will be calculated.
@@ -18,13 +19,14 @@ def draw_circle_2d(position: mathutils.Vector, color, radius, segments=None):
18
19
 
19
20
  ...
20
21
 
21
- def draw_circle_2d(position: mathutils.Vector, color, radius, segments=None):
22
+ def draw_circle_2d(position: mathutils.Vector, color, radius: float, segments=None):
22
23
  """Draw a circle.
23
24
 
24
25
  :param position: Position where the circle will be drawn.
25
26
  :type position: mathutils.Vector
26
27
  :param color: Color of the circle. To use transparency GL_BLEND has to be enabled.
27
28
  :param radius: Radius of the circle.
29
+ :type radius: float
28
30
  :param segments: How many segments will be used to draw the circle.
29
31
  Higher values give better results but the drawing will take longer.
30
32
  If None or not specified, an automatic value will be calculated.
@@ -38,7 +40,10 @@ def draw_circle_2d(position, color, radius, segments):
38
40
  ...
39
41
 
40
42
  def draw_texture_2d(
41
- texture: gpu.types.GPUTexture, position: mathutils.Vector, width, height
43
+ texture: gpu.types.GPUTexture,
44
+ position: mathutils.Vector,
45
+ width: float,
46
+ height: float,
42
47
  ):
43
48
  """Draw a 2d texture.
44
49
 
@@ -48,13 +53,18 @@ def draw_texture_2d(
48
53
  :type position: mathutils.Vector
49
54
  :param width: Width of the image when drawn (not necessarily
50
55
  the original width of the texture).
56
+ :type width: float
51
57
  :param height: Height of the image when drawn.
58
+ :type height: float
52
59
  """
53
60
 
54
61
  ...
55
62
 
56
63
  def draw_texture_2d(
57
- texture: gpu.types.GPUTexture, position: mathutils.Vector, width, height
64
+ texture: gpu.types.GPUTexture,
65
+ position: mathutils.Vector,
66
+ width: float,
67
+ height: float,
58
68
  ):
59
69
  """Draw a 2d texture.
60
70
 
@@ -64,7 +74,9 @@ def draw_texture_2d(
64
74
  :type position: mathutils.Vector
65
75
  :param width: Width of the image when drawn (not necessarily
66
76
  the original width of the texture).
77
+ :type width: float
67
78
  :param height: Height of the image when drawn.
79
+ :type height: float
68
80
  """
69
81
 
70
82
  ...
imbuf/__init__.pyi CHANGED
@@ -1,3 +1,16 @@
1
+ """
2
+ This module provides access to Blender's image manipulation API.
3
+
4
+ It provides access to image buffers outside of Blender's
5
+ bpy.types.Image data-block context.
6
+
7
+ imbuf.types.rst
8
+
9
+ :maxdepth: 1
10
+ :caption: Submodules
11
+
12
+ """
13
+
1
14
  import typing
2
15
  import imbuf.types
3
16
 
imbuf/types/__init__.pyi CHANGED
@@ -1,3 +1,12 @@
1
+ """
2
+ This module provides access to image buffer types.
3
+
4
+ [NOTE]
5
+ Image buffer is also the structure used by bpy.types.Image
6
+ ID type to store and manipulate image data at runtime.
7
+
8
+ """
9
+
1
10
  import typing
2
11
 
3
12
  GenericType = typing.TypeVar("GenericType")
@@ -5,8 +14,11 @@ GenericType = typing.TypeVar("GenericType")
5
14
  class ImBuf:
6
15
  """ """
7
16
 
8
- channels: typing.Any
9
- """ Number of bit-planes."""
17
+ channels: int
18
+ """ Number of bit-planes.
19
+
20
+ :type: int
21
+ """
10
22
 
11
23
  filepath: str
12
24
  """ filepath associated with this image.
@@ -14,8 +26,11 @@ class ImBuf:
14
26
  :type: str
15
27
  """
16
28
 
17
- planes: typing.Any
18
- """ Number of bits associated with this image."""
29
+ planes: int
30
+ """ Number of bits associated with this image.
31
+
32
+ :type: int
33
+ """
19
34
 
20
35
  ppm: typing.Any
21
36
  """ pixels per meter."""
@@ -23,7 +38,7 @@ class ImBuf:
23
38
  size: typing.Any
24
39
  """ size of the image in pixels."""
25
40
 
26
- def copy(self):
41
+ def copy(self) -> ImBuf:
27
42
  """
28
43
 
29
44
  :return: A copy of the image.