|
Blender V5.3
|
#include <Python.h>#include "BLI_math_base_c.hh"#include "BLI_string_utf8.hh"#include "DNA_image_types.h"#include "GPU_capabilities.hh"#include "GPU_context.hh"#include "GPU_texture.hh"#include "BKE_global.hh"#include "BKE_image.hh"#include "BKE_image_gpu.hh"#include "../generic/py_capi_utils.hh"#include "../generic/python_compat.hh"#include "gpu_py.hh"#include "gpu_py_buffer.hh"#include "gpu_py_texture.hh"Go to the source code of this file.
Namespaces | |
| namespace | blender |
| BMesh Iterators. | |
Macros | |
| #define | PYDOC_TEX_FORMAT_LITERAL |
Functions | |
Local API | |
| int | blender::bpygpu_ParseTexture (PyObject *o, void *p) |
| PyObject * | blender::bpygpu_texture_init () |
Public API | |
| PyObject * | blender::BPyGPUTexture_CreatePyObject (gpu::Texture *tex, bool shared_reference) |
GPUTexture Common Utilities | |
| #define | BPYGPU_TEXTURE_CHECK_OBJ(bpygpu) |
| const PyC_StringEnumItems | blender::pygpu_textureformat_items [] |
| const PyC_StringEnumItems | blender::pygpu_textureextendmode_items [] |
| static int | blender::pygpu_texture_valid_check (BPyGPUTexture *bpygpu_tex) |
GPUTexture Type | |
| #define | BPYGPU_TEXTURE_EXTEND_MODE_ARG_DOC |
| static PyGetSetDef | blender::pygpu_texture__tp_getseters [] |
| static PyMethodDef | blender::pygpu_texture__tp_methods [] |
| PyTypeObject | blender::BPyGPUTexture_Type |
| static bool | blender::pygpu_texture_size_check (const int size[3], const int len, const bool is_cubemap, char *err_out, const size_t err_out_size) |
| static PyObject * | blender::pygpu_texture__tp_new (PyTypeObject *, PyObject *args, PyObject *kwds) |
| blender::PyDoc_STRVAR (pygpu_texture_width_doc, "Width of the texture.\n" "\n" ":type: int\n") | |
| static PyObject * | blender::pygpu_texture_width_get (BPyGPUTexture *self, void *) |
| blender::PyDoc_STRVAR (pygpu_texture_height_doc, "Height of the texture.\n" "\n" ":type: int\n") | |
| static PyObject * | blender::pygpu_texture_height_get (BPyGPUTexture *self, void *) |
| blender::PyDoc_STRVAR (pygpu_texture_format_doc, "Format of the texture.\n" "\n" ":type: str\n") | |
| static PyObject * | blender::pygpu_texture_format_get (BPyGPUTexture *self, void *) |
| blender::PyDoc_STRVAR (pygpu_texture_extend_mode_x_doc, ".. method:: extend_mode_x(extend_mode='EXTEND', /)\n" "\n" " Set texture sampling method for coordinates outside of the [0..1] uv range along the x " "axis.\n" "\n" BPYGPU_TEXTURE_EXTEND_MODE_ARG_DOC) | |
| static PyObject * | blender::pygpu_texture_extend_mode_x (BPyGPUTexture *self, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_texture_extend_mode_y_doc, ".. method:: extend_mode_y(extend_mode='EXTEND', /)\n" "\n" " Set texture sampling method for coordinates outside of the [0..1] uv range along the y " "axis.\n" "\n" BPYGPU_TEXTURE_EXTEND_MODE_ARG_DOC) | |
| static PyObject * | blender::pygpu_texture_extend_mode_y (BPyGPUTexture *self, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_texture_extend_mode_doc, ".. method:: extend_mode(extend_mode='EXTEND', /)\n" "\n" " Set texture sampling method for coordinates outside of the [0..1] uv range along\n" " both the x and y axis.\n" "\n" BPYGPU_TEXTURE_EXTEND_MODE_ARG_DOC) | |
| static PyObject * | blender::pygpu_texture_extend_mode (BPyGPUTexture *self, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_texture_filter_mode_doc, ".. method:: filter_mode(use_filter)\n" "\n" " Set texture filter usage.\n" "\n" " :param use_filter: If set to true, the texture will use linear interpolation between " "neighboring texels.\n" " :type use_filter: bool\n") | |
| static PyObject * | blender::pygpu_texture_filter_mode (BPyGPUTexture *self, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_texture_mipmap_mode_doc, ".. method:: mipmap_mode(use_mipmap=True, use_filter=True)\n" "\n" " Set texture filter and mip-map usage.\n" "\n" " :param use_mipmap: If set to true, the texture will use mip-mapping as anti-aliasing " "method.\n" " :type use_mipmap: bool\n" " :param use_filter: If set to true, the texture will use linear interpolation between " "neighboring texels.\n" " :type use_filter: bool\n") | |
| static PyObject * | blender::pygpu_texture_mipmap_mode (BPyGPUTexture *self, PyObject *args, PyObject *kwds) |
| blender::PyDoc_STRVAR (pygpu_texture_anisotropic_filter_doc, ".. method:: anisotropic_filter(use_anisotropic)\n" "\n" " Set anisotropic filter usage. This only has effect if mipmapping is enabled.\n" "\n" " :param use_anisotropic: If set to true, the texture will use anisotropic filtering.\n" " :type use_anisotropic: bool\n") | |
| static PyObject * | blender::pygpu_texture_anisotropic_filter (BPyGPUTexture *self, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_texture_clear_doc, ".. method:: clear(format='FLOAT', value=(0.0, 0.0, 0.0, 1.0))\n" "\n" " Fill texture with specific value.\n" "\n" " :param format: The format that describes the content of a single item.\n" " ``UINT_24_8`` is deprecated, use ``FLOAT`` instead.\n" " :type format: " PYDOC_DATAFORMAT_LITERAL "\n" " :param value: Sequence each representing the value to fill. Sizes 1..4 are supported.\n" " :type value: Sequence[float] | Sequence[int]\n") | |
| static PyObject * | blender::pygpu_texture_clear (BPyGPUTexture *self, PyObject *args, PyObject *kwds) |
| blender::PyDoc_STRVAR (pygpu_texture_read_doc, ".. method:: read()\n" "\n" " Creates a buffer with the value of all pixels.\n" "\n" " :return: The Buffer with the read pixels.\n" " :rtype: :class:`gpu.types.Buffer`\n") | |
| static PyObject * | blender::pygpu_texture_read (BPyGPUTexture *self) |
| static void | blender::BPyGPUTexture__tp_dealloc (BPyGPUTexture *self) |
| blender::PyDoc_STRVAR (pygpu_texture__tp_doc, ".. class:: GPUTexture\n" "\n" " This object gives access to GPU textures.\n" "\n" " .. method:: __init__(size, *, layers=0, is_cubemap=False, format='RGBA8', data=None)\n" "\n" " :param size: Dimensions of the texture 1D, 2D, 3D or cubemap.\n" " :type size: int | Sequence[int]\n" " :param layers: Number of layers in texture array or number of cubemaps in cubemap " "array\n" " :type layers: int\n" " :param is_cubemap: Indicates the creation of a cubemap texture.\n" " :type is_cubemap: bool\n" " :param format: Internal data format inside GPU memory.\n" " ``DEPTH24_STENCIL8`` is deprecated, use ``DEPTH32F_STENCIL8``.\n" " ``DEPTH_COMPONENT24`` is deprecated, use ``DEPTH_COMPONENT32F``.\n" " :type format: " PYDOC_TEX_FORMAT_LITERAL "\n" " :param data: Buffer object to fill the texture.\n" " :type data: :class:`gpu.types.Buffer` | None\n") | |
GPU Texture module | |
| static PyMethodDef | blender::pygpu_texture__m_methods [] |
| static PyModuleDef | blender::pygpu_texture_module_def |
| blender::PyDoc_STRVAR (pygpu_texture_from_image_doc, ".. function:: from_image(image)\n" "\n" " Get GPUTexture corresponding to an Image data-block. The GPUTexture " "memory is " "shared with Blender.\n" " Note: Colors read from the texture will be in scene linear color space and have " "premultiplied or straight alpha matching the image alpha mode.\n" "\n" " :param image: The Image data-block.\n" " :type image: :class:`bpy.types.Image`\n" " :return: The GPUTexture used by the image.\n" " :rtype: :class:`gpu.types.GPUTexture`\n") | |
| static PyObject * | blender::pygpu_texture_from_image (PyObject *, PyObject *arg) |
| blender::PyDoc_STRVAR (pygpu_texture__m_doc, "This module provides utilities for textures.") | |
This file defines the texture functionalities of the 'gpu' module
Definition in file gpu_py_texture.cc.
| #define BPYGPU_TEXTURE_CHECK_OBJ | ( | bpygpu | ) |
Definition at line 164 of file gpu_py_texture.cc.
Referenced by blender::pygpu_texture_anisotropic_filter(), blender::pygpu_texture_clear(), blender::pygpu_texture_extend_mode(), blender::pygpu_texture_extend_mode_x(), blender::pygpu_texture_extend_mode_y(), blender::pygpu_texture_filter_mode(), blender::pygpu_texture_format_get(), blender::pygpu_texture_height_get(), blender::pygpu_texture_mipmap_mode(), blender::pygpu_texture_read(), and blender::pygpu_texture_width_get().
| #define BPYGPU_TEXTURE_EXTEND_MODE_ARG_DOC |
Definition at line 178 of file gpu_py_texture.cc.
Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().
| #define PYDOC_TEX_FORMAT_LITERAL |
Definition at line 39 of file gpu_py_texture.cc.