Clarify that MeshInstance surface methods only apply to override materials

(cherry picked from commit 22881a6923)
This commit is contained in:
salamandars 2022-06-23 20:55:54 +10:00 committed by Rémi Verschelde
parent 4df1a2f7e3
commit 5fcdbfb2be
1 changed files with 4 additions and 3 deletions

View File

@ -52,13 +52,14 @@
<return type="Material" /> <return type="Material" />
<argument index="0" name="surface" type="int" /> <argument index="0" name="surface" type="int" />
<description> <description>
Returns the [Material] for a surface of the [Mesh] resource. Returns the override [Material] for a surface of the [Mesh] resource.
[b]Note:[/b] This function only returns [i]override[/i] materials associated with this [MeshInstance]. Consider using [method get_active_material] or [method Mesh.surface_get_material] to get materials associated with the [Mesh] resource.
</description> </description>
</method> </method>
<method name="get_surface_material_count" qualifiers="const"> <method name="get_surface_material_count" qualifiers="const">
<return type="int" /> <return type="int" />
<description> <description>
Returns the number of surface materials. Returns the number of surface override materials.
</description> </description>
</method> </method>
<method name="set_surface_material"> <method name="set_surface_material">
@ -66,7 +67,7 @@
<argument index="0" name="surface" type="int" /> <argument index="0" name="surface" type="int" />
<argument index="1" name="material" type="Material" /> <argument index="1" name="material" type="Material" />
<description> <description>
Sets the [Material] for a surface of the [Mesh] resource. Sets the override [Material] for the specified surface of the [Mesh] resource. This material is associated with this [MeshInstance] rather than with the [Mesh] resource.
</description> </description>
</method> </method>
</methods> </methods>