From b0b547bd1e2c5e1fe3abb509aae6d274143fd213 Mon Sep 17 00:00:00 2001 From: mano-wii Date: Tue, 9 Oct 2018 12:18:28 -0300 Subject: Python GPU: Update `shader.from_builtin` and `shader.code_from_builtin` description. --- source/blender/python/gpu/gpu_py_shader.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'source/blender/python') diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c index 4d73d45412e..2bcf1ab0618 100644 --- a/source/blender/python/gpu/gpu_py_shader.c +++ b/source/blender/python/gpu/gpu_py_shader.c @@ -725,10 +725,17 @@ static PyObject *bpygpu_shader_unbind(BPyGPUShader *UNUSED(self)) } PyDoc_STRVAR(bpygpu_shader_from_builtin_doc, -".. function:: shader_from_builtin(shader_id)\n" -"\n" -" :param shader_id: shader identifier.\n" -" :type shader_id: int\n" +".. function:: shader_from_builtin(shader_name)\n" +"\n" +" :param shader_name: One of these builtin shader names: {\n" +" '2D_UNIFORM_COLOR',\n" +" '2D_FLAT_COLOR',\n" +" '2D_SMOOTH_COLOR',\n" +" '2D_IMAGE',\n" +" '3D_UNIFORM_COLOR',\n" +" '3D_FLAT_COLOR',\n" +" '3D_SMOOTH_COLOR'}\n" +" :type shader_name: str\n" ); static PyObject *bpygpu_shader_from_builtin(PyObject *UNUSED(self), PyObject *arg) { @@ -744,10 +751,17 @@ static PyObject *bpygpu_shader_from_builtin(PyObject *UNUSED(self), PyObject *ar } PyDoc_STRVAR(bpygpu_shader_code_from_builtin_doc, -".. function:: shader_code_from_builtin(shader_id)\n" -"\n" -" :param shader_id: shader identifier.\n" -" :type shader_id: int\n" +".. function:: shader_code_from_builtin(shader_name)\n" +"\n" +" :param shader_name: One of these builtin shader names: {\n" +" '2D_UNIFORM_COLOR',\n" +" '2D_FLAT_COLOR',\n" +" '2D_SMOOTH_COLOR',\n" +" '2D_IMAGE',\n" +" '3D_UNIFORM_COLOR',\n" +" '3D_FLAT_COLOR',\n" +" '3D_SMOOTH_COLOR'}\n" +" :type shader_name: str\n" " :return: vertex, fragment and geometry shader codes.\n" " :rtype: dict\n" ); -- cgit v1.2.3