ClusterProperty_V1.SetElementsValues

Description

Set the values corresponding to given offsets of this cluster property

Scripting Syntax

ClusterProperty_V1.SetElementsValues( [Offsets], Values );

Parameters

Parameter Type Description
Offsets Array of Integer values An array of offsets. If this array is empty All values are considered.
Values Array of Integer values (N x ValueSize) An array of values.

Examples

VBScript Example

'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

See Also

ClusterProperty_V1.NbElements ClusterProperty_V1.ValueSize ClusterProperty_V1.SetElementsValues ClusterProperty_V1