// add listeners
getWorld().getGround().addChildrenListener(new WorldObject.ChildListener() {
public void childAdded(WorldObject wo) {
if (wo instanceof ModelObject) {
final ModelObject modelObject = ((ModelObject) wo);
// final Object model = modelObject.getModel();
final String modelName = modelObject.getName();
try {
//scriptConsole.addVariable(modelName, model);
modelObject.addPropertyChangeListener(Property.REMOVED_FROM_WORLD,
new WorldObject.Listener() {
public void propertyChanged(Property event) {
scriptConsole.removeVariable(modelName);
modelObject.removePropertyChangeListener(Property.REMOVED_FROM_WORLD,
this);
}
});
} catch (Exception e) {