オブジェクト モデルでは、テクスチャの操作を行うことは完全にはできません。 そうした理由から、このセクションの唯一の例では、オブジェクト モデルと Softimage ネイティブ コマンドの両方を同じコード内に使用して配慮しています。
次のコードは、立方体を作成し、UV テクスチャ サポートを追加してテクスチャ UV ポイントの座標を出力できるようにする方法を示しています。
Set oRoot = Application.ActiveProject.ActiveScene.Root
Set oObject = oRoot.AddGeometry( "Cube", "MeshSurface" )
BlendInPresets "Image", oObject, 1, False
CreateTextureSupport oObject, siTxtUV, siTxtDefaultSpherical, "Texture_Support"
Set oUVWProp = oObject.Material.CurrentUV
' Output uv text coords
aUVW = oUVWProp.Elements.Array
For iIndex = 0 to oUVWProp.elements.count-1
LogMessage "UV(" & aUVW(0,iIndex) & "," & aUVW(1,iIndex) & ")"
Next