MergeSimulationEnvironments
 
 
 

MergeSimulationEnvironments

Introduced

v4.2

Description

Takes all objects which are in one SimulationEnvironment and puts them in another. If multiple simulationenvironments are selected then all simulationenvironments will be merged into the one which was selected first. The simulationenvironments which where merged will be deleted.

This command is useful in the case you want to assemble a Rigid Body Simulation from simulation contained in different models. When you import the different models a simulationenvironment will be created for each model. You can then make all models interact together in a single simulation using this command.

Scripting Syntax

MergeSimulationEnvironments( SimulationEnvironments );

Parameters

Parameter Type Description
SimulationEnvironments String "List of environments to merge into the first simulationenvironment.

Default Value: Current selection

Examples

JScript Example

NewScene(null, false);
CreatePrim("Cone", "MeshSurface", null, null);
CreateActiveRigidBody("cone");
CreatePrim("Cylinder", "MeshSurface", null, null);
Translate(null, -6.41985129361203, 0, 0, siRelative, siView, siObj, siXYZ, null, null, null, null, null, null, null, null, null, 0);
CreateEnvironment(null, null);
CreateActiveRigidBody("cylinder");
CreateForce("Gravity", "");
SelectObj("Environments.List.Environment", null, null);
AddToSelection("Environments.Environment2", null, null);
//Merge the second simulationenvironment in the first one.
MergeSimulationEnvironments("Environments.List.Environment,Environments.Environment2");

See Also

CreateEnvironment Scene.SimulationEnvironments Scene.ActiveSimulationEnvironment