Viewer:setTextureToMaterial

機能
テクスチャをマテリアルに設定
構文
setTextureToMaterial("Material", techniqueIdx, passIdx, "textureUnitState", "textureName")
引数
Material 文字列。マテリアル名。
techniqueIdx マテリアル内のtechniqueインデックス値。
passIdx マテリアル内のtechnique内のpassインデックス値。
textureUnitState 文字列。テクスチャUnitState名。
textureName 文字列。テクスチャ名。
戻り値
なし
説明
textureNameで指定したテクスチャを、指定したマテリアル/technique/pass/テクスチャUnitStateに設定します。
サンプルコード

--マテリアル「material_1」の、0番目technique、0番目pass中のUnitState名「normal」テクスチャの画像を差し替える。
Viewer = megGetViewer();
Viewer:setTextureToMaterial("material_1", 0, 0, "normal", "norm2.jpg");

参考)

material material_1
{
 technique
 {
  pass
  {
   texture_unit normal
   {
    texture norm1.jpg
   }

   texture_unit
   {
    ...
   }
   ...
  }
 }
}