Skip to content

Commit 609aca8

Browse files
committed
Finish 1.6.1
2 parents 70e5fdb + 77213cd commit 609aca8

35 files changed

+689
-200
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# jMonkeyBuilder 1.6.0 #
1+
# jMonkeyBuilder 1.6.1 #
22
### It's 3D Editor to prepare/work/create graphics content for jMonkeyEngine 3.2 ###
33

44
[![Join the chat at https://gitter.im/jME3-SpaceShift-Editor/Lobby](https://badges.gitter.im/jME3-SpaceShift-Editor/Lobby.svg)](https://gitter.im/jME3-SpaceShift-Editor/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

app.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.0
1+
1.6.1

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ apply plugin: 'idea'
1313
apply plugin: 'org.junit.platform.gradle.plugin'
1414

1515
group = 'com.spaceshift'
16-
version = '1.6.0'
16+
version = '1.6.1'
1717

1818
sourceCompatibility = 1.8
1919
targetCompatibility = 1.8
@@ -28,7 +28,7 @@ ext.applicationMainClass = "com.ss.editor.JfxApplication"
2828
ext.applicationVendor = "[email protected]"
2929
ext.applicationTitle = "jMonkeyBuilder"
3030
ext.jmeVersion = "v3.3.dev-SNAPSHOT"
31-
ext.jmbExtVersion = "1.9.7"
31+
ext.jmbExtVersion = "1.9.8"
3232
ext.jme3_xbuf_version = '0.9.1'
3333
ext.junitPlatformVersion = "1.0.0"
3434
ext.junitJupiterVersion = "5.0.0"

src/main/java/com/ss/editor/JmeApplication.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,9 @@ public void update() {
413413
//System.out.println(cam.getRotation());
414414
//System.out.println(cam.getLocation());
415415

416-
super.update();
416+
if (Config.ENABLE_3D) {
417+
super.update();
418+
}
417419

418420
} catch (final AssetNotFoundException | RendererException | AssertionError | ArrayIndexOutOfBoundsException |
419421
NullPointerException | StackOverflowError | IllegalStateException | UnsupportedOperationException e) {

src/main/java/com/ss/editor/config/Config.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public final class Config {
4242
* The editor's version.
4343
*/
4444
@NotNull
45-
public static final Version APP_VERSION = new Version("1.6.0");
45+
public static final Version APP_VERSION = new Version("1.6.1");
4646

4747
/**
4848
* The string version.
@@ -114,6 +114,11 @@ public final class Config {
114114
*/
115115
public static boolean ENABLE_PBR;
116116

117+
/**
118+
* The flag to enable 3D part of this editor.
119+
*/
120+
public static boolean ENABLE_3D;
121+
117122
static {
118123

119124
final GraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
@@ -128,6 +133,7 @@ public final class Config {
128133
DEV_DEBUG_JFX_KEY_INPUT = vars.getBoolean("Dev.jfxKeyInput", false);
129134
DEV_DEBUG_JFX = vars.getBoolean("Dev.debugJFX", false);
130135
ENABLE_PBR = vars.getBoolean("Graphics.enablePBR", true);
136+
ENABLE_3D = vars.getBoolean("Graphics.enable3D", true);
131137

132138
GRAPHICS_DEVICE = device;
133139
OPERATING_SYSTEM = new OperatingSystem();

src/main/java/com/ss/editor/control/transform/AbstractTransformControl.java

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import com.jme3.scene.Geometry;
88
import com.jme3.scene.Node;
99
import com.jme3.scene.control.AbstractControl;
10+
import com.ss.editor.annotation.FromAnyThread;
11+
import com.ss.editor.annotation.JmeThread;
1012
import com.ss.editor.control.transform.EditorTransformSupport.PickedAxis;
1113
import com.ss.rlib.logging.Logger;
1214
import com.ss.rlib.logging.LoggerManager;
@@ -49,11 +51,6 @@ public abstract class AbstractTransformControl extends AbstractControl implement
4951
@NotNull
5052
private final Node childNode;
5153

52-
/**
53-
* Instantiates a new Rotation tool control.
54-
*
55-
* @param editorControl the editor control
56-
*/
5754
public AbstractTransformControl(@NotNull final EditorTransformSupport editorControl) {
5855
this.editorControl = editorControl;
5956
this.collisionPlane = notNull(editorControl.getCollisionPlane());
@@ -63,38 +60,47 @@ public AbstractTransformControl(@NotNull final EditorTransformSupport editorCont
6360
}
6461

6562
/**
63+
* Get the collision plane.
64+
*
6665
* @return the collision plane.
6766
*/
68-
@NotNull
69-
protected Node getCollisionPlane() {
67+
@JmeThread
68+
protected @NotNull Node getCollisionPlane() {
7069
return collisionPlane;
7170
}
7271

7372
/**
73+
* Get the scene editor controller.
74+
*
7475
* @return the scene editor controller.
7576
*/
76-
@NotNull
77-
protected EditorTransformSupport getEditorControl() {
77+
@JmeThread
78+
protected @NotNull EditorTransformSupport getEditorControl() {
7879
return editorControl;
7980
}
8081

8182
/**
83+
* Get the parent node.
84+
*
8285
* @return the parent node.
8386
*/
84-
@NotNull
85-
protected Node getParentNode() {
87+
@JmeThread
88+
protected @NotNull Node getParentNode() {
8689
return parentNode;
8790
}
8891

8992
/**
93+
* Get the child node.
94+
*
9095
* @return the child node.
9196
*/
92-
@NotNull
93-
protected Node getChildNode() {
97+
@JmeThread
98+
protected @NotNull Node getChildNode() {
9499
return childNode;
95100
}
96101

97102
@Override
103+
@JmeThread
98104
public void setCollisionPlane(@NotNull final CollisionResult collisionResult) {
99105

100106
final EditorTransformSupport editorControl = getEditorControl();
@@ -113,6 +119,7 @@ public void setCollisionPlane(@NotNull final CollisionResult collisionResult) {
113119
collisionPlane.setLocalRotation(Quaternion.IDENTITY);
114120
}
115121

122+
@JmeThread
116123
protected void detectPickedAxis(@NotNull final EditorTransformSupport editorControl,
117124
@NotNull final CollisionResult collisionResult) {
118125

@@ -128,18 +135,33 @@ protected void detectPickedAxis(@NotNull final EditorTransformSupport editorCont
128135
}
129136
}
130137

131-
@NotNull
132-
protected String getNodeX() {
138+
/**
139+
* Get the name of node X.
140+
*
141+
* @return the name of node X.
142+
*/
143+
@FromAnyThread
144+
protected @NotNull String getNodeX() {
133145
throw new RuntimeException();
134146
}
135147

136-
@NotNull
137-
protected String getNodeY() {
148+
/**
149+
* Get the name of node Y.
150+
*
151+
* @return the name of node Y.
152+
*/
153+
@FromAnyThread
154+
protected @NotNull String getNodeY() {
138155
throw new RuntimeException();
139156
}
140157

141-
@NotNull
142-
protected String getNodeZ() {
158+
/**
159+
* Get the name of node Z.
160+
*
161+
* @return the name of node Z.
162+
*/
163+
@FromAnyThread
164+
protected @NotNull String getNodeZ() {
143165
throw new RuntimeException();
144166
}
145167
}

src/main/java/com/ss/editor/control/transform/EditorTransformSupport.java

Lines changed: 30 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ public void prepareToRotate(@NotNull final Node parent, @NotNull final Node chil
101101
child.setLocalRotation(transform.getRotation());
102102
}
103103

104-
@NotNull
105104
@Override
106105
@JmeThread
107-
protected Vector3f getScaleAxis(@NotNull final Transform transform, @NotNull final PickedAxis pickedAxis,
108-
@NotNull final Camera camera) {
106+
protected @NotNull Vector3f getScaleAxis(@NotNull final Transform transform,
107+
@NotNull final PickedAxis pickedAxis,
108+
@NotNull final Camera camera) {
109109

110110
final LocalObjects local = LocalObjects.get();
111111

@@ -126,10 +126,11 @@ public void prepareToMove(@NotNull final Node parent, @NotNull final Node child,
126126
child.setLocalRotation(transform.getRotation());
127127
}
128128

129-
@NotNull
129+
130130
@Override
131131
@JmeThread
132-
public Quaternion getToolRotation(@NotNull final Transform transform, @NotNull final Camera camera) {
132+
public @NotNull Quaternion getToolRotation(@NotNull final Transform transform,
133+
@NotNull final Camera camera) {
133134
return Quaternion.IDENTITY;
134135
}
135136
},
@@ -146,11 +147,11 @@ public void prepareToRotate(@NotNull final Node parent, @NotNull final Node chil
146147
child.setLocalRotation(transform.getRotation());
147148
}
148149

149-
@NotNull
150150
@Override
151151
@JmeThread
152-
protected Vector3f getScaleAxis(@NotNull final Transform transform, @NotNull final PickedAxis pickedAxis,
153-
@NotNull final Camera camera) {
152+
protected @NotNull Vector3f getScaleAxis(@NotNull final Transform transform,
153+
@NotNull final PickedAxis pickedAxis,
154+
@NotNull final Camera camera) {
154155

155156
final LocalObjects local = LocalObjects.get();
156157

@@ -161,11 +162,11 @@ protected Vector3f getScaleAxis(@NotNull final Transform transform, @NotNull fin
161162
} else return getLeft(camera.getRotation(), local.nextVector());
162163
}
163164

164-
@NotNull
165165
@Override
166166
@JmeThread
167-
protected Vector3f getPickedVector(@NotNull final Transform transform, @NotNull final PickedAxis pickedAxis,
168-
@NotNull final Camera camera) {
167+
protected @NotNull Vector3f getPickedVector(@NotNull final Transform transform,
168+
@NotNull final PickedAxis pickedAxis,
169+
@NotNull final Camera camera) {
169170

170171
final LocalObjects local = LocalObjects.get();
171172

@@ -186,20 +187,19 @@ public void prepareToMove(@NotNull final Node parent, @NotNull final Node child,
186187
child.setLocalRotation(Quaternion.IDENTITY);
187188
}
188189

189-
@NotNull
190190
@Override
191191
@JmeThread
192-
public Quaternion getToolRotation(@NotNull final Transform transform, @NotNull final Camera camera) {
192+
public @NotNull Quaternion getToolRotation(@NotNull final Transform transform,
193+
@NotNull final Camera camera) {
193194
return camera.getRotation();
194195
}
195196
};
196197

197198
@NotNull
198199
private static final TransformationMode[] VALUES = values();
199200

200-
@NotNull
201201
@FromAnyThread
202-
public static TransformationMode valueOf(final int index) {
202+
public static @NotNull TransformationMode valueOf(final int index) {
203203
return VALUES[index];
204204
}
205205

@@ -210,9 +210,8 @@ public static TransformationMode valueOf(final int index) {
210210
* @param camera the camera.
211211
* @return the tool rotation.
212212
*/
213-
@NotNull
214213
@JmeThread
215-
public Quaternion getToolRotation(@NotNull final Transform transform, @NotNull final Camera camera) {
214+
public @NotNull Quaternion getToolRotation(@NotNull final Transform transform, @NotNull final Camera camera) {
216215
return transform.getRotation();
217216
}
218217

@@ -271,16 +270,18 @@ public void prepareToMove(@NotNull final Node parent, @NotNull final Node child,
271270
* @param camera the camera.
272271
* @return the axis vector.
273272
*/
274-
@NotNull
275273
@JmeThread
276-
protected Vector3f getPickedVector(@NotNull final Transform transform, @NotNull final PickedAxis pickedAxis,
277-
@NotNull final Camera camera) {
274+
protected @NotNull Vector3f getPickedVector(@NotNull final Transform transform,
275+
@NotNull final PickedAxis pickedAxis,
276+
@NotNull final Camera camera) {
278277

279278
if (pickedAxis == PickedAxis.Y) {
280279
return Vector3f.UNIT_Y;
281280
} else if (pickedAxis == PickedAxis.Z) {
282281
return Vector3f.UNIT_Z;
283-
} else return Vector3f.UNIT_X;
282+
} else {
283+
return Vector3f.UNIT_X;
284+
}
284285
}
285286

286287
/**
@@ -291,10 +292,9 @@ protected Vector3f getPickedVector(@NotNull final Transform transform, @NotNull
291292
* @param camera the camera.
292293
* @return the axis vector.
293294
*/
294-
@NotNull
295295
@JmeThread
296-
protected Vector3f getScaleAxis(@NotNull final Transform transform, @NotNull final PickedAxis pickedAxis,
297-
@NotNull final Camera camera) {
296+
protected @NotNull Vector3f getScaleAxis(@NotNull final Transform transform,
297+
@NotNull final PickedAxis pickedAxis, @NotNull final Camera camera) {
298298

299299
if (pickedAxis == PickedAxis.Y) {
300300
return Vector3f.UNIT_Y;
@@ -309,9 +309,8 @@ protected Vector3f getScaleAxis(@NotNull final Transform transform, @NotNull fin
309309
*
310310
* @return the center of transformation.
311311
*/
312-
@Nullable
313312
@JmeThread
314-
Transform getTransformCenter();
313+
@Nullable Transform getTransformCenter();
315314

316315
/**
317316
* Sets picked axis.
@@ -326,27 +325,24 @@ protected Vector3f getScaleAxis(@NotNull final Transform transform, @NotNull fin
326325
*
327326
* @return the picked axis.
328327
*/
329-
@NotNull
330328
@JmeThread
331-
PickedAxis getPickedAxis();
329+
@NotNull PickedAxis getPickedAxis();
332330

333331
/**
334332
* Gets the transform mode.
335333
*
336334
* @return the transform mode.
337335
*/
338-
@NotNull
339336
@JmeThread
340-
EditorTransformSupport.TransformationMode getTransformationMode();
337+
@NotNull EditorTransformSupport.TransformationMode getTransformationMode();
341338

342339
/**
343340
* Gets collision plane.
344341
*
345342
* @return the collision plane.
346343
*/
347-
@Nullable
348344
@JmeThread
349-
Node getCollisionPlane();
345+
@Nullable Node getCollisionPlane();
350346

351347
/**
352348
* Set delta of transformation.
@@ -401,9 +397,8 @@ protected Vector3f getScaleAxis(@NotNull final Transform transform, @NotNull fin
401397
*
402398
* @return the model to transform.
403399
*/
404-
@Nullable
405400
@JmeThread
406-
Spatial getToTransform();
401+
@Nullable Spatial getToTransform();
407402

408403
/**
409404
* Notify transformed.
@@ -418,7 +413,6 @@ protected Vector3f getScaleAxis(@NotNull final Transform transform, @NotNull fin
418413
*
419414
* @return the camera.
420415
*/
421-
@NotNull
422416
@JmeThread
423-
Camera getCamera();
417+
@NotNull Camera getCamera();
424418
}

0 commit comments

Comments
 (0)