fake-bpy-module-latest 20260113__py3-none-any.whl → 20260114__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.
- _bl_console_utils/autocomplete/complete_calltip/__init__.pyi +0 -13
- _bl_console_utils/autocomplete/complete_import/__init__.pyi +0 -5
- _bl_console_utils/autocomplete/complete_namespace/__init__.pyi +0 -11
- _bl_console_utils/autocomplete/intellisense/__init__.pyi +0 -10
- _bpy_types/__init__.pyi +1 -122
- _rna_info/__init__.pyi +0 -1
- addon_utils/__init__.pyi +0 -13
- aud/__init__.pyi +0 -146
- bl_math/__init__.pyi +0 -12
- bl_operators/add_mesh_torus/__init__.pyi +0 -2
- bl_operators/anim/__init__.pyi +0 -26
- bl_operators/assets/__init__.pyi +0 -6
- bl_operators/bone_selection_sets/__init__.pyi +0 -28
- bl_operators/clip/__init__.pyi +0 -20
- bl_operators/connect_to_output/__init__.pyi +0 -2
- bl_operators/console/__init__.pyi +0 -10
- bl_operators/constraint/__init__.pyi +0 -8
- bl_operators/copy_global_transform/__init__.pyi +0 -10
- bl_operators/file/__init__.pyi +0 -6
- bl_operators/freestyle/__init__.pyi +0 -8
- bl_operators/geometry_nodes/__init__.pyi +0 -8
- bl_operators/grease_pencil/__init__.pyi +0 -2
- bl_operators/image/__init__.pyi +0 -10
- bl_operators/image_as_planes/__init__.pyi +0 -4
- bl_operators/mesh/__init__.pyi +0 -4
- bl_operators/node/__init__.pyi +0 -44
- bl_operators/object/__init__.pyi +0 -30
- bl_operators/object_align/__init__.pyi +0 -2
- bl_operators/object_quick_effects/__init__.pyi +0 -8
- bl_operators/object_randomize_transform/__init__.pyi +0 -2
- bl_operators/presets/__init__.pyi +0 -50
- bl_operators/rigidbody/__init__.pyi +0 -6
- bl_operators/screen_play_rendered_anim/__init__.pyi +0 -2
- bl_operators/sequencer/__init__.pyi +0 -16
- bl_operators/spreadsheet/__init__.pyi +0 -2
- bl_operators/userpref/__init__.pyi +0 -50
- bl_operators/uvcalc_follow_active/__init__.pyi +0 -2
- bl_operators/uvcalc_lightmap/__init__.pyi +0 -2
- bl_operators/uvcalc_transform/__init__.pyi +0 -4
- bl_operators/vertexpaint_dirt/__init__.pyi +0 -2
- bl_operators/view3d/__init__.pyi +0 -16
- bl_operators/wm/__init__.pyi +0 -92
- bl_operators/world/__init__.pyi +0 -2
- bl_ui/__init__.pyi +0 -4
- bl_ui/anim/__init__.pyi +0 -2
- bl_ui/asset_shelf/__init__.pyi +0 -2
- bl_ui/generic_ui_list/__init__.pyi +1 -17
- bl_ui/node_add_menu/__init__.pyi +0 -10
- bl_ui/node_add_menu_compositor/__init__.pyi +0 -38
- bl_ui/node_add_menu_geometry/__init__.pyi +0 -112
- bl_ui/node_add_menu_shader/__init__.pyi +0 -20
- bl_ui/node_add_menu_texture/__init__.pyi +0 -16
- bl_ui/properties_collection/__init__.pyi +0 -14
- bl_ui/properties_constraint/__init__.pyi +0 -154
- bl_ui/properties_data_armature/__init__.pyi +0 -36
- bl_ui/properties_data_bone/__init__.pyi +0 -20
- bl_ui/properties_data_camera/__init__.pyi +0 -30
- bl_ui/properties_data_curve/__init__.pyi +0 -30
- bl_ui/properties_data_curves/__init__.pyi +0 -16
- bl_ui/properties_data_empty/__init__.pyi +0 -4
- bl_ui/properties_data_grease_pencil/__init__.pyi +0 -40
- bl_ui/properties_data_lattice/__init__.pyi +0 -8
- bl_ui/properties_data_light/__init__.pyi +0 -20
- bl_ui/properties_data_lightprobe/__init__.pyi +0 -28
- bl_ui/properties_data_mesh/__init__.pyi +0 -42
- bl_ui/properties_data_metaball/__init__.pyi +0 -12
- bl_ui/properties_data_modifier/__init__.pyi +0 -18
- bl_ui/properties_data_pointcloud/__init__.pyi +0 -12
- bl_ui/properties_data_shaderfx/__init__.pyi +0 -2
- bl_ui/properties_data_speaker/__init__.pyi +0 -12
- bl_ui/properties_data_volume/__init__.pyi +0 -18
- bl_ui/properties_freestyle/__init__.pyi +0 -50
- bl_ui/properties_grease_pencil_common/__init__.pyi +0 -14
- bl_ui/properties_mask_common/__init__.pyi +0 -14
- bl_ui/properties_material/__init__.pyi +0 -32
- bl_ui/properties_material_gpencil/__init__.pyi +0 -22
- bl_ui/properties_object/__init__.pyi +0 -44
- bl_ui/properties_output/__init__.pyi +0 -40
- bl_ui/properties_paint_common/__init__.pyi +0 -4
- bl_ui/properties_particle/__init__.pyi +0 -106
- bl_ui/properties_physics_cloth/__init__.pyi +0 -28
- bl_ui/properties_physics_common/__init__.pyi +0 -2
- bl_ui/properties_physics_dynamicpaint/__init__.pyi +0 -44
- bl_ui/properties_physics_field/__init__.pyi +0 -20
- bl_ui/properties_physics_fluid/__init__.pyi +0 -56
- bl_ui/properties_physics_geometry_nodes/__init__.pyi +0 -2
- bl_ui/properties_physics_rigidbody/__init__.pyi +0 -16
- bl_ui/properties_physics_rigidbody_constraint/__init__.pyi +0 -26
- bl_ui/properties_physics_softbody/__init__.pyi +0 -30
- bl_ui/properties_render/__init__.pyi +0 -90
- bl_ui/properties_scene/__init__.pyi +0 -34
- bl_ui/properties_strip/__init__.pyi +0 -42
- bl_ui/properties_strip_modifier/__init__.pyi +0 -2
- bl_ui/properties_texture/__init__.pyi +0 -54
- bl_ui/properties_view_layer/__init__.pyi +0 -28
- bl_ui/properties_workspace/__init__.pyi +0 -8
- bl_ui/properties_world/__init__.pyi +0 -22
- bl_ui/space_clip/__init__.pyi +0 -150
- bl_ui/space_console/__init__.pyi +0 -12
- bl_ui/space_dopesheet/__init__.pyi +0 -64
- bl_ui/space_filebrowser/__init__.pyi +0 -60
- bl_ui/space_graph/__init__.pyi +0 -44
- bl_ui/space_image/__init__.pyi +0 -142
- bl_ui/space_info/__init__.pyi +0 -12
- bl_ui/space_nla/__init__.pyi +0 -36
- bl_ui/space_node/__init__.pyi +0 -66
- bl_ui/space_outliner/__init__.pyi +0 -30
- bl_ui/space_properties/__init__.pyi +0 -8
- bl_ui/space_sequencer/__init__.pyi +0 -136
- bl_ui/space_spreadsheet/__init__.pyi +0 -6
- bl_ui/space_statusbar/__init__.pyi +0 -2
- bl_ui/space_text/__init__.pyi +0 -32
- bl_ui/space_time/__init__.pyi +0 -12
- bl_ui/space_topbar/__init__.pyi +0 -52
- bl_ui/space_userpref/__init__.pyi +0 -186
- bl_ui/space_view3d/__init__.pyi +0 -536
- bl_ui/space_view3d_sidebar/__init__.pyi +0 -8
- bl_ui/space_view3d_toolbar/__init__.pyi +0 -162
- blf/__init__.pyi +0 -47
- bmesh/__init__.pyi +0 -7
- bmesh/geometry/__init__.pyi +0 -3
- bmesh/ops/__init__.pyi +0 -451
- bmesh/types/__init__.pyi +65 -427
- bmesh/utils/__init__.pyi +0 -44
- bpy/app/__init__.pyi +0 -5
- bpy/app/icons/__init__.pyi +0 -6
- bpy/app/timers/__init__.pyi +0 -6
- bpy/app/translations/__init__.pyi +0 -15
- bpy/msgbus/__init__.pyi +1 -4
- bpy/ops/action/__init__.pyi +15 -165
- bpy/ops/anim/__init__.pyi +27 -274
- bpy/ops/armature/__init__.pyi +17 -191
- bpy/ops/asset/__init__.pyi +11 -97
- bpy/ops/boid/__init__.pyi +7 -38
- bpy/ops/brush/__init__.pyi +3 -72
- bpy/ops/buttons/__init__.pyi +4 -71
- bpy/ops/cachefile/__init__.pyi +2 -63
- bpy/ops/camera/__init__.pyi +0 -11
- bpy/ops/clip/__init__.pyi +43 -427
- bpy/ops/cloth/__init__.pyi +0 -5
- bpy/ops/collection/__init__.pyi +2 -34
- bpy/ops/console/__init__.pyi +10 -88
- bpy/ops/constraint/__init__.pyi +3 -80
- bpy/ops/curve/__init__.pyi +23 -254
- bpy/ops/curves/__init__.pyi +15 -164
- bpy/ops/cycles/__init__.pyi +1 -14
- bpy/ops/dpaint/__init__.pyi +3 -21
- bpy/ops/ed/__init__.pyi +10 -82
- bpy/ops/export_anim/__init__.pyi +0 -11
- bpy/ops/export_scene/__init__.pyi +0 -154
- bpy/ops/extensions/__init__.pyi +15 -150
- bpy/ops/file/__init__.pyi +27 -217
- bpy/ops/fluid/__init__.pyi +13 -70
- bpy/ops/font/__init__.pyi +10 -134
- bpy/ops/geometry/__init__.pyi +3 -41
- bpy/ops/gizmogroup/__init__.pyi +1 -12
- bpy/ops/gpencil/__init__.pyi +5 -38
- bpy/ops/graph/__init__.pyi +18 -316
- bpy/ops/grease_pencil/__init__.pyi +27 -522
- bpy/ops/image/__init__.pyi +19 -379
- bpy/ops/import_anim/__init__.pyi +0 -14
- bpy/ops/import_curve/__init__.pyi +0 -6
- bpy/ops/import_scene/__init__.pyi +0 -50
- bpy/ops/info/__init__.pyi +4 -35
- bpy/ops/lattice/__init__.pyi +3 -33
- bpy/ops/marker/__init__.pyi +2 -50
- bpy/ops/mask/__init__.pyi +17 -176
- bpy/ops/material/__init__.pyi +3 -15
- bpy/ops/mball/__init__.pyi +1 -30
- bpy/ops/mesh/__init__.pyi +30 -913
- bpy/ops/nla/__init__.pyi +19 -183
- bpy/ops/node/__init__.pyi +53 -745
- bpy/ops/object/__init__.pyi +75 -1285
- bpy/ops/outliner/__init__.pyi +47 -327
- bpy/ops/paint/__init__.pyi +14 -279
- bpy/ops/paintcurve/__init__.pyi +4 -36
- bpy/ops/palette/__init__.pyi +3 -27
- bpy/ops/particle/__init__.pyi +20 -160
- bpy/ops/pointcloud/__init__.pyi +3 -35
- bpy/ops/pose/__init__.pyi +25 -230
- bpy/ops/poselib/__init__.pyi +4 -47
- bpy/ops/preferences/__init__.pyi +9 -177
- bpy/ops/ptcache/__init__.pyi +5 -31
- bpy/ops/render/__init__.pyi +3 -70
- bpy/ops/rigidbody/__init__.pyi +6 -56
- bpy/ops/scene/__init__.pyi +22 -167
- bpy/ops/screen/__init__.pyi +19 -214
- bpy/ops/script/__init__.pyi +1 -12
- bpy/ops/sculpt/__init__.pyi +7 -271
- bpy/ops/sculpt_curves/__init__.pyi +1 -20
- bpy/ops/sequencer/__init__.pyi +36 -672
- bpy/ops/sound/__init__.pyi +3 -109
- bpy/ops/spreadsheet/__init__.pyi +5 -32
- bpy/ops/surface/__init__.pyi +0 -48
- bpy/ops/text/__init__.pyi +25 -226
- bpy/ops/text_editor/__init__.pyi +0 -5
- bpy/ops/texture/__init__.pyi +3 -18
- bpy/ops/transform/__init__.pyi +2 -381
- bpy/ops/ui/__init__.pyi +21 -158
- bpy/ops/uilist/__init__.pyi +0 -13
- bpy/ops/uv/__init__.pyi +9 -316
- bpy/ops/view2d/__init__.pyi +3 -73
- bpy/ops/view3d/__init__.pyi +37 -339
- bpy/ops/wm/__init__.pyi +25 -1308
- bpy/ops/workspace/__init__.pyi +7 -39
- bpy/ops/world/__init__.pyi +2 -10
- bpy/path/__init__.pyi +0 -34
- bpy/props/__init__.pyi +12 -148
- bpy/types/__init__.pyi +9867 -55713
- bpy/utils/__init__.pyi +2 -73
- bpy/utils/previews/__init__.pyi +0 -9
- bpy/utils/units/__init__.pyi +0 -12
- bpy_extras/anim_utils/__init__.pyi +0 -8
- bpy_extras/bmesh_utils/__init__.pyi +0 -1
- bpy_extras/id_map_utils/__init__.pyi +4 -5
- bpy_extras/image_utils/__init__.pyi +0 -9
- bpy_extras/io_utils/__init__.pyi +2 -22
- bpy_extras/mesh_utils/__init__.pyi +0 -12
- bpy_extras/object_utils/__init__.pyi +0 -14
- bpy_extras/view3d_utils/__init__.pyi +0 -18
- {fake_bpy_module_latest-20260113.dist-info → fake_bpy_module_latest-20260114.dist-info}/METADATA +2 -1
- fake_bpy_module_latest-20260114.dist-info/RECORD +382 -0
- freestyle/chainingiterators/__init__.pyi +0 -22
- freestyle/functions/__init__.pyi +0 -139
- freestyle/predicates/__init__.pyi +0 -51
- freestyle/shaders/__init__.pyi +0 -65
- freestyle/types/__init__.pyi +139 -777
- freestyle/utils/ContextFunctions/__init__.pyi +0 -23
- freestyle/utils/__init__.pyi +0 -6
- gpu/capabilities/__init__.pyi +0 -21
- gpu/matrix/__init__.pyi +0 -9
- gpu/platform/__init__.pyi +0 -5
- gpu/shader/__init__.pyi +0 -5
- gpu/state/__init__.pyi +0 -29
- gpu/texture/__init__.pyi +0 -2
- gpu/types/__init__.pyi +10 -149
- gpu_extras/batch/__init__.pyi +0 -4
- gpu_extras/presets/__init__.pyi +0 -9
- idprop/types/__init__.pyi +0 -4
- imbuf/__init__.pyi +0 -7
- imbuf/types/__init__.pyi +5 -25
- keyingsets_builtins/__init__.pyi +0 -44
- mathutils/__init__.pyi +46 -2160
- mathutils/bvhtree/__init__.pyi +1 -24
- mathutils/geometry/__init__.pyi +0 -129
- mathutils/interpolate/__init__.pyi +0 -3
- mathutils/kdtree/__init__.pyi +0 -11
- mathutils/noise/__init__.pyi +0 -62
- fake_bpy_module_latest-20260113.dist-info/RECORD +0 -382
- {fake_bpy_module_latest-20260113.dist-info → fake_bpy_module_latest-20260114.dist-info}/WHEEL +0 -0
- {fake_bpy_module_latest-20260113.dist-info → fake_bpy_module_latest-20260114.dist-info}/top_level.txt +0 -0
gpu/types/__init__.pyi
CHANGED
|
@@ -19,7 +19,6 @@ class GPUBatch:
|
|
|
19
19
|
|
|
20
20
|
:param shader: Shader that performs the drawing operations.
|
|
21
21
|
If None is passed, the last shader set to this batch will run.
|
|
22
|
-
:type shader: GPUShader | None
|
|
23
22
|
"""
|
|
24
23
|
|
|
25
24
|
def draw_instanced(
|
|
@@ -30,13 +29,10 @@ class GPUBatch:
|
|
|
30
29
|
number being drawn.
|
|
31
30
|
|
|
32
31
|
:param program: Program that performs the drawing operations.
|
|
33
|
-
: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
|
def draw_range(
|
|
@@ -45,14 +41,11 @@ class GPUBatch:
|
|
|
45
41
|
"""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
42
|
|
|
47
43
|
:param program: Program that performs the drawing operations.
|
|
48
|
-
:type program: GPUShader
|
|
49
44
|
:param elem_start: First index to draw. When not provided or set to 0 drawing
|
|
50
45
|
will start from the first element of the index buffer.
|
|
51
|
-
:type elem_start: int
|
|
52
46
|
:param elem_count: Number of elements of the index buffer to draw. When not
|
|
53
47
|
provided or set to 0 all elements from elem_start to the end of the
|
|
54
48
|
index buffer will be drawn.
|
|
55
|
-
:type elem_count: int
|
|
56
49
|
"""
|
|
57
50
|
|
|
58
51
|
def program_set(self, program: GPUShader) -> None:
|
|
@@ -62,7 +55,6 @@ class GPUBatch:
|
|
|
62
55
|
set the shader when calling `gpu.types.GPUBatch.draw`.
|
|
63
56
|
|
|
64
57
|
:param program: The program/shader the batch will use in future draw calls.
|
|
65
|
-
:type program: GPUShader
|
|
66
58
|
"""
|
|
67
59
|
|
|
68
60
|
def vertbuf_add(self, buf: GPUVertBuf) -> None:
|
|
@@ -74,7 +66,6 @@ class GPUBatch:
|
|
|
74
66
|
Current a batch can have at most GPU_BATCH_VBO_MAX_LEN vertex buffers.
|
|
75
67
|
|
|
76
68
|
:param buf: The vertex buffer that will be added to the batch.
|
|
77
|
-
:type buf: GPUVertBuf
|
|
78
69
|
"""
|
|
79
70
|
|
|
80
71
|
class GPUFrameBuffer:
|
|
@@ -100,11 +91,8 @@ class GPUFrameBuffer:
|
|
|
100
91
|
Common values: color=(0.0, 0.0, 0.0, 1.0), depth=1.0, stencil=0.
|
|
101
92
|
|
|
102
93
|
:param color: Sequence of 3 or 4 floats representing (r, g, b, a).
|
|
103
|
-
:type color: collections.abc.Sequence[float] | None
|
|
104
94
|
:param depth: depth value.
|
|
105
|
-
:type depth: float | None
|
|
106
95
|
:param stencil: stencil value.
|
|
107
|
-
:type stencil: int | None
|
|
108
96
|
"""
|
|
109
97
|
|
|
110
98
|
def read_color(
|
|
@@ -122,22 +110,16 @@ class GPUFrameBuffer:
|
|
|
122
110
|
"""Read a block of pixels from the frame buffer.
|
|
123
111
|
|
|
124
112
|
:param x: Lower left corner of a rectangular block of pixels.
|
|
125
|
-
:type x: int
|
|
126
113
|
:param y:
|
|
127
114
|
:param xsize: Dimensions of the pixel rectangle.
|
|
128
115
|
:param ysize:
|
|
129
116
|
:param channels: Number of components to read.
|
|
130
|
-
:type channels: int
|
|
131
117
|
:param slot: The framebuffer slot to read data from.
|
|
132
|
-
:type slot: int
|
|
133
118
|
:param format: The format that describes the content of a single channel.
|
|
134
119
|
Possible values are FLOAT, INT, UINT, UBYTE, UINT_24_8 & 10_11_11_REV.
|
|
135
120
|
UINT_24_8 is deprecated, use FLOAT instead.
|
|
136
|
-
:type format: str
|
|
137
121
|
:param data: Optional Buffer object to fill with the pixels values.
|
|
138
|
-
:type data: Buffer | None
|
|
139
122
|
:return: The Buffer with the read pixels.
|
|
140
|
-
:rtype: Buffer
|
|
141
123
|
"""
|
|
142
124
|
|
|
143
125
|
def read_depth(
|
|
@@ -146,15 +128,11 @@ class GPUFrameBuffer:
|
|
|
146
128
|
"""Read a pixel depth block from the frame buffer.
|
|
147
129
|
|
|
148
130
|
:param x: Lower left corner of a rectangular block of pixels.
|
|
149
|
-
:type x: int
|
|
150
131
|
:param y:
|
|
151
132
|
:param xsize: Dimensions of the pixel rectangle.
|
|
152
|
-
:type xsize: int
|
|
153
133
|
:param ysize:
|
|
154
134
|
:param data: Optional Buffer object to fill with the pixels values.
|
|
155
|
-
:type data: Buffer | None
|
|
156
135
|
:return: The Buffer with the read pixels.
|
|
157
|
-
:rtype: Buffer
|
|
158
136
|
"""
|
|
159
137
|
|
|
160
138
|
def viewport_get(self) -> None:
|
|
@@ -165,10 +143,8 @@ class GPUFrameBuffer:
|
|
|
165
143
|
Note: The viewport state is not saved upon framebuffer rebind.
|
|
166
144
|
|
|
167
145
|
:param x: lower left corner of the viewport_set rectangle, in pixels.
|
|
168
|
-
:type x: int
|
|
169
146
|
:param y:
|
|
170
147
|
:param xsize: width and height of the viewport_set.
|
|
171
|
-
:type xsize: int
|
|
172
148
|
:param ysize:
|
|
173
149
|
"""
|
|
174
150
|
|
|
@@ -179,22 +155,13 @@ class GPUOffScreen:
|
|
|
179
155
|
"""This object gives access to off screen buffers."""
|
|
180
156
|
|
|
181
157
|
height: int
|
|
182
|
-
""" Height of the texture.
|
|
183
|
-
|
|
184
|
-
:type: int
|
|
185
|
-
"""
|
|
158
|
+
""" Height of the texture."""
|
|
186
159
|
|
|
187
160
|
texture_color: GPUTexture
|
|
188
|
-
""" The color texture attached.
|
|
189
|
-
|
|
190
|
-
:type: GPUTexture
|
|
191
|
-
"""
|
|
161
|
+
""" The color texture attached."""
|
|
192
162
|
|
|
193
163
|
width: int
|
|
194
|
-
""" Width of the texture.
|
|
195
|
-
|
|
196
|
-
:type: int
|
|
197
|
-
"""
|
|
164
|
+
""" Width of the texture."""
|
|
198
165
|
|
|
199
166
|
def bind(self) -> None:
|
|
200
167
|
"""Context manager to ensure balanced bind calls, even in the case of an error."""
|
|
@@ -216,21 +183,13 @@ class GPUOffScreen:
|
|
|
216
183
|
"""Draw the 3d viewport in the offscreen object.
|
|
217
184
|
|
|
218
185
|
:param scene: Scene to draw.
|
|
219
|
-
:type scene: bpy.types.Scene
|
|
220
186
|
:param view_layer: View layer to draw.
|
|
221
|
-
:type view_layer: bpy.types.ViewLayer
|
|
222
187
|
:param view3d: 3D View to get the drawing settings from.
|
|
223
|
-
:type view3d: bpy.types.SpaceView3D
|
|
224
188
|
:param region: Region of the 3D View (required as temporary draw target).
|
|
225
|
-
:type region: bpy.types.Region
|
|
226
189
|
:param view_matrix: View Matrix (e.g. camera.matrix_world.inverted()).
|
|
227
|
-
:type view_matrix: collections.abc.Sequence[collections.abc.Sequence[float]] | mathutils.Matrix
|
|
228
190
|
:param projection_matrix: Projection Matrix (e.g. camera.calc_matrix_camera(...)).
|
|
229
|
-
:type projection_matrix: collections.abc.Sequence[collections.abc.Sequence[float]] | mathutils.Matrix
|
|
230
191
|
:param do_color_management: Color manage the output.
|
|
231
|
-
:type do_color_management: bool
|
|
232
192
|
:param draw_background: Draw background.
|
|
233
|
-
:type draw_background: bool
|
|
234
193
|
"""
|
|
235
194
|
|
|
236
195
|
def free(self) -> None:
|
|
@@ -243,37 +202,27 @@ class GPUOffScreen:
|
|
|
243
202
|
"""Unbind the offscreen object.
|
|
244
203
|
|
|
245
204
|
:param restore: Restore the OpenGL state, can only be used when the state has been saved before.
|
|
246
|
-
:type restore: bool
|
|
247
205
|
"""
|
|
248
206
|
|
|
249
207
|
class GPUShader:
|
|
250
208
|
name: str
|
|
251
|
-
""" The name of the shader object for debugging purposes (read-only).
|
|
252
|
-
|
|
253
|
-
:type: str
|
|
254
|
-
"""
|
|
209
|
+
""" The name of the shader object for debugging purposes (read-only)."""
|
|
255
210
|
|
|
256
211
|
program: int
|
|
257
212
|
""" The name of the program object for use by the OpenGL API (read-only).
|
|
258
|
-
This is deprecated and will always return -1.
|
|
259
|
-
|
|
260
|
-
:type: int
|
|
261
|
-
"""
|
|
213
|
+
This is deprecated and will always return -1."""
|
|
262
214
|
|
|
263
215
|
def attr_from_name(self, name: str) -> int:
|
|
264
216
|
"""Get attribute location by name.
|
|
265
217
|
|
|
266
218
|
:param name: The name of the attribute variable whose location is to be queried.
|
|
267
|
-
:type name: str
|
|
268
219
|
:return: The location of an attribute variable.
|
|
269
|
-
:rtype: int
|
|
270
220
|
"""
|
|
271
221
|
|
|
272
222
|
def attrs_info_get(self) -> tuple[tuple[str, str | None], ...]:
|
|
273
223
|
"""Information about the attributes used in the Shader.
|
|
274
224
|
|
|
275
225
|
:return: tuples containing information about the attributes in order (name, type)
|
|
276
|
-
:rtype: tuple[tuple[str, str | None], ...]
|
|
277
226
|
"""
|
|
278
227
|
|
|
279
228
|
def bind(self) -> None:
|
|
@@ -283,34 +232,27 @@ This is deprecated and will always return -1.
|
|
|
283
232
|
"""Build a new format based on the attributes of the shader.
|
|
284
233
|
|
|
285
234
|
:return: vertex attribute format for the shader
|
|
286
|
-
:rtype: GPUVertFormat
|
|
287
235
|
"""
|
|
288
236
|
|
|
289
237
|
def image(self, name: str, texture: GPUTexture) -> None:
|
|
290
238
|
"""Specify the value of an image variable for the current GPUShader.
|
|
291
239
|
|
|
292
240
|
:param name: Name of the image variable to which the texture is to be bound.
|
|
293
|
-
:type name: str
|
|
294
241
|
:param texture: Texture to attach.
|
|
295
|
-
:type texture: GPUTexture
|
|
296
242
|
"""
|
|
297
243
|
|
|
298
244
|
def uniform_block(self, name: str, ubo: GPUUniformBuf) -> None:
|
|
299
245
|
"""Specify the value of a uniform buffer object variable for the current GPUShader.
|
|
300
246
|
|
|
301
247
|
:param name: Name of the uniform variable whose UBO is to be specified.
|
|
302
|
-
:type name: str
|
|
303
248
|
:param ubo: Uniform Buffer to attach.
|
|
304
|
-
:type ubo: GPUUniformBuf
|
|
305
249
|
"""
|
|
306
250
|
|
|
307
251
|
def uniform_block_from_name(self, name: str) -> int:
|
|
308
252
|
"""Get uniform block location by name.
|
|
309
253
|
|
|
310
254
|
:param name: Name of the uniform block variable whose location is to be queried.
|
|
311
|
-
:type name: str
|
|
312
255
|
:return: The location of the uniform block variable.
|
|
313
|
-
:rtype: int
|
|
314
256
|
"""
|
|
315
257
|
|
|
316
258
|
def uniform_bool(
|
|
@@ -319,9 +261,7 @@ This is deprecated and will always return -1.
|
|
|
319
261
|
"""Specify the value of a uniform variable for the current program object.
|
|
320
262
|
|
|
321
263
|
:param name: Name of the uniform variable whose value is to be changed.
|
|
322
|
-
:type name: str
|
|
323
264
|
:param value: Value that will be used to update the specified uniform variable.
|
|
324
|
-
:type value: bool | collections.abc.Sequence[bool]
|
|
325
265
|
"""
|
|
326
266
|
|
|
327
267
|
def uniform_float(
|
|
@@ -330,36 +270,28 @@ This is deprecated and will always return -1.
|
|
|
330
270
|
"""Specify the value of a uniform variable for the current program object.
|
|
331
271
|
|
|
332
272
|
:param name: Name of the uniform variable whose value is to be changed.
|
|
333
|
-
:type name: str
|
|
334
273
|
:param value: Value that will be used to update the specified uniform variable.
|
|
335
|
-
:type value: collections.abc.Sequence[float] | float
|
|
336
274
|
"""
|
|
337
275
|
|
|
338
276
|
def uniform_from_name(self, name: str) -> int:
|
|
339
277
|
"""Get uniform location by name.
|
|
340
278
|
|
|
341
279
|
:param name: Name of the uniform variable whose location is to be queried.
|
|
342
|
-
:type name: str
|
|
343
280
|
:return: Location of the uniform variable.
|
|
344
|
-
:rtype: int
|
|
345
281
|
"""
|
|
346
282
|
|
|
347
283
|
def uniform_int(self, name: str, seq: collections.abc.Sequence[int] | int) -> None:
|
|
348
284
|
"""Specify the value of a uniform variable for the current program object.
|
|
349
285
|
|
|
350
286
|
:param name: Name of the uniform variable whose value is to be changed.
|
|
351
|
-
:type name: str
|
|
352
287
|
:param seq: Value that will be used to update the specified uniform variable.
|
|
353
|
-
:type seq: collections.abc.Sequence[int] | int
|
|
354
288
|
"""
|
|
355
289
|
|
|
356
290
|
def uniform_sampler(self, name: str, texture: GPUTexture) -> None:
|
|
357
291
|
"""Specify the value of a texture uniform variable for the current GPUShader.
|
|
358
292
|
|
|
359
293
|
:param name: Name of the uniform variable whose texture is to be specified.
|
|
360
|
-
:type name: str
|
|
361
294
|
:param texture: Texture to attach.
|
|
362
|
-
:type texture: GPUTexture
|
|
363
295
|
"""
|
|
364
296
|
|
|
365
297
|
def uniform_vector_float(
|
|
@@ -372,9 +304,7 @@ This is deprecated and will always return -1.
|
|
|
372
304
|
"""Set the buffer to fill the uniform.
|
|
373
305
|
|
|
374
306
|
:param location: Location of the uniform variable to be modified.
|
|
375
|
-
:type location: int
|
|
376
307
|
:param buffer: The data that should be set. Can support the buffer protocol.
|
|
377
|
-
:type buffer: collections.abc.Sequence[float]
|
|
378
308
|
:param length: Size of the uniform data type:
|
|
379
309
|
|
|
380
310
|
1: float
|
|
@@ -388,9 +318,7 @@ This is deprecated and will always return -1.
|
|
|
388
318
|
9: mat3
|
|
389
319
|
|
|
390
320
|
16: mat4
|
|
391
|
-
:type length: int
|
|
392
321
|
:param count: Specifies the number of elements, vector or matrices that are to be modified.
|
|
393
|
-
:type count: int
|
|
394
322
|
"""
|
|
395
323
|
|
|
396
324
|
def uniform_vector_int(
|
|
@@ -399,12 +327,9 @@ This is deprecated and will always return -1.
|
|
|
399
327
|
"""Set the buffer to fill the uniform.
|
|
400
328
|
|
|
401
329
|
:param location: Location of the uniform variable to be modified.
|
|
402
|
-
:type location: int
|
|
403
330
|
:param buffer: Buffer object with format matching the uniform.
|
|
404
331
|
:param length: Size of the uniform data type.
|
|
405
|
-
:type length: int
|
|
406
332
|
:param count: Specifies the number of elements that are to be modified.
|
|
407
|
-
:type count: int
|
|
408
333
|
"""
|
|
409
334
|
|
|
410
335
|
class GPUShaderCreateInfo:
|
|
@@ -414,16 +339,13 @@ class GPUShaderCreateInfo:
|
|
|
414
339
|
"""compute shader source code written in GLSL.Example:`GLSL Cross Compilation <https://developer.blender.org/docs/features/gpu/glsl_cross_compilation/>`__
|
|
415
340
|
|
|
416
341
|
:param source: The compute shader source code.
|
|
417
|
-
:type source: str
|
|
418
342
|
"""
|
|
419
343
|
|
|
420
344
|
def define(self, name: str, value: str) -> None:
|
|
421
345
|
"""Add a preprocessing define directive. In GLSL it would be something like:
|
|
422
346
|
|
|
423
347
|
:param name: Token name.
|
|
424
|
-
:type name: str
|
|
425
348
|
:param value: Text that replaces token occurrences.
|
|
426
|
-
:type value: str
|
|
427
349
|
"""
|
|
428
350
|
|
|
429
351
|
def depth_write(self, value: str) -> None:
|
|
@@ -440,7 +362,6 @@ class GPUShaderCreateInfo:
|
|
|
440
362
|
:ANY: enables depth write in a fragment shader for any fragments
|
|
441
363
|
:GREATER: enables depth write in a fragment shader for depth values thatare greater than the depth value in the output buffer.
|
|
442
364
|
:LESS: enables depth write in a fragment shader for depth values thatare less than the depth value in the output buffer.
|
|
443
|
-
:type value: str
|
|
444
365
|
"""
|
|
445
366
|
|
|
446
367
|
def fragment_out(
|
|
@@ -449,7 +370,6 @@ class GPUShaderCreateInfo:
|
|
|
449
370
|
"""Specify a fragment output corresponding to a framebuffer target slot.
|
|
450
371
|
|
|
451
372
|
:param slot: The attribute index.
|
|
452
|
-
:type slot: int
|
|
453
373
|
:param type: One of these types:
|
|
454
374
|
|
|
455
375
|
FLOAT
|
|
@@ -481,18 +401,14 @@ class GPUShaderCreateInfo:
|
|
|
481
401
|
IVEC4
|
|
482
402
|
|
|
483
403
|
BOOL
|
|
484
|
-
:type type: str
|
|
485
404
|
:param name: Name of the attribute.
|
|
486
|
-
:type name: str
|
|
487
405
|
:param blend: Dual Source Blending Index. It can be NONE, SRC_0 or SRC_1.
|
|
488
|
-
:type blend: str
|
|
489
406
|
"""
|
|
490
407
|
|
|
491
408
|
def fragment_source(self, source: str) -> None:
|
|
492
409
|
"""Fragment shader source code written in GLSL.Example:`GLSL Cross Compilation <https://developer.blender.org/docs/features/gpu/glsl_cross_compilation/>`__
|
|
493
410
|
|
|
494
411
|
:param source: The fragment shader source code.
|
|
495
|
-
:type source: str
|
|
496
412
|
"""
|
|
497
413
|
|
|
498
414
|
def image(
|
|
@@ -502,12 +418,11 @@ class GPUShaderCreateInfo:
|
|
|
502
418
|
type: str,
|
|
503
419
|
name: str,
|
|
504
420
|
*,
|
|
505
|
-
qualifiers={"NO_RESTRICT"},
|
|
421
|
+
qualifiers: set[str] = {"NO_RESTRICT"},
|
|
506
422
|
) -> None:
|
|
507
423
|
"""Specify an image resource used for arbitrary load and store operations.
|
|
508
424
|
|
|
509
425
|
:param slot: The image resource index.
|
|
510
|
-
:type slot: int
|
|
511
426
|
:param format: The GPUTexture format that is passed to the shader. Possible values are:
|
|
512
427
|
|
|
513
428
|
RGBA8UI
|
|
@@ -597,7 +512,6 @@ class GPUShaderCreateInfo:
|
|
|
597
512
|
DEPTH_COMPONENT24 (deprecated, use DEPTH_COMPONENT32F)
|
|
598
513
|
|
|
599
514
|
DEPTH_COMPONENT16
|
|
600
|
-
:type format: str
|
|
601
515
|
:param type: The data type describing how the image is to be read in the shader. Possible values are:
|
|
602
516
|
|
|
603
517
|
FLOAT_BUFFER
|
|
@@ -663,9 +577,7 @@ class GPUShaderCreateInfo:
|
|
|
663
577
|
DEPTH_CUBE
|
|
664
578
|
|
|
665
579
|
DEPTH_CUBE_ARRAY
|
|
666
|
-
:type type: str
|
|
667
580
|
:param name: The image resource name.
|
|
668
|
-
:type name: str
|
|
669
581
|
:param qualifiers: Set containing values that describe how the image resource is to be read or written. Possible values are:
|
|
670
582
|
- NO_RESTRICT
|
|
671
583
|
- READ
|
|
@@ -676,11 +588,8 @@ class GPUShaderCreateInfo:
|
|
|
676
588
|
"""Specify the local group size for compute shaders.
|
|
677
589
|
|
|
678
590
|
:param x: The local group size in the x dimension.
|
|
679
|
-
:type x: int
|
|
680
591
|
:param y: The local group size in the y dimension. Optional. Defaults to 1.
|
|
681
|
-
:type y: int
|
|
682
592
|
:param z: The local group size in the z dimension. Optional. Defaults to 1.
|
|
683
|
-
:type z: int
|
|
684
593
|
"""
|
|
685
594
|
|
|
686
595
|
def push_constant(self, type: str, name: str, size: int = 0) -> None:
|
|
@@ -717,18 +626,14 @@ class GPUShaderCreateInfo:
|
|
|
717
626
|
IVEC4
|
|
718
627
|
|
|
719
628
|
BOOL
|
|
720
|
-
:type type: str
|
|
721
629
|
:param name: Name of the constant.
|
|
722
|
-
:type name: str
|
|
723
630
|
:param size: If not zero, indicates that the constant is an array with the specified size.
|
|
724
|
-
:type size: int
|
|
725
631
|
"""
|
|
726
632
|
|
|
727
633
|
def sampler(self, slot: int, type: str, name: str) -> None:
|
|
728
634
|
"""Specify an image texture sampler.
|
|
729
635
|
|
|
730
636
|
:param slot: The image texture sampler index.
|
|
731
|
-
:type slot: int
|
|
732
637
|
:param type: The data type describing the format of each sampler unit. Possible values are:
|
|
733
638
|
|
|
734
639
|
FLOAT_BUFFER
|
|
@@ -794,34 +699,27 @@ class GPUShaderCreateInfo:
|
|
|
794
699
|
DEPTH_CUBE
|
|
795
700
|
|
|
796
701
|
DEPTH_CUBE_ARRAY
|
|
797
|
-
:type type: str
|
|
798
702
|
:param name: The image texture sampler name.
|
|
799
|
-
:type name: str
|
|
800
703
|
"""
|
|
801
704
|
|
|
802
705
|
def typedef_source(self, source: str) -> None:
|
|
803
706
|
"""Source code included before resource declaration. Useful for defining structs used by Uniform Buffers.Example:
|
|
804
707
|
|
|
805
708
|
:param source: The source code defining types.
|
|
806
|
-
:type source: str
|
|
807
709
|
"""
|
|
808
710
|
|
|
809
711
|
def uniform_buf(self, slot: int, type_name: str, name: str) -> None:
|
|
810
712
|
"""Specify a uniform variable whose type can be one of those declared in `gpu.types.GPUShaderCreateInfo.typedef_source`.
|
|
811
713
|
|
|
812
714
|
:param slot: The uniform variable index.
|
|
813
|
-
:type slot: int
|
|
814
715
|
: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
|
-
:type type_name: str
|
|
816
716
|
:param name: The uniform variable name.
|
|
817
|
-
:type name: str
|
|
818
717
|
"""
|
|
819
718
|
|
|
820
719
|
def vertex_in(self, slot: int, type: str, name: str) -> None:
|
|
821
720
|
"""Add a vertex shader input attribute.
|
|
822
721
|
|
|
823
722
|
:param slot: The attribute index.
|
|
824
|
-
:type slot: int
|
|
825
723
|
:param type: One of these types:
|
|
826
724
|
|
|
827
725
|
FLOAT
|
|
@@ -853,33 +751,26 @@ class GPUShaderCreateInfo:
|
|
|
853
751
|
IVEC4
|
|
854
752
|
|
|
855
753
|
BOOL
|
|
856
|
-
:type type: str
|
|
857
754
|
:param name: name of the attribute.
|
|
858
|
-
:type name: str
|
|
859
755
|
"""
|
|
860
756
|
|
|
861
757
|
def vertex_out(self, interface: GPUStageInterfaceInfo) -> None:
|
|
862
758
|
"""Add a vertex shader output interface block.
|
|
863
759
|
|
|
864
760
|
:param interface: Object describing the block.
|
|
865
|
-
:type interface: GPUStageInterfaceInfo
|
|
866
761
|
"""
|
|
867
762
|
|
|
868
763
|
def vertex_source(self, source: str) -> None:
|
|
869
764
|
"""Vertex shader source code written in GLSL.Example:`GLSL Cross Compilation <https://developer.blender.org/docs/features/gpu/glsl_cross_compilation/>`__
|
|
870
765
|
|
|
871
766
|
:param source: The vertex shader source code.
|
|
872
|
-
:type source: str
|
|
873
767
|
"""
|
|
874
768
|
|
|
875
769
|
class GPUStageInterfaceInfo:
|
|
876
770
|
"""List of varyings between shader stages."""
|
|
877
771
|
|
|
878
772
|
name: str
|
|
879
|
-
""" Name of the interface block.
|
|
880
|
-
|
|
881
|
-
:type: str
|
|
882
|
-
"""
|
|
773
|
+
""" Name of the interface block."""
|
|
883
774
|
|
|
884
775
|
def flat(self, type: str, name: str) -> None:
|
|
885
776
|
"""Add an attribute with qualifier of type flat to the interface block.
|
|
@@ -915,9 +806,7 @@ class GPUStageInterfaceInfo:
|
|
|
915
806
|
IVEC4
|
|
916
807
|
|
|
917
808
|
BOOL
|
|
918
|
-
:type type: str
|
|
919
809
|
:param name: name of the attribute.
|
|
920
|
-
:type name: str
|
|
921
810
|
"""
|
|
922
811
|
|
|
923
812
|
def no_perspective(self, type: str, name: str) -> None:
|
|
@@ -954,9 +843,7 @@ class GPUStageInterfaceInfo:
|
|
|
954
843
|
IVEC4
|
|
955
844
|
|
|
956
845
|
BOOL
|
|
957
|
-
:type type: str
|
|
958
846
|
:param name: name of the attribute.
|
|
959
|
-
:type name: str
|
|
960
847
|
"""
|
|
961
848
|
|
|
962
849
|
def smooth(self, type: str, name: str) -> None:
|
|
@@ -993,37 +880,25 @@ class GPUStageInterfaceInfo:
|
|
|
993
880
|
IVEC4
|
|
994
881
|
|
|
995
882
|
BOOL
|
|
996
|
-
:type type: str
|
|
997
883
|
:param name: name of the attribute.
|
|
998
|
-
:type name: str
|
|
999
884
|
"""
|
|
1000
885
|
|
|
1001
886
|
class GPUTexture:
|
|
1002
887
|
"""This object gives access to GPU textures."""
|
|
1003
888
|
|
|
1004
889
|
format: str
|
|
1005
|
-
""" Format of the texture.
|
|
1006
|
-
|
|
1007
|
-
:type: str
|
|
1008
|
-
"""
|
|
890
|
+
""" Format of the texture."""
|
|
1009
891
|
|
|
1010
892
|
height: int
|
|
1011
|
-
""" Height of the texture.
|
|
1012
|
-
|
|
1013
|
-
:type: int
|
|
1014
|
-
"""
|
|
893
|
+
""" Height of the texture."""
|
|
1015
894
|
|
|
1016
895
|
width: int
|
|
1017
|
-
""" Width of the texture.
|
|
1018
|
-
|
|
1019
|
-
:type: int
|
|
1020
|
-
"""
|
|
896
|
+
""" Width of the texture."""
|
|
1021
897
|
|
|
1022
898
|
def anisotropic_filter(self, use_anisotropic: bool) -> None:
|
|
1023
899
|
"""Set anisotropic filter usage. This only has effect if mipmapping is enabled.
|
|
1024
900
|
|
|
1025
901
|
:param use_anisotropic: If set to true, the texture will use anisotropic filtering.
|
|
1026
|
-
:type use_anisotropic: bool
|
|
1027
902
|
"""
|
|
1028
903
|
|
|
1029
904
|
def clear(
|
|
@@ -1036,9 +911,7 @@ class GPUTexture:
|
|
|
1036
911
|
:param format: The format that describes the content of a single item.
|
|
1037
912
|
Possible values are FLOAT, INT, UINT, UBYTE, UINT_24_8 & 10_11_11_REV.
|
|
1038
913
|
UINT_24_8 is deprecated, use FLOAT instead.
|
|
1039
|
-
:type format: str
|
|
1040
914
|
:param value: Sequence each representing the value to fill. Sizes 1..4 are supported.
|
|
1041
|
-
:type value: collections.abc.Sequence[float]
|
|
1042
915
|
"""
|
|
1043
916
|
|
|
1044
917
|
def extend_mode(
|
|
@@ -1052,7 +925,6 @@ class GPUTexture:
|
|
|
1052
925
|
both the x and y axis.
|
|
1053
926
|
|
|
1054
927
|
:param extend_mode: the specified extent mode.
|
|
1055
|
-
:type extend_mode: typing.Literal['EXTEND', 'REPEAT', 'MIRRORED_REPEAT', 'CLAMP_TO_BORDER']
|
|
1056
928
|
"""
|
|
1057
929
|
|
|
1058
930
|
def extend_mode_x(
|
|
@@ -1065,7 +937,6 @@ class GPUTexture:
|
|
|
1065
937
|
"""Set texture sampling method for coordinates outside of the [0..1] uv range along the x axis.
|
|
1066
938
|
|
|
1067
939
|
:param extend_mode: the specified extent mode.
|
|
1068
|
-
:type extend_mode: typing.Literal['EXTEND', 'REPEAT', 'MIRRORED_REPEAT', 'CLAMP_TO_BORDER']
|
|
1069
940
|
"""
|
|
1070
941
|
|
|
1071
942
|
def extend_mode_y(
|
|
@@ -1078,23 +949,19 @@ class GPUTexture:
|
|
|
1078
949
|
"""Set texture sampling method for coordinates outside of the [0..1] uv range along the y axis.
|
|
1079
950
|
|
|
1080
951
|
:param extend_mode: the specified extent mode.
|
|
1081
|
-
:type extend_mode: typing.Literal['EXTEND', 'REPEAT', 'MIRRORED_REPEAT', 'CLAMP_TO_BORDER']
|
|
1082
952
|
"""
|
|
1083
953
|
|
|
1084
954
|
def filter_mode(self, use_filter: bool) -> None:
|
|
1085
955
|
"""Set texture filter usage.
|
|
1086
956
|
|
|
1087
957
|
:param use_filter: If set to true, the texture will use linear interpolation between neighboring texels.
|
|
1088
|
-
:type use_filter: bool
|
|
1089
958
|
"""
|
|
1090
959
|
|
|
1091
960
|
def mipmap_mode(self, use_mipmap: bool = True, use_filter: bool = True) -> None:
|
|
1092
961
|
"""Set texture filter and mip-map usage.
|
|
1093
962
|
|
|
1094
963
|
:param use_mipmap: If set to true, the texture will use mip-mapping as anti-aliasing method.
|
|
1095
|
-
:type use_mipmap: bool
|
|
1096
964
|
:param use_filter: If set to true, the texture will use linear interpolation between neighboring texels.
|
|
1097
|
-
:type use_filter: bool
|
|
1098
965
|
"""
|
|
1099
966
|
|
|
1100
967
|
def read(self) -> None:
|
|
@@ -1124,9 +991,7 @@ class GPUVertBuf:
|
|
|
1124
991
|
"""Insert data into the buffer for a single attribute.
|
|
1125
992
|
|
|
1126
993
|
:param id: Either the name or the id of the attribute.
|
|
1127
|
-
:type id: int | str
|
|
1128
994
|
:param data: Buffer or sequence of data that should be stored in the buffer
|
|
1129
|
-
:type data: Buffer | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[collections.abc.Sequence[int]] | collections.abc.Sequence[float] | collections.abc.Sequence[int]
|
|
1130
995
|
"""
|
|
1131
996
|
|
|
1132
997
|
class GPUVertFormat:
|
|
@@ -1136,17 +1001,13 @@ class GPUVertFormat:
|
|
|
1136
1001
|
"""Add a new attribute to the format.
|
|
1137
1002
|
|
|
1138
1003
|
:param id: Name the attribute. Often position, normal, ...
|
|
1139
|
-
:type id: str
|
|
1140
1004
|
:param comp_type: The data type that will be used store the value in memory.
|
|
1141
1005
|
Possible values are I8, U8, I16, U16, I32, U32, F32 & I10.
|
|
1142
|
-
:type comp_type: str
|
|
1143
1006
|
:param len: How many individual values the attribute consists of
|
|
1144
1007
|
(e.g. 2 for uv coordinates).
|
|
1145
|
-
:type len: int
|
|
1146
1008
|
:param fetch_mode: How values from memory will be converted when used in the shader.
|
|
1147
1009
|
This is mainly useful for memory optimizations when you want to store values with
|
|
1148
1010
|
reduced precision. E.g. you can store a float in only 1 byte but it will be
|
|
1149
1011
|
converted to a normal 4 byte float when used.
|
|
1150
1012
|
Possible values are FLOAT, INT or INT_TO_FLOAT_UNIT.
|
|
1151
|
-
:type fetch_mode: str
|
|
1152
1013
|
"""
|
gpu_extras/batch/__init__.pyi
CHANGED
|
@@ -21,12 +21,8 @@ def batch_for_shader(
|
|
|
21
21
|
"""Return a batch already configured and compatible with the shader.
|
|
22
22
|
|
|
23
23
|
:param shader: shader for which a compatible format will be computed.
|
|
24
|
-
:type shader: gpu.types.GPUShader
|
|
25
24
|
:param type: "POINTS, LINES, TRIS or LINES_ADJ".
|
|
26
|
-
:type type: str
|
|
27
25
|
:param content: Maps the name of the shader attribute with the data to fill the vertex buffer.
|
|
28
26
|
For the dictionary values see documentation for `gpu.types.GPUVertBuf.attr_fill` data argument.
|
|
29
|
-
:type content: dict[str, gpu.types.Buffer | collections.abc.Sequence[float] | collections.abc.Sequence[int] | collections.abc.Sequence[collections.abc.Sequence[float]] | collections.abc.Sequence[collections.abc.Sequence[int]]]
|
|
30
27
|
:return: compatible batch
|
|
31
|
-
:rtype: gpu.types.GPUBatch
|
|
32
28
|
"""
|
gpu_extras/presets/__init__.pyi
CHANGED
|
@@ -15,16 +15,12 @@ def draw_circle_2d(
|
|
|
15
15
|
"""Draw a circle.
|
|
16
16
|
|
|
17
17
|
:param position: 2D position where the circle will be drawn.
|
|
18
|
-
:type position: collections.abc.Sequence[float]
|
|
19
18
|
:param color: Color of the circle (RGBA).
|
|
20
19
|
To use transparency blend must be set to ALPHA, see: `gpu.state.blend_set`.
|
|
21
|
-
:type color: collections.abc.Sequence[float]
|
|
22
20
|
:param radius: Radius of the circle.
|
|
23
|
-
:type radius: float
|
|
24
21
|
:param segments: How many segments will be used to draw the circle.
|
|
25
22
|
Higher values give better results but the drawing will take longer.
|
|
26
23
|
If None or not specified, an automatic value will be calculated.
|
|
27
|
-
:type segments: None | int | None
|
|
28
24
|
"""
|
|
29
25
|
|
|
30
26
|
def draw_texture_2d(
|
|
@@ -37,18 +33,13 @@ def draw_texture_2d(
|
|
|
37
33
|
"""Draw a 2d texture.
|
|
38
34
|
|
|
39
35
|
:param texture: GPUTexture to draw (e.g. gpu.texture.from_image(image) for `bpy.types.Image`).
|
|
40
|
-
:type texture: gpu.types.GPUTexture
|
|
41
36
|
:param position: Position of the lower left corner.
|
|
42
|
-
:type position: collections.abc.Sequence[float] | mathutils.Vector
|
|
43
37
|
:param width: Width of the image when drawn (not necessarily
|
|
44
38
|
the original width of the texture).
|
|
45
|
-
:type width: float
|
|
46
39
|
:param height: Height of the image when drawn.
|
|
47
|
-
:type height: float
|
|
48
40
|
:param is_scene_linear_with_rec709_srgb_target: True if the texture is stored in scene linear color space and
|
|
49
41
|
the destination frame-buffer uses the Rec.709 sRGB color space
|
|
50
42
|
(which is true when drawing textures acquired from `bpy.types.Image` inside a
|
|
51
43
|
PRE_VIEW, POST_VIEW or POST_PIXEL draw handler).
|
|
52
44
|
Otherwise the color space is assumed to match the one of the frame-buffer. (default=False)
|
|
53
|
-
:type is_scene_linear_with_rec709_srgb_target: bool
|
|
54
45
|
"""
|