Clarify difference between surface material and surface override material

This commit is contained in:
Hugo Locurcio 2023-09-28 23:18:26 +02:00
parent fbe611e45e
commit f4fd6d0d99
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
2 changed files with 8 additions and 4 deletions

View File

@ -162,14 +162,14 @@
<method name="get_surface_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of surfaces that the [Mesh] holds.
Returns the number of surfaces that the [Mesh] holds. This is equivalent to [method MeshInstance3D.get_surface_override_material_count].
</description>
</method>
<method name="surface_get_arrays" qualifiers="const">
<return type="Array" />
<param index="0" name="surf_idx" type="int" />
<description>
Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface (see [method ArrayMesh.add_surface_from_arrays]).
Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface (see [method ArrayMesh.add_surface_from_arrays]).
</description>
</method>
<method name="surface_get_blend_shape_arrays" qualifiers="const">
@ -184,6 +184,7 @@
<param index="0" name="surf_idx" type="int" />
<description>
Returns a [Material] in a given surface. Surface is rendered using this material.
[b]Note:[/b] This returns the material within the [Mesh] resource, not the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties. To get the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties, use [method MeshInstance3D.get_surface_override_material] instead.
</description>
</method>
<method name="surface_set_material">
@ -192,6 +193,7 @@
<param index="1" name="material" type="Material" />
<description>
Sets a [Material] for a given surface. Surface will be rendered using this material.
[b]Note:[/b] This assigns the material within the [Mesh] resource, not the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties. To set the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties, use [method MeshInstance3D.set_surface_override_material] instead.
</description>
</method>
</methods>

View File

@ -74,13 +74,14 @@
<return type="Material" />
<param index="0" name="surface" type="int" />
<description>
Returns the override [Material] for the specified [param surface] of the [Mesh] resource.
Returns the override [Material] for the specified [param surface] of the [Mesh] resource. See also [method get_surface_override_material_count].
[b]Note:[/b] This returns the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties, not the material within the [Mesh] resource. To get the material within the [Mesh] resource, use [method Mesh.surface_get_material] instead.
</description>
</method>
<method name="get_surface_override_material_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of surface override materials. This is equivalent to [method Mesh.get_surface_count].
Returns the number of surface override materials. This is equivalent to [method Mesh.get_surface_count]. See also [method get_surface_override_material].
</description>
</method>
<method name="set_blend_shape_value">
@ -97,6 +98,7 @@
<param index="1" name="material" type="Material" />
<description>
Sets the override [param material] for the specified [param surface] of the [Mesh] resource. This material is associated with this [MeshInstance3D] rather than with [member mesh].
[b]Note:[/b] This assigns the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties, not the material within the [Mesh] resource. To set the material within the [Mesh] resource, use [method Mesh.surface_get_material] instead.
</description>
</method>
</methods>