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