3D Lingo Dictionary > O-S > parent |  |

parent

Syntax

    member(whichCastmember).model(whichModel).parent
    member(whichCastmember).camera(whichCamera).parent
    member(whichCastmember).light(whichLight).parent
    member(whichCastmember).group(whichGroup).parent

Description

3D property; when used with a model, camera, light or group reference, this property allows you to get or set the parent node of the referenced object. The parent node can be any other model, camera, light or group object.

An object's `transform` property defines its scale, position and orientation relative to its parent object.

Setting an object's parent property to `VOID` is the same as removing the object from the world using the `removeFromWorld()` command.

Setting an object's parent property to the World group object (`group("World")`) is the same as adding an object to the world using the `addToWorld()` command.

You can also alter the value of this property by using the `addChild` command.

Example

This statement sets the parent property of the model named Tire. Its parent is set to the model named Car.

    member("Scene").model("Tire").parent = member("Scene").model("Car")

See also

`child`, `addChild`