User Guide
Lingo Dictionary 137
clone
Syntax
member(whichCastmember).model(whichModel).clone(cloneName)
member(whichCastmember).group(whichGroup).clone(cloneName)
member(whichCastmember).light(whichLight).clone(cloneName)
member(whichCastmember).camera(whichCamera).clone(cloneName)
Description
3D command; creates a copy of the model, group, light, or camera and all of its children. The
clone is named cloneName and shares the parent of the model, group, light, or camera from
which it was cloned.
A clone of a model uses the same model resource and is assigned the same shaderList as the
original model.
If you do not specify the
cloneName, or if you specify "", the clone will not be counted by the
count method, but it will appear in the scene.
Example
This statement creates a clone named Teapot2 from the model named Teapot, and returns a
reference to the new model.
teapotCopy = member("3D World").model("Teapot").clone("Teapot2")
See also
cloneDeep, cloneModelFromCastmember, cloneMotionFromCastmember, loadFile()
cloneDeep
Syntax
member(whichCastmember).model(whichModel).cloneDeep(cloneName)
member(whichCastmember).group(whichGroup).cloneDeep(cloneName)
member(whichCastmember).light(whichLight).cloneDeep(cloneName)
member(whichCastmember).camera(whichCamera).cloneDeep(cloneName)
Description
3D command; creates a copy of the model, group, light, or camera plus all of the following:
• The model resources, shaders, and textures used by the original model or group
• The children of the model, group, light, or camera
• The model resources, shaders, and textures used by the children
Note that
cloneDeep uses more memory and takes more time than the clone command.
Example
This statement creates a copy of the model named Teapot, its children, and the model resources,
shaders, and textures used by Teapot and its children. The variable
teapotCopy is a reference to
the cloned model.
teapotCopy = member("3D World").model("Teapot").cloneDeep("Teapot2")
See also
clone, cloneModelFromCastmember, cloneMotionFromCastmember, loadFile()