|
|
|
@ -123,12 +123,21 @@ public abstract class SceneEditTool { |
|
|
|
|
/** |
|
|
|
|
* Called when the selected spatial has been modified |
|
|
|
|
* outside of the tool. |
|
|
|
|
* TODO: why? just move the tool where the object is each frame? |
|
|
|
|
*/ |
|
|
|
|
public void updateToolsTransformation() { |
|
|
|
|
|
|
|
|
|
SceneApplication.getApplication().enqueue(new Callable<Object>() { |
|
|
|
|
|
|
|
|
|
public Object call() throws Exception { |
|
|
|
|
doUpdateToolsTransformation(); |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void doUpdateToolsTransformation() { |
|
|
|
|
if (toolController.getSelectedSpatial() != null) { |
|
|
|
|
axisMarker.setLocalTranslation(toolController.getSelectedSpatial().getWorldTranslation()); |
|
|
|
|
axisMarker.setLocalRotation(toolController.getSelectedSpatial().getWorldRotation()); |
|
|
|
@ -137,9 +146,6 @@ public abstract class SceneEditTool { |
|
|
|
|
axisMarker.setLocalTranslation(Vector3f.ZERO); |
|
|
|
|
axisMarker.setLocalRotation(Quaternion.IDENTITY); |
|
|
|
|
} |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|