- activate TerrainGrid when creating SDK Node

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8696 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 7163a7fe0c
commit 17cae68366
  1. 14
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTerrainGrid.java

@ -64,6 +64,13 @@ public class JmeTerrainGrid extends JmeTerrainQuad implements TerrainGridListene
this.geom = spatial;
setName(spatial.getName());
geom.addListener("GuiListener", this);
SceneApplication.getApplication().enqueue(new Callable<Void>() {
public Void call() throws Exception {
geom.initialize(SceneApplication.getApplication().getCamera().getLocation());
return null;
}
});
}
@Override
@ -86,13 +93,6 @@ public class JmeTerrainGrid extends JmeTerrainQuad implements TerrainGridListene
if (obj == null) {
return sheet;
}
SceneApplication.getApplication().enqueue(new Callable<Void>() {
public Void call() throws Exception {
obj.initialize(SceneApplication.getApplication().getCamera().getLocation());
return null;
}
});
// createFields(obj.getClass(), set, obj);

Loading…
Cancel
Save