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