- Select Tool Fxed NPE when selecting a child node of a lonked asset in the viewer.
- Move tool fixed bad application of scale when moving.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9647 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 13 years ago
parent 16851eb1d8
commit 9179c9e401
  1. 4
      sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/MoveManager.java
  2. 8
      sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/SelectTool.java

@ -119,10 +119,10 @@ public class MoveManager {
newPos.set(Math.round(newPos.x), Math.round(newPos.y), Math.round(newPos.z));
}
//computing the inverse world transform to get the new localtranslation
//computing the inverse world transform to get the new localtranslation
newPos.subtractLocal(spatial.getParent().getWorldTranslation());
newPos = spatial.getParent().getWorldRotation().inverse().normalizeLocal().multLocal(newPos);
newPos.divideLocal(spatial.getWorldScale());
lastLoc = newPos;
spatial.setLocalTranslation(newPos);

@ -472,8 +472,12 @@ public class SelectTool extends SceneEditTool {
}
private void doSelect() {
SceneViewerTopComponent.findInstance().setActivatedNodes(new org.openide.nodes.Node[]{rootNode.getChild(selec)});
SceneExplorerTopComponent.findInstance().setSelectedNode(rootNode.getChild(selec));
//in case of linked assets the selected nod ein the viewer is not necessarily in the explorer.
JmeSpatial n = rootNode.getChild(selec);
if(n!= null){
SceneViewerTopComponent.findInstance().setActivatedNodes(new org.openide.nodes.Node[]{n});
SceneExplorerTopComponent.findInstance().setSelectedNode(n);
}
}
});
}

Loading…
Cancel
Save