Scripting Object Behaviors
Coming soon!
Judah Mantell
Last Update 2 years ago
In SceneForge, every object in the scene has a script assigned to it. By default this script is blank and doesn't do anything, but by clicking the Edit Object Script button in the properties panel, you can edit and customize the script.
Script Commands
SceneForge scripts are basic in the way they are written but are powerful in what they can do.
A command is made up of two things: The Command and the Arguments. Much like a programming language, the Command tells the system what to do, and the arguments are extra bits of information that will be used.
Some commands have no arguments and some have more than one.
The script editor itself will let you know if something is spelled incorrectly or missing an argument to make things easier.
Sometimes you will need to specify a Scene Object. Rather than typing the name of the object, when needed an Object Selection window will appear for you to select the desired object.
Once selected, the object's unique ID will be added to the script editor.
In some cases where only one Scene Object needs to be specified, you can write "this" to reference the Scene Object that the script is on. In most cases this will be what you want.
Below is a list of all currently available commands and will be updated as more get added:
Command Name is what you type in.
Description is what the command does.
Arguments are what other info is required.
Example is an example of this command being used.
Notes are extra bits of info that may be helpful.
Universal Commands
These are commands that either are object agnostic (wait, for example) or can be used on any object type.
As mentioned above, if the last argument takes an ObjectID, if "this" is written, it will default to the object this script is on.
Additionally, commands that change a value over a specified duration can optionally be eased by simply adding "Ease" to the end of the command.
Command | Description | Arguments | Example |
---|---|---|---|
Wait | Waits the specified duration (seconds) before the next command is executed. | Decimal (Seconds) | Wait 0.5 |
Object.Show | Shows the specified object if it was previously hidden. | ObjectID | Object.Show ObjectID |
Object.Hide | Hides the specified object if it was previously visible. | ObjectID | Object.Hide ObjectID |
Object.MoveAxis | Moves the object on the specified axis the specified distance over the specified time. | Axis, Distance (Decimal), Duration (Seconds), ObjectID | Object.MoveAxis Z 2 1 ObjectID |
Object.Move | Moves the object the specified amount on each axis over the specified duration. | X-Distance (Decimal), Y-Distance (Decimal), Z-Distance (Decimal), Duration (Seconds), ObjectID | Object.Move 0.1 3 0 ObjectID |
Object.Rotate | Rotates the object the specified amount on each axis over the specified duration. | X-Angle (Decimal), Y-Angle (Decimal), Z-Angle (Decimal), Duration (Seconds), ObjectID | Object.Rotate 0 90 0 3 ObjectID |
Object.RotateAxis | Rotates the object on the specified axis by the specified amount over the specified duration. | Axis, Degrees (Decimal), Duration (Seconds), ObjectID | Object.RotateAxis Y 90 3 ObjectID |
Object.LookAt | Rotates the object on the Y axis to face the specified object. | Look Target (ObjectID), Duration (Seconds), ObjectID | Object.LookAt ObjectID 3 ObjectID |
Object.Scale | Scales the object uniformly to the specified scale over the specified duration. | Scale (Decimal), Duration (Decimal), ObjectID | Object.Scale 1.5 3 ObjectID |
Editor Commands
These are commands that affect the SceneForge editor. It's useful for automating different basic tasks as your scene gets animated.
Command | Description | Arguments | Example |
---|---|---|---|
Editor.ShowInFloorPlan | Shows the object in the floor plan. | ObjectID | Editor.ShowInFloorPlan ObjectID |
Editor.HideInFloorPlan | Hides the object in the floor plan. | ObjectID | Editor.HideInFloorPlan ObjectID |
Editor.Select | Selects the specified object and focuses the scene camera on it. | ObjectID | Editor.Select ObjectID |
Light Commands
These are commands that only apply to lights that are added to the scene. Much like movement, values that change over a duration can be eased by adding "Ease" to the end of the command.
Command | Description | Arguments | Example |
---|---|---|---|
Light.Intensity | Changes the light intensity over the specified duration | Lumens (Integer), Duration (Seconds), ObjectID | Light.Intensity 500 0.1 ObjectID |
Light.Temperature | Changes the light temperature over the specified duration. | Temperature (Integer), Duration (Seconds), ObjectID | Light.Temperature 1000 0.5 ObjectID |
Light.Rotation | If the light is on a stand (Spotlight or Box Light), change the rotation angle over the specified duration. | Rotation Angle (Integer), Duration (Seconds), ObjectID | Light.Rotation 90 4 ObjectID |
Light.SpotAngle | If the light is a spotlight, adjust the spot angle over the specified duration. | Spot Angle (Integer), Duration (Seconds), ObjectID | Light.SpotAngle 100 3 ObjectID |
Camera Commands
These are commands that only apply to cameras that are added to a scene. An optional "Ease" command can be added.
Command | Description | Arguments | Example |
---|---|---|---|
Camera.FocalLength | Changes the focal length over the specified duration. | Focal Length (Integer), Duration (Seconds), ObjectID | Camera.FocalLength 32 10 ObjectID |
Camera.Tripod.Height | If the camera is on a tripod, adjust the height over the specified duration. | Height (Decimal), Duration (Seconds), ObjectID | Camera.Tripod.Height 1.8 3 ObjectID |
Camera.Tripod.Pan | If the camera is on a tripod, adjust the pan angle over the specified duration. | Pan(Decimal), Duration (Seconds), ObjectID | Camera.Tripod.Pan 90 2 ObjectID |
Camera.Tripod.Tilt | If the camera is on a tripod, adjust the tilt angle over the specified duration. | Tilt (Decimal), Duration (Seconds), ObjectID | Camera.Tripod.Tilt 45 3 ObjectID |
Camera.Crane.Height | If the camera is on a Crane, adjust the height over the specified duration. | Height (Decimal), Duration (Seconds), ObjectID | Camera.Crane.Height 80 3 ObjectID |
Camera.Crane.Rotate | If the camera is on a crane, adjust the rotation over the specified duration. | Rotation (Decimal), Duration (Seconds), ObjectID | Camera.Crane.Rotation 45 4 ObjectID |
Dynamic Track Commands
These are commands that only apply to dynamic tracks that are added to a scene.
Command | Description | Arguments | Example |
---|---|---|---|
Track.Ease | Sets the track's ease toggle to the specified value. | Boolean (True/False),ObjectID | Track.Ease false ObjectID |
Track.Duration | Sets the track's duration. | Duration (Seconds), ObjectID | Track.Duration 40 ObjectID |
Track.Play | Plays the track motion. | ObjectID | Track.Play ObjectID |
Track.Stop | Stops the track's motion. | ObjectID | Track.Stop ObjectID |
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article