I recently changed the selection tool to behave as the manipulation in Blender operates. This should make using the SDK in conjunction with Blender a little easier to get used to.
In summary it operates as so:
Left-Click: to set cursor
Right-Click: to select a spatial (selection now selects the node parent, not the geometry
Middle-Click: rotate the camera
Middle-Click + Shift: pan the camera
G: grab and translate the selected object, left-click to set it when you are done moving
R: rotate an object, left-click to set it when you are done rotating
S: scale an object, left-click to set it when you are done scaling
As with blender you can hit X,Y, or Z to select the axis to translate/rotate/scale along. After typing an axis you can then type in a number, such as -90 to rotate -90 degrees along the y-axis (after you hit enter). Example: G X 30 Enter: moves the object 30 units along the X-axis.
Shift+D: duplicate an object, puts you in grab mode.
X: deletes an object
Hit Esc or right-click to exit a transformation.
Panel options:
You can now have the spatial that you are grabbing/translating snap to objects in the scene, such as the terrain
The grabbing/translation of an object can be restricted to grid (integer) points. This will be configurable in the future.
You can ignore terrain selection when selecting objects
Currently the scene composer does not receive focus if you just right-click or middle-mouse click on the scene, and then the keyboard commands wonāt respond. You have to first left-click then they will work.
Option to hold Ctrl or Alt to have fixed rotations and scales as you manipulate
This is currently in the nightly version of the SDK.
If there is anything else you would like added to the tool please submit a patch and I will get it in there asap. The class is com.jme3.gde.scenecomposer.tools.SelectTool and has lots of documentation, and should be easy to modify.
1- The G key does not seem to work. I hit G with my object selected and move the mouse but nothing happens.
(to be thorough I checked that my G key does type a āgā in a text window. It could have been the reason considering the number of times I spilled some coffee on my keyboard :D)
2- Sometime when I select a geom i have this exception (not every time though)
java.lang.NullPointerException
at com.jme3.gde.scenecomposer.tools.SelectTool.isTerrain(SelectTool.java:791)
at com.jme3.gde.scenecomposer.tools.SelectTool.actionSecondary(SelectTool.java:414)
at com.jme3.gde.scenecomposer.SceneComposerToolController.doEditToolActivatedSecondary(SceneComposerToolController.java:192)
at com.jme3.gde.scenecomposer.ComposerCameraController.checkClick(ComposerCameraController.java:95)
at com.jme3.gde.core.scene.controller.AbstractCameraController.update(AbstractCameraController.java:511)
at com.jme3.app.state.AppStateManager.update(AppStateManager.java:255)
[catch] at com.jme3.gde.core.scene.SceneApplication.update(SceneApplication.java:276)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:149)
at com.jme3.system.lwjgl.LwjglCanvas.runLoop(LwjglCanvas.java:227)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:223)
at java.lang.Thread.run(Thread.java:619)
3- Typing an axis works fine, but entering a value with the num pad does not seem to work. (the view short cuts seems to trigger instead).
More minor issues are :
4- The scene explorer does not refresh when you duplicate an object (and btw the the grab mode does not trigger itself upon duplication, maybe that related with issue 1)
5- The bounding box rotates/scales around its center and not around the center of the geom.
More ānice to haveā features :
6- In blender when initiating a grab/rotate/scale, the right click cancels it (like esc key)
7- The hot key in blender for duplicating is shift+D, why ctrl+shift+D?
Ofc i can help to resolve those issues, let me know if you want me to look into them
okay I fixed 1,2,4,5,6,7. Changes should be in tonightās nightly build.
The selection box can be a little big sometimes since it is generated from the bounding box and then transformed. So if you are rotated and then select the object, the box will be reasonably large, and not a snug fit. But it seems okay for now.
@Sploreg is the blender control is option or set to stone? For me, I am a maya user so its will be difficult for me to adapt to new behavior. Especially, right click selection.
You might want to put the binding information to an external config file, so I might be able to hack my way in.
Itās semi-set right now. The key commands will be flexible in the near future however and you will be able to customize them. However the main order of operations to move, rotate, translate (mouse clicks etc) will remain fixed.
Well for example you would be able to change the G for āgrabā to say āTā. But then it would still be: āT x 30 Enterā to translate 30 along the x-axis. It would just be the key mapping that would be interchangeable, not what the tool does itself.
I canāt tell how much I love these features, since back a while I have to write my own tool to make such a translation, Iām deeply appreciated. A few things I wish can be added to the tool. :
Is there a Mode that user can decide when they want to choose āSelect Node or Select Geometryā <= this is important because sometime the Geometry position when wrongā¦
The scale tool axis-lock by keyboard is cool, but what if we can scale XY,YZ, ZX by just drag in the working plane on the gizmo ( just like drag to move)?
Some time I like the gizmo look extractly the same in every zoom level ( yeah, like in other 3D editors)ā¦ Maybe an option for that tooā¦
The snap feature is simply awesome !!!
May be when the whole things in a good status, you may have time think about the organization of the SceneComposer panel ā¦ Itās now not feel like really organized!
Do you think about using nifty GUI for such tool UI, I did in game translate tool with nifty, and itās feel cool
Yeah and I have a clear view of what code you have added or removed, cause I kept tracking and read them dozen of times, tell me if you need some helpā¦
I meant let set the ToolNode (which I called the gizmo) scale to fit in 100px x 100px square on the screen, when we zoom, the Tool Node 's scaled too, so, even if we are very far from the position, the ToolNode is look extractly the same. Maybe we can have a checkbox for that feature, the implementation of it it fairly simple, we just have to know the Width and Height of the current Camera.
I think you can write the code but if you donāt have time, I will send my code here
P/s: The gizmo is the ToolNode in SceneApplication . I call it gizmo because i also use gizmo in my in-game editing. So I donāt directly use ToolNode