diff --git a/source/blender/python/gpu/gpu_py_framebuffer.cc b/source/blender/python/gpu/gpu_py_framebuffer.cc index bea324ee6ca..aa08d0b6bb5 100644 --- a/source/blender/python/gpu/gpu_py_framebuffer.cc +++ b/source/blender/python/gpu/gpu_py_framebuffer.cc @@ -799,7 +799,7 @@ static PyMethodDef pygpu_framebuffer__tp_methods[] = { #endif /* Ideally type aliases would de-duplicate: - * `blender::gpu::Texture | dict[str, int | blender::gpu::Texture]` in this doc-string. */ + * `GPUTexture | dict[str, int | GPUTexture]` in this doc-string. */ PyDoc_STRVAR( /* Wrap. */ pygpu_framebuffer__tp_doc, @@ -810,15 +810,15 @@ PyDoc_STRVAR( "texture is attached to the frame-buffer.\n" " For cube map textures, layer is translated into a cube map face.\n" "\n" - " :arg depth_slot: blender::gpu::Texture to attach or a `dict` containing keywords: " + " :arg depth_slot: GPUTexture to attach or a `dict` containing keywords: " "'texture', 'layer' and 'mip'.\n" - " :type depth_slot: :class:`gpu.types.blender::gpu::Texture` | dict[] | None\n" - " :arg color_slots: Tuple where each item can be a blender::gpu::Texture or a `dict` " + " :type depth_slot: :class:`gpu.types.GPUTexture` | dict[] | None\n" + " :arg color_slots: Tuple where each item can be a GPUTexture or a `dict` " "containing keywords: 'texture', 'layer' and 'mip'.\n" - " :type color_slots: :class:`gpu.types.blender::gpu::Texture` | " - "dict[str, int | :class:`gpu.types.blender::gpu::Texture`] | " - "Sequence[:class:`gpu.types.blender::gpu::Texture` | dict[str, int | " - ":class:`gpu.types.blender::gpu::Texture`]] | " + " :type color_slots: :class:`gpu.types.GPUTexture` | " + "dict[str, int | :class:`gpu.types.GPUTexture`] | " + "Sequence[:class:`gpu.types.GPUTexture` | dict[str, int | " + ":class:`gpu.types.GPUTexture`]] | " "None\n"); PyTypeObject BPyGPUFrameBuffer_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) diff --git a/source/blender/python/gpu/gpu_py_offscreen.cc b/source/blender/python/gpu/gpu_py_offscreen.cc index 8d843837f8c..4db95f0800b 100644 --- a/source/blender/python/gpu/gpu_py_offscreen.cc +++ b/source/blender/python/gpu/gpu_py_offscreen.cc @@ -357,7 +357,7 @@ PyDoc_STRVAR( pygpu_offscreen_texture_color_doc, "The color texture attached.\n" "\n" - ":type: :class:`gpu.types.blender::gpu::Texture`"); + ":type: :class:`gpu.types.GPUTexture`"); static PyObject *pygpu_offscreen_texture_color_get(BPyGPUOffScreen *self, void * /*type*/) { BPY_GPU_OFFSCREEN_CHECK_OBJ(self); diff --git a/source/blender/python/gpu/gpu_py_shader.cc b/source/blender/python/gpu/gpu_py_shader.cc index f03e327a230..d2c6f2c59d4 100644 --- a/source/blender/python/gpu/gpu_py_shader.cc +++ b/source/blender/python/gpu/gpu_py_shader.cc @@ -505,7 +505,7 @@ PyDoc_STRVAR( " :arg name: name of the uniform variable whose texture is to be specified.\n" " :type name: str\n" " :arg texture: Texture to attach.\n" - " :type texture: :class:`gpu.types.blender::gpu::Texture`\n"); + " :type texture: :class:`gpu.types.GPUTexture`\n"); static PyObject *pygpu_shader_uniform_sampler(BPyGPUShader *self, PyObject *args) { const char *name; @@ -534,7 +534,7 @@ PyDoc_STRVAR( " :arg name: Name of the image variable to which the texture is to be bound.\n" " :type name: str\n" " :arg texture: Texture to attach.\n" - " :type texture: :class:`gpu.types.blender::gpu::Texture`\n"); + " :type texture: :class:`gpu.types.GPUTexture`\n"); static PyObject *pygpu_shader_image(BPyGPUShader *self, PyObject *args) { const char *name; diff --git a/source/blender/python/gpu/gpu_py_shader_create_info.cc b/source/blender/python/gpu/gpu_py_shader_create_info.cc index 80f68d435da..e0c97770e37 100644 --- a/source/blender/python/gpu/gpu_py_shader_create_info.cc +++ b/source/blender/python/gpu/gpu_py_shader_create_info.cc @@ -730,7 +730,7 @@ PyDoc_STRVAR( "\n" " :arg slot: The image resource index.\n" " :type slot: int\n" - " :arg format: The blender::gpu::Texture format that is passed to the shader. Possible " + " :arg format: The GPUTexture format that is passed to the shader. Possible " "values are:\n" "\n" PYDOC_TEX_FORMAT_ITEMS " :type format: str\n" diff --git a/source/blender/python/gpu/gpu_py_texture.cc b/source/blender/python/gpu/gpu_py_texture.cc index de61da9f585..6d1e26ed3af 100644 --- a/source/blender/python/gpu/gpu_py_texture.cc +++ b/source/blender/python/gpu/gpu_py_texture.cc @@ -32,7 +32,7 @@ #include "gpu_py_texture.hh" /* own include */ /* -------------------------------------------------------------------- */ -/** \name blender::gpu::Texture Common Utilities +/** \name GPUTexture Common Utilities * \{ */ const PyC_StringEnumItems pygpu_textureformat_items[] = { @@ -110,7 +110,7 @@ static int pygpu_texture_valid_check(BPyGPUTexture *bpygpu_tex) /** \} */ /* -------------------------------------------------------------------- */ -/** \name blender::gpu::Texture Type +/** \name GPUTexture Type * \{ */ static PyObject *pygpu_texture__tp_new(PyTypeObject * /*self*/, PyObject *args, PyObject *kwds) @@ -135,7 +135,7 @@ static PyObject *pygpu_texture__tp_new(PyTypeObject * /*self*/, PyObject *args, "p" /* `is_cubemap` */ "O&" /* `format` */ "O!" /* `data` */ - ":blender::gpu::Texture.__new__", + ":GPUTexture.__new__", _keywords, nullptr, }; @@ -169,16 +169,12 @@ static PyObject *pygpu_texture__tp_new(PyTypeObject * /*self*/, PyObject *args, if (PySequence_Check(py_size)) { len = PySequence_Size(py_size); if ((len < 1) || (len > 3)) { - PyErr_Format( - PyExc_ValueError, - "blender::gpu::Texture.__new__: \"size\" must be between 1 and 3 in length (got %d)", - len); + PyErr_Format(PyExc_ValueError, + "GPUTexture.__new__: \"size\" must be between 1 and 3 in length (got %d)", + len); return nullptr; } - if (PyC_AsArray( - size, sizeof(*size), py_size, len, &PyLong_Type, "blender::gpu::Texture.__new__") == - -1) - { + if (PyC_AsArray(size, sizeof(*size), py_size, len, &PyLong_Type, "GPUTexture.__new__") == -1) { return nullptr; } } @@ -186,17 +182,15 @@ static PyObject *pygpu_texture__tp_new(PyTypeObject * /*self*/, PyObject *args, size[0] = PyLong_AsLong(py_size); } else { - PyErr_SetString(PyExc_ValueError, - "blender::gpu::Texture.__new__: Expected an int or tuple as first arg"); + PyErr_SetString(PyExc_ValueError, "GPUTexture.__new__: Expected an int or tuple as first arg"); return nullptr; } void *data = nullptr; if (pybuffer_obj) { if (pybuffer_obj->format != GPU_DATA_FLOAT) { - PyErr_SetString( - PyExc_ValueError, - "blender::gpu::Texture.__new__: Only Buffer of format `FLOAT` is currently supported"); + PyErr_SetString(PyExc_ValueError, + "GPUTexture.__new__: Only Buffer of format `FLOAT` is currently supported"); return nullptr; } @@ -210,8 +204,7 @@ static PyObject *pygpu_texture__tp_new(PyTypeObject * /*self*/, PyObject *args, } if (bpygpu_Buffer_size(pybuffer_obj) < data_space_expected) { - PyErr_SetString(PyExc_ValueError, - "blender::gpu::Texture.__new__: Buffer size smaller than requested"); + PyErr_SetString(PyExc_ValueError, "GPUTexture.__new__: Buffer size smaller than requested"); return nullptr; } data = pybuffer_obj->buf.as_void; @@ -570,7 +563,7 @@ static PyMethodDef pygpu_texture__tp_methods[] = { PyDoc_STRVAR( /* Wrap. */ pygpu_texture__tp_doc, - ".. class:: blender::gpu::Texture(size, layers=0, is_cubemap=False, format='RGBA8', " + ".. class:: GPUTexture(size, layers=0, is_cubemap=False, format='RGBA8', " "data=None)\n" "\n" " This object gives access to off GPU textures.\n" @@ -631,7 +624,7 @@ PyDoc_STRVAR( " :type data: :class:`gpu.types.Buffer`\n"); PyTypeObject BPyGPUTexture_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) - /*tp_name*/ "blender::gpu::Texture", + /*tp_name*/ "GPUTexture", /*tp_basicsize*/ sizeof(BPyGPUTexture), /*tp_itemsize*/ 0, /*tp_dealloc*/ (destructor)BPyGPUTexture__tp_dealloc, @@ -692,7 +685,7 @@ PyDoc_STRVAR( pygpu_texture_from_image_doc, ".. function:: from_image(image)\n" "\n" - " Get blender::gpu::Texture corresponding to an Image datablock. The blender::gpu::Texture " + " Get GPUTexture corresponding to an Image datablock. The GPUTexture " "memory is " "shared with Blender.\n" " Note: Colors read from the texture will be in scene linear color space and have " @@ -700,8 +693,8 @@ PyDoc_STRVAR( "\n" " :arg image: The Image datablock.\n" " :type image: :class:`bpy.types.Image`\n" - " :return: The blender::gpu::Texture used by the image.\n" - " :rtype: :class:`gpu.types.blender::gpu::Texture`\n"); + " :return: The GPUTexture used by the image.\n" + " :rtype: :class:`gpu.types.GPUTexture`\n"); static PyObject *pygpu_texture_from_image(PyObject * /*self*/, PyObject *arg) { Image *ima = static_cast(PyC_RNA_AsPointer(arg, "Image"));