SceneRefresh

Introduced

3.0

Description

Removes all temporary parameter values for a clean scene refresh. For example, if you apply an animation fcurve to an object's position and then change that position without setting a new key, you can reset the new temporary parameter values to the previous values by running this command. See the example below for a demonstration.

This is different from the Refresh command, which redraws all 3D views for a scene.

Examples

VBScript Example

'
' This example sets up an animation fcurve on a null, then sets a temporary value 
' on one of the animated parameters, and shows how to remove that temporary value
' using the SceneRefresh command.
'

NewScene , false

' Create a null and store the parameter list we will use to set keys. 
'---------------
' Note: We are using a combination of XSI commands and the object model
' here. For example, we are using the OM shortcut oNull.posx in the
' SetValue and SaveKey commands.
'---------------
Set oNull = ActiveSceneRoot.AddNull()
sParams = oNull.posx & "," & oNull.posy & "," & oNull.posz

' Move the null along the negative X-axis and save a key for frame 1
Translate oNull, -6.07766990291262, -2.37887869051207E-18, _
   3.88513203951106E-02, siRelative, siView, siObj, siXYZ
SaveKey sParams, 1

' Set a key for frame 90 towards the positive X-axis
SetValue "PlayControl.Key", 90
SetValue "PlayControl.Current", 90
Translate oNull, 14.2301617773766, -0.743180286278171, _
   7.43180286278171E-02, siRelative, siView, siObj, siXYZ
SaveKey sParams, 90

' Go to frame 30 and display the posx value for that frame. 
SetValue "PlayControl.Key", 30
SetValue "PlayControl.Current", 30
Application.LogMessage GetValue( oNull.posx ) 'INFO : "-2.52968225317525"

' Set a temporary value on posx
SetValue oNull.posx, 2

' Redisplay the value after setting the posx value but before the scene refresh.
Application.LogMessage GetValue( oNull.posx ) 'INFO : "2"

' Remove all temporary values
SceneRefresh

' Now display the value from the fcurve again after the scene refresh
Application.LogMessage GetValue( oNull.posx ) 'INFO : "-2.52968225317525"

See Also

Refresh



SOFTIMAGE|XSI v6.01     

Return to Softimage XSI Index