Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormano-wii <germano.costa@ig.com.br>2018-10-30 17:38:42 +0300
committermano-wii <germano.costa@ig.com.br>2018-10-30 17:38:42 +0300
commit974d158f3fdf0b7a3b454fec3883f818c5e3a107 (patch)
tree8163aed9de1ce8d2ff58da8ccad6eb40a944eeef /source/blender/python/gpu
parent2dbddaf3be57142a70fc1fb8f46997d67e980f57 (diff)
PyAPI: GPU: improve GPUShader.from_builtin and GPUShader.code_from_builtin description.
Diffstat (limited to 'source/blender/python/gpu')
-rw-r--r--source/blender/python/gpu/gpu_py_shader.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c
index d6f4c45b684..91a2d3843ce 100644
--- a/source/blender/python/gpu/gpu_py_shader.c
+++ b/source/blender/python/gpu/gpu_py_shader.c
@@ -741,6 +741,24 @@ static PyObject *bpygpu_shader_unbind(BPyGPUShader *UNUSED(self))
PyDoc_STRVAR(bpygpu_shader_from_builtin_doc,
".. function:: from_builtin(shader_name)\n"
"\n"
+"Shaders that are embedded in the blender internal code.\n"
+"They all read the uniform 'mat4 ModelViewProjectionMatrix', which can be edited by the 'gpu.matrix' module.\n"
+" '2D_UNIFORM_COLOR' (attribute: 'vec3 pos'; uniform: 'vec4 color');\n"
+"\n"
+" '2D_FLAT_COLOR' (attribute: 'vec4 color', 'vec3 pos');\n"
+"\n"
+" '2D_SMOOTH_COLOR' (attribute: 'vec4 color', 'vec3 pos');\n"
+"\n"
+" '2D_IMAGE' (attribute: 'vec2 texCoord', 'vec2 pos');\n"
+"\n"
+" '3D_UNIFORM_COLOR' (attribute: 'vec3 pos'; uniform: 'vec4 color');\n"
+"\n"
+" '3D_FLAT_COLOR' (attribute: 'vec4 color', 'vec3 pos');\n"
+"\n"
+" '3D_SMOOTH_COLOR (attribute: 'vec4 color', 'vec3 pos');\n"
+"\n"
+"For more details, you can check the shader code with the function 'gpu.shader.code_from_builtin';\n"
+"\n"
" :param shader_name: One of these builtin shader names: {\n"
" '2D_UNIFORM_COLOR',\n"
" '2D_FLAT_COLOR',\n"
@@ -769,6 +787,8 @@ static PyObject *bpygpu_shader_from_builtin(PyObject *UNUSED(self), PyObject *ar
PyDoc_STRVAR(bpygpu_shader_code_from_builtin_doc,
".. function:: code_from_builtin(shader_name)\n"
"\n"
+"Exposes the internal shader code for query.\n"
+"\n"
" :param shader_name: One of these builtin shader names: {\n"
" '2D_UNIFORM_COLOR',\n"
" '2D_FLAT_COLOR',\n"