<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
  SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
  <func>
    <title>GetMeshMaterial</title>
    <category>Objects</category>
    <subcat>Display</subcat>
    <version>5.1 OC</version>
    <syntax>
      <rtype>string</rtype>
      <params>
        <param>
          <type>int</type>
          <name>submesh</name>
          <desc>If the mesh is composed of multiple submeshes then this parameter can be used to specify the submesh whose material to query.</desc>
          <optional />
        </param>
      </params>
    </syntax>
    <desc>Returns the material currently set for the calling object.</desc>
    <examples>
      <example>
        <code><funclink>if</funclink>(<funclink>GetMeshMaterial</funclink>() == &quot;Clonk_Body&quot;)
	<funclink>SetMeshMaterial</funclink>(&quot;Clonk_Body_EyesClosed&quot;)
else
	<funclink>SetMeshMaterial</funclink>(&quot;Clonk_Body&quot;);</code>
        <text>If a clonk has its eyes open then this script makes it close them, otherwise they are opened.</text>
      </example>
    </examples>
    <related><funclink>SetMeshMaterial</funclink></related>
  </func>
  <author>Clonk-Karl</author><date>2010-04</date>
</funcs>
