'VBScript example
CreatePrim "Grid", "MeshSurface"
'This create a texture property containing the projected U,V,W values
CreateTextureProj
'Select the newly created property
SelectObj "grid.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection"
'The current selection contains the newly created cluster property
set mySelList = GetValue("SelectionList")
set myItem = mySelList(0)
set myClusterProp = myItem.obj
myOffsetsArray = Array( 0, 1, 2, 3 )
myValues = myClusterProp.ElementsValues( myOffsetsArray )
for i = LBound( myValues, 1 ) to UBound( myValues, 1 )
for j = LBound( myValues, 2 ) to UBound( myValues, 2 )
'Do an operation on each value. ( here v = 1 - v )
myValues( i, j ) = 1.0 - myValues( i, j )
next
next
'Now set the new values
myClusterProp.SetElementsValues myOffsetsArray, myValues
|