AddRandomAnim

Abstract: Adds random animation to the marked static parameters.

Description: This tool searches for any marked parameters on the selected objects and adds a random expression around the original parameter value using the rand_0_1 expression function.

Working Scenarios: This tool was used originally along side other scripts in the DirectSkeleton custom exporter to add random motion to the position of some custom objects. Even though you can still use it on any object to introduce random motion on the fly using compensation mode so the random motion will happen around the original parameters values.

User Usage: Select any object, mark some parameters then run the script.

Developer Usage: You can call this tool from any other scripts using the following function call:
AddRanodmAnim( oObjectsCollection ,aParams, dSeed  )

Where oObjectsCollection is an XSI objects collection that contains all objects you want to animate. aParams is 1D-array that contains a list of all parameters you want to animate. This argument could be omitted so the script will search for any marked parameters. dSeed is the seed number that is used in the random function. This tool returns true if it succeeds and false if it failed for any reason.

Nature: Script

Applies To: XSI 3.5 on NT,Win2K,XP

Languages: VBScript