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 20:04:59 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2021-08-05 20:06:13 +0300
commit6844f7bedb71883f383bdeff130fd2200750cc54 (patch)
tree5b6b01f9da4cfbf1279c90cdd38f3fe8683bea31
parentbd44e82b255a231242a1b7ddd59cee7830af20ea (diff)
PyDoc: document how parameter are used for 3D and 2D textures
Improves on rB171433e841379e7efad069bbda9880fb271e2fc4
-rw-r--r--source/blender/makesrna/intern/rna_texture_api.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c
index c46b9acf986..83c1efd55bc 100644
--- a/source/blender/makesrna/intern/rna_texture_api.c
+++ b/source/blender/makesrna/intern/rna_texture_api.c
@@ -59,19 +59,23 @@ void RNA_api_texture(StructRNA *srna)
PropertyRNA *parm;
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,
- "The object coordinates (x,y,z) used to generate/map the texture",
- "",
- -1e4,
- 1e4);
+ RNA_def_function_ui_description(
+ func, "Evaluate the texture at the a given coordinate and returns the result");
+
+ parm = RNA_def_float_vector(
+ func,
+ "value",
+ 3,
+ NULL,
+ -FLT_MAX,
+ FLT_MAX,
+ "The coordinates (x,y,z) of the texture, in case of a 3D texture, the z value is the slice "
+ "of the texture that is evaluated. For 2D textures such as images, the z value is ignored",
+ "",
+ -1e4,
+ 1e4);
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
+
/* return location and normal */
parm = RNA_def_float_vector(
func,