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:
authorAaron Carlisle <carlisle.b3d@gmail.com>2021-08-05 02:26:01 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2021-08-05 02:26:01 +0300
commit171433e841379e7efad069bbda9880fb271e2fc4 (patch)
tree892c0e7fcbd5c8d456909d0e697dfb2e74e923cd
parentd6ca7ab20ed6f4f1df29cfc55b88beaecdec4525 (diff)
PyDoc: Improve description of texture.evaluate
Inspired by the old 2.49 docs: https://docs.blender.org/api/249PythonDoc/Texture.Texture-class.html#evaluate
-rw-r--r--source/blender/makesrna/intern/rna_texture_api.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c
index 42b3e4420c1..c46b9acf986 100644
--- a/source/blender/makesrna/intern/rna_texture_api.c
+++ b/source/blender/makesrna/intern/rna_texture_api.c
@@ -61,12 +61,30 @@ void RNA_api_texture(StructRNA *srna)
func = RNA_def_function(srna, "evaluate", "texture_evaluate");
RNA_def_function_ui_description(func, "Evaluate the texture at the coordinates given");
- parm = RNA_def_float_vector(func, "value", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
+ parm = RNA_def_float_vector(func,
+ "value",
+ 3,
+ NULL,
+ -FLT_MAX,
+ FLT_MAX,
+ "The object coordinates (x,y,z) used to generate/map the texture",
+ "",
+ -1e4,
+ 1e4);
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
-
/* return location and normal */
parm = RNA_def_float_vector(
- func, "result", 4, NULL, -FLT_MAX, FLT_MAX, "Result", NULL, -1e4, 1e4);
+ func,
+ "result",
+ 4,
+ NULL,
+ -FLT_MAX,
+ FLT_MAX,
+ "The result of the texture where (x,y,z,w) are (red, green, blue, intensity). For greyscale "
+ "textures, often intensity only will be used",
+ NULL,
+ -1e4,
+ 1e4);
RNA_def_parameter_flags(parm, PROP_THICK_WRAP, 0);
RNA_def_function_output(func, parm);
}