Merge pull request #66950 from Calinou/doc-surfacetool-generate-normals-smooth-groups

Document `SurfaceTool.generate_normals()` interaction with smooth groups
This commit is contained in:
Clay John 2022-10-19 13:51:58 -07:00 committed by GitHub
commit f63b2a9c05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,6 +133,7 @@
<description>
Generates normals from vertices so you do not have to do it manually. If [param flip] is [code]true[/code], the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays]. For correct display of normal-mapped surfaces, you will also have to generate tangents using [method generate_tangents].
[b]Note:[/b] [method generate_normals] only works if the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES].
[b]Note:[/b] [method generate_normals] takes smooth groups into account. If you don't specify any smooth group for each vertex, [method generate_normals] will smooth normals for you.
</description>
</method>
<method name="generate_tangents">