ClusterProperty_V1.ElementsValues.1.vbs Example

Applies To

ClusterProperty_V1.ElementsValues property

Description

This example demonstrates how to use the ClusterProperty_V1.ElementsValues property.

Code

CreatePrim "Grid", "MeshSurface"
'Create a texture property containing the projected U,V,W values
CreateProjection "grid", "siTxtPlanarXZ", "siTxtDefaultPlanarXZ", , tex_obj, True
SelectObj "Grid.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection" ' & tex_obj
'The current selection contains the new texture property
set sel = application.selection(0)

' List of sample points to modify.
mySampleList = Array(1,2)

myValues = sel.obj.ElementsValues( mySampleList )

for i = LBound( myValues, 1 ) to UBound( myValues, 1 )
		logmessage "(" & myValues(i,0) & " , " & myValues(i,1) & ")"
		'Do an operation on each value.
		' this is the U value
		myValues( i, 0 ) = .45
		' this is the V value
		myValues( i, 1 ) = .45
next
'Set the new values
sel.obj.SetElementsValues mySampleList , myValues

Keywords

ClusterProperty_V1 ElementsValues


Autodesk Softimage 2011