RemoveRelativeValue

Description

Remove the set of relative values at index from the interpolator-driven parameter or the interpolator object.

Scripting Syntax

RemoveRelativeValue( InputObj, Index );

Parameters

Parameter Type Description
InputObj String Animated parameter that the interpolator is controlling or the interpolator itself

Default Value: Currently selected and marked parameter

Index Integer Index of the set of relative values to remove

Default Value: 0

Possible Values:

Description:

0 < Index < NbRelativeValues Sets of relative values are indexed from 0 to (NbRelativeValues - 1)

Examples

VBScript Example

' This example shows how to remove a set of relative values in the Interpolator object.

NewScene, false

CreatePrim "Cone", "MeshSurface"

CreatePrim "Cube", "MeshSurface"

SetExpr "cube.kine.local.posx", "l_interp( cone.kine.global.posx, cone.kine.global.posy )"

SetValue "cone.kine.local.posx", 1.5

SetValue "cone.kine.local.posy", 2

SetValue "cube.kine.local.posx", 2.5

SetRelativeValues "cube.kine.local.posx"

SetValue "cone.kine.local.posx", 3

SetValue "cone.kine.local.posy", 3.5

SetValue "cube.kine.local.posx", 4

SetRelativeValues "cube.kine.local.posx"

numKeys = GetNumRelativeValues( "cube.kine.local.Expression.Interpolator" )

Application.LogMessage "The Interpolator object has " & numKeys & " sets of relative values before calling RemoveRelativeValue"

' Remove relative values set #1

RemoveRelativeValue "cube.kine.local.Expression.Interpolator", 1

numKeys = GetNumRelativeValues( "cube.kine.local.Expression.Interpolator" )

Application.LogMessage "The Interpolator object has " & numKeys & " sets of relative values after calling RemoveRelativeValue"

for i = 0 to numKeys - 1

	Application.LogMessage "---------------------------"

	Application.LogMessage "Relative values set #" & i & ":"

	values = GetRelativeValue( "cube.kine.local.Expression.Interpolator", i )

	j = 0

	for each item in values

		if (j = 0) then

			Application.LogMessage "Controlled value = " & item

		else

			Application.LogMessage "Controlling #" & j & " value = " & item

		end if

		j = j + 1

	next

next

' INFO : The Interpolator object has 3 sets of relative values before calling RemoveRelativeValue

' INFO : The Interpolator object has 2 sets of relative values after calling RemoveRelativeValue

' INFO : ---------------------------

' INFO : Relative values set #0:

' INFO : Controlled value = 0

' INFO : Controlling #1 value = 0

' INFO : Controlling #2 value = 0

' INFO : ---------------------------

' INFO : Relative values set #1:

' INFO : Controlled value = 4

' INFO : Controlling #1 value = 3

' INFO : Controlling #2 value = 3.5

See Also

GetNumRelativeValues GetRelativeValue SetRelativeValues