Skip to content

Commit 7d6266b

Browse files
committed
Merge remote-tracking branch 'origin/0.8.8'
2 parents 5643afc + b00997e commit 7d6266b

File tree

149 files changed

+2573
-462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+2573
-462
lines changed

.idea/runConfigurations/Editor.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build-native.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project name="jME SpaceShift Editor" default="do-deploy" basedir="build"
33
xmlns:fx="javafx:com.sun.javafx.tools.ant">
44

5-
<property name="editor.version" value="0.8.7" />
5+
<property name="editor.version" value="0.8.8" />
66

77
<target name="init-fx-tasks">
88
<path id="fxant">

libs/jME/jme3-core-3.2.0-sources.jar

1012 Bytes
Binary file not shown.

libs/jME/jme3-core-3.2.0.jar

1.59 KB
Binary file not shown.
1 Byte
Binary file not shown.

libs/jME/jme3-effects-3.2.0.jar

7 Bytes
Binary file not shown.
666 Bytes
Binary file not shown.

libs/jME/jme3-lwjgl3-3.2.0.jar

795 Bytes
Binary file not shown.

libs/tonegod.emitter-2.0.jar

258 Bytes
Binary file not shown.

libs/tonegod.emitter-sources-2.0.jar

115 Bytes
Binary file not shown.

resources/messages/messages.properties

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ OtherSettingsDialogButtonOk=Apply
9090
OtherSettingsDialogButtonCancel=Cancel
9191
9292
BlendToJ3oFileConverterDescription=Convert from .blend to .j3o
93+
FBXToJ3oFileConverterDescription=Convert from .fbx to .j3o
94+
ObjToJ3oFileConverterDescription=Convert from .obj to .j3o
95+
SceneToJ3oFileConverterDescription=Convert from .scene to .j3o
96+
MeshXmlToJ3oFileConverterDescription=Convert from .mesh.xml to .j3o
9397
9498
ModelFileEditorName=Model editor
9599
ModelFileEditorToolObjects=Objects
@@ -123,6 +127,8 @@ ModelNodeTreeActionDirectionLight=Direction light
123127
ModelNodeTreeActionPointLight=Point light
124128
ModelNodeTreeActionSpotLight=Spot light
125129
ModelNodeTreeActionAnimationPlay=Play
130+
ModelNodeTreeActionAnimationPlaySettings=Play settings
131+
ModelNodeTreeActionAnimationStop=Stop
126132
ModelNodeTreeActionCreateTEmitter=Particles emitter
127133
ModelNodeTreeActionEmitterChangeShape=Change shape
128134
ModelNodeTreeActionEmitterChangeTriangleShape=Triangle
@@ -226,6 +232,11 @@ RenameDialogNewNameLabel=New name
226232
RenameDialogButtonOk=Rename
227233
RenameDialogButtonCancel=Cancel
228234
235+
PlayAnimationSettingsDialogTitle=Play settings
236+
PlayAnimationSettingsDialogLoopMode=Loop mode
237+
PlayAnimationSettingsDialogSpeed=Speed
238+
PlayAnimationSettingsDialogButtonOk=Apply
239+
229240
QuestionDialogTitle=Question
230241
QuestionDialogButtonOk=Yes
231242
QuestionDialogButtonCancel=No
@@ -267,7 +278,6 @@ GenerateTangentsDialogTitle=Generate tangents
267278
GenerateTangentsDialogAlgorithmLabel=Type algorithm
268279
GenerateTangentsDialogSplitMirrored=Split vertices with mirrored UVs
269280
GenerateTangentsDialogButtonOk=Generate
270-
GenerateTangentsDialogButtonCancel=Cancel
271281
272282
BoundingVolumeModelPropertyControlName=Model size
273283
BoundingVolumeModelPropertyControlSphere=Sphere

resources/messages/messages_ru.properties

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ OtherSettingsDialogButtonOk=Применить
9090
OtherSettingsDialogButtonCancel=Отменить
9191
9292
BlendToJ3oFileConverterDescription=Конверитровать .blend в .j3o
93+
FBXToJ3oFileConverterDescription=Конверитровать .fbx в .j3o
94+
ObjToJ3oFileConverterDescription=Конверитровать .obj в .j3o
95+
SceneToJ3oFileConverterDescription=Конверитровать .scene в .j3o
96+
MeshXmlToJ3oFileConverterDescription=Конверитровать .mesh.xml в .j3o
9397
9498
ModelFileEditorName=Редактор модели
9599
ModelFileEditorToolObjects=Объекты
@@ -123,6 +127,8 @@ ModelNodeTreeActionDirectionLight=Направленный свет
123127
ModelNodeTreeActionPointLight=Точечный источник света
124128
ModelNodeTreeActionSpotLight=Световое пятно
125129
ModelNodeTreeActionAnimationPlay=Воспроизвести
130+
ModelNodeTreeActionAnimationPlaySettings=Настройки воспроизведения
131+
ModelNodeTreeActionAnimationStop=Остановить
126132
ModelNodeTreeActionCreateTEmitter=Источник частиц
127133
ModelNodeTreeActionEmitterChangeShape=Изменить форму
128134
ModelNodeTreeActionEmitterChangeTriangleShape=Треугольник
@@ -226,6 +232,11 @@ RenameDialogNewNameLabel=Новое имя
226232
RenameDialogButtonOk=Переименовать
227233
RenameDialogButtonCancel=Отменить
228234
235+
PlayAnimationSettingsDialogTitle=Настройки воспроизведения
236+
PlayAnimationSettingsDialogLoopMode=Режим повторения
237+
PlayAnimationSettingsDialogSpeed=Скорость
238+
PlayAnimationSettingsDialogButtonOk=Применить
239+
229240
QuestionDialogTitle=Вопрос
230241
QuestionDialogButtonOk=Да
231242
QuestionDialogButtonCancel=Нет
@@ -267,7 +278,6 @@ GenerateTangentsDialogTitle=Генерация тангентов
267278
GenerateTangentsDialogAlgorithmLabel=Тип алгоритма
268279
GenerateTangentsDialogSplitMirrored=Разделять вершины с зеркальным UVs
269280
GenerateTangentsDialogButtonOk=Сгенерировать
270-
GenerateTangentsDialogButtonCancel=Отмена
271281
272282
BoundingVolumeModelPropertyControlName=Размер модели
273283
BoundingVolumeModelPropertyControlSphere=Сфера

resources/ui/css/custom_classes.bss

211 Bytes
Binary file not shown.

resources/ui/css/custom_classes.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,4 +341,16 @@
341341

342342
.paragraph-box:has-caret {
343343
-fx-background-color: #f2f9fc;
344+
}
345+
346+
.log-severity {
347+
-fx-fill: #f92670;
348+
}
349+
350+
.log-framework {
351+
-fx-fill: #ddb03f;
352+
}
353+
354+
.log-class {
355+
-fx-fill: #62c59f;
344356
}

resources/ui/css/custom_ids.bss

109 Bytes
Binary file not shown.

resources/ui/css/custom_ids.css

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116

117117
#TextEditorTextArea {
118118
-fx-background-color: -fx-background-background;
119+
-fx-stroke: white;
119120
}
120121

121122
#TextEditorTextArea .caret {
@@ -411,7 +412,7 @@
411412

412413
#SettingsDialogLabel {
413414
-fx-alignment: center-right;
414-
-fx-min-width: 240;
415+
-fx-min-width: 250;
415416
-fx-pref-width: -fx-min-width;
416417
-fx-max-width: -fx-min-width;
417418
-fx-min-height: 25;
@@ -687,24 +688,21 @@
687688
-fx-max-width: -fx-min-width;
688689
}
689690

690-
#GenerateTangentsDialogLabel {
691-
-fx-min-height: 24;
692-
-fx-pref-height: -fx-min-height;
693-
-fx-max-height: -fx-min-height;
694-
-fx-min-width: 200;
695-
-fx-pref-width: -fx-min-width;
696-
-fx-max-width: -fx-min-width;
697-
-fx-alignment: center-right;
691+
#JmePreviewManagerImageView {
698692
}
699693

700-
#GenerateTangentsDialogComboBox {
701-
-fx-min-height: 24;
702-
-fx-pref-height: -fx-min-height;
703-
-fx-max-height: -fx-min-height;
704-
-fx-min-width: 250;
705-
-fx-pref-width: -fx-min-width;
706-
-fx-max-width: -fx-min-width;
694+
#LogView {
695+
-fx-background-color: -fx-background-background;
696+
-fx-fill: white;
697+
-fx-text-fill: white;
707698
}
708699

709-
#JmePreviewManagerImageView {
700+
#LogView .caret {
701+
-fx-stroke: white;
702+
}
703+
704+
#LogView .content {
705+
-fx-background-color: -fx-background-background;
706+
-fx-fill: white;
707+
-fx-text-fill: white;
710708
}
552 Bytes
Loading
423 Bytes
Loading
538 Bytes
Loading

resources/ui/icons/actions/16/cut.png

496 Bytes
Loading
497 Bytes
Loading
442 Bytes
Loading
594 Bytes
Loading
555 Bytes
Loading
503 Bytes
Loading
1.57 KB
Loading

src/com/ss/editor/FileExtensions.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,8 @@ public interface FileExtensions {
3030
String GLSL_FRAGMENT = "frag";
3131

3232
String BLENDER = "blend";
33+
String FBX = "fbx";
34+
String OBJ = "obj";
35+
String SCENE = "scene";
36+
String MESH_XML = "mesh.xml";
3337
}

src/com/ss/editor/FolderAssetLocator.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,31 @@
77
import com.jme3.asset.AssetLocator;
88
import com.jme3.asset.AssetManager;
99
import com.jme3.asset.StreamAssetInfo;
10+
import com.jme3.asset.plugins.UrlAssetInfo;
1011
import com.ss.editor.config.EditorConfig;
1112

1213
import java.io.IOException;
14+
import java.net.URL;
1315
import java.nio.file.Files;
1416
import java.nio.file.Path;
1517

18+
import rlib.util.FileUtils;
19+
import rlib.util.array.Array;
20+
import rlib.util.array.ArrayFactory;
21+
1622
/**
1723
* The implementation of {@link AssetLocator} for loading the data from asset folder.
1824
*
1925
* @author JavaSaBr
2026
*/
2127
public class FolderAssetLocator implements AssetLocator {
2228

29+
private static final Array<String> URL_EXTENSIONS = ArrayFactory.newArray(String.class);
30+
31+
static {
32+
URL_EXTENSIONS.add(FileExtensions.SCENE);
33+
}
34+
2335
@Override
2436
public void setRootPath(String rootPath) {
2537
}
@@ -35,6 +47,17 @@ public AssetInfo locate(final AssetManager manager, final AssetKey key) {
3547
final Path resolve = currentAsset.resolve(name);
3648
if (!Files.exists(resolve)) return null;
3749

50+
final String extension = FileUtils.getExtension(resolve);
51+
52+
if (URL_EXTENSIONS.contains(extension)) {
53+
try {
54+
final URL url = resolve.toUri().toURL();
55+
return UrlAssetInfo.create(manager, key, url);
56+
} catch (IOException e) {
57+
throw new RuntimeException(e);
58+
}
59+
}
60+
3861
try {
3962
return new StreamAssetInfo(manager, key, newInputStream(resolve));
4063
} catch (IOException e) {

src/com/ss/editor/Messages.java

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ public class Messages {
105105
public static final String OTHER_SETTINGS_DIALOG_BUTTON_CANCEL;
106106

107107
public static final String BLEND_TO_J3O_FILE_CONVERTER_DESCRIPTION;
108+
public static final String FBX_TO_J3O_FILE_CONVERTER_DESCRIPTION;
109+
public static final String OBJ_TO_J3O_FILE_CONVERTER_DESCRIPTION;
110+
public static final String SCENE_TO_J3O_FILE_CONVERTER_DESCRIPTION;
111+
public static final String MESH_XML_TO_J3O_FILE_CONVERTER_DESCRIPTION;
108112

109113
public static final String MODEL_FILE_EDITOR_NAME;
110114
public static final String MODEL_FILE_EDITOR_TOOL_OBJECTS;
@@ -138,6 +142,8 @@ public class Messages {
138142
public static final String MODEL_NODE_TREE_ACTION_POINT_LIGHT;
139143
public static final String MODEL_NODE_TREE_ACTION_SPOT_LIGHT;
140144
public static final String MODEL_NODE_TREE_ACTION_ANIMATION_PLAY;
145+
public static final String MODEL_NODE_TREE_ACTION_ANIMATION_PLAY_SETTINGS;
146+
public static final String MODEL_NODE_TREE_ACTION_ANIMATION_STOP;
141147
public static final String MODEL_NODE_TREE_ACTION_CREATE_TEMITTER;
142148
public static final String MODEL_NODE_TREE_ACTION_EMITTER_CHANGE_SHAPE;
143149
public static final String MODEL_NODE_TREE_ACTION_EMITTER_CHANGE_TRIANGLE_SHAPE;
@@ -241,6 +247,11 @@ public class Messages {
241247
public static final String RENAME_DIALOG_BUTTON_OK;
242248
public static final String RENAME_DIALOG_BUTTON_CANCEL;
243249

250+
public static final String PLAY_ANIMATION_SETTINDS_DIALOG_TITLE;
251+
public static final String PLAY_ANIMATION_SETTINDS_DIALOG_LOOP_MODE;
252+
public static final String PLAY_ANIMATION_SETTINDS_DIALOG_SPEED;
253+
public static final String PLAY_ANIMATION_SETTINDS_DIALOG_BUTTON_OK;
254+
244255
public static final String QUESTION_DIALOG_TITLE;
245256
public static final String QUESTION_DIALOG_BUTTON_OK;
246257
public static final String QUESTION_DIALOG_BUTTON_CANCEL;
@@ -282,7 +293,6 @@ public class Messages {
282293
public static final String GENERATE_TANGENTS_DIALOG_ALGORITHM_LABEL;
283294
public static final String GENERATE_TANGENTS_DIALOG_TITLE;
284295
public static final String GENERATE_TANGENTS_DIALOG_BUTTON_OK;
285-
public static final String GENERATE_TANGENTS_DIALOG_BUTTON_CANCEL;
286296

287297
public static final String BOUNDING_VOLUME_MODEL_PROPERTY_CONTROL_NAME;
288298
public static final String BOUNDING_VOLUME_MODEL_PROPERTY_CONTROL_SPHERE;
@@ -396,6 +406,10 @@ public class Messages {
396406
OTHER_SETTINGS_DIALOG_BUTTON_CANCEL = bundle.getString("OtherSettingsDialogButtonCancel");
397407

398408
BLEND_TO_J3O_FILE_CONVERTER_DESCRIPTION = bundle.getString("BlendToJ3oFileConverterDescription");
409+
FBX_TO_J3O_FILE_CONVERTER_DESCRIPTION = bundle.getString("FBXToJ3oFileConverterDescription");
410+
OBJ_TO_J3O_FILE_CONVERTER_DESCRIPTION = bundle.getString("ObjToJ3oFileConverterDescription");
411+
SCENE_TO_J3O_FILE_CONVERTER_DESCRIPTION = bundle.getString("SceneToJ3oFileConverterDescription");
412+
MESH_XML_TO_J3O_FILE_CONVERTER_DESCRIPTION = bundle.getString("MeshXmlToJ3oFileConverterDescription");
399413

400414
MODEL_FILE_EDITOR_NAME = bundle.getString("ModelFileEditorName");
401415
MODEL_FILE_EDITOR_TOOL_OBJECTS = bundle.getString("ModelFileEditorToolObjects");
@@ -429,6 +443,8 @@ public class Messages {
429443
MODEL_NODE_TREE_ACTION_POINT_LIGHT = bundle.getString("ModelNodeTreeActionPointLight");
430444
MODEL_NODE_TREE_ACTION_SPOT_LIGHT = bundle.getString("ModelNodeTreeActionSpotLight");
431445
MODEL_NODE_TREE_ACTION_ANIMATION_PLAY = bundle.getString("ModelNodeTreeActionAnimationPlay");
446+
MODEL_NODE_TREE_ACTION_ANIMATION_PLAY_SETTINGS = bundle.getString("ModelNodeTreeActionAnimationPlaySettings");
447+
MODEL_NODE_TREE_ACTION_ANIMATION_STOP = bundle.getString("ModelNodeTreeActionAnimationStop");
432448
MODEL_NODE_TREE_ACTION_CREATE_TEMITTER = bundle.getString("ModelNodeTreeActionCreateTEmitter");
433449
MODEL_NODE_TREE_ACTION_EMITTER_CHANGE_SHAPE = bundle.getString("ModelNodeTreeActionEmitterChangeShape");
434450
MODEL_NODE_TREE_ACTION_EMITTER_CHANGE_TRIANGLE_SHAPE = bundle.getString("ModelNodeTreeActionEmitterChangeTriangleShape");
@@ -532,6 +548,11 @@ public class Messages {
532548
RENAME_DIALOG_BUTTON_OK = bundle.getString("RenameDialogButtonOk");
533549
RENAME_DIALOG_BUTTON_CANCEL = bundle.getString("RenameDialogButtonCancel");
534550

551+
PLAY_ANIMATION_SETTINDS_DIALOG_TITLE = bundle.getString("PlayAnimationSettingsDialogTitle");
552+
PLAY_ANIMATION_SETTINDS_DIALOG_LOOP_MODE = bundle.getString("PlayAnimationSettingsDialogLoopMode");
553+
PLAY_ANIMATION_SETTINDS_DIALOG_SPEED = bundle.getString("PlayAnimationSettingsDialogSpeed");
554+
PLAY_ANIMATION_SETTINDS_DIALOG_BUTTON_OK = bundle.getString("PlayAnimationSettingsDialogButtonOk");
555+
535556
QUESTION_DIALOG_TITLE = bundle.getString("QuestionDialogTitle");
536557
QUESTION_DIALOG_BUTTON_OK = bundle.getString("QuestionDialogButtonOk");
537558
QUESTION_DIALOG_BUTTON_CANCEL = bundle.getString("QuestionDialogButtonCancel");
@@ -573,7 +594,6 @@ public class Messages {
573594
GENERATE_TANGENTS_DIALOG_ALGORITHM_LABEL = bundle.getString("GenerateTangentsDialogAlgorithmLabel");
574595
GENERATE_TANGENTS_DIALOG_SPLIT_MIRRORED = bundle.getString("GenerateTangentsDialogSplitMirrored");
575596
GENERATE_TANGENTS_DIALOG_BUTTON_OK = bundle.getString("GenerateTangentsDialogButtonOk");
576-
GENERATE_TANGENTS_DIALOG_BUTTON_CANCEL = bundle.getString("GenerateTangentsDialogButtonCancel");
577597

578598
BOUNDING_VOLUME_MODEL_PROPERTY_CONTROL_NAME = bundle.getString("BoundingVolumeModelPropertyControlName");
579599
BOUNDING_VOLUME_MODEL_PROPERTY_CONTROL_SPHERE = bundle.getString("BoundingVolumeModelPropertyControlSphere");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public abstract class Config {
2525
public static final String CONFIG_RESOURCE_PATH = "/com/ss/editor/config/config.xml";
2626

2727
public static final String TITLE = "jME3 SpaceShift Editor";
28-
public static final String VERSION = "v.0.8.7";
28+
public static final String VERSION = "v.0.8.8";
2929

3030
public static final String SS_FOLDER_IN_USER_HOME = ".jme3-spaceshift-editor";
3131

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package com.ss.editor.control.scene;
2+
3+
import com.jme3.animation.AnimControl;
4+
import com.ss.editor.control.scene.impl.AnimControlEditableGenericObject;
5+
import com.ss.editor.ui.control.model.property.builder.impl.generic.EditableGenericObject;
6+
import com.ss.editor.ui.control.model.property.builder.impl.generic.EditableGenericObjectFactory;
7+
8+
import org.jetbrains.annotations.NotNull;
9+
import org.jetbrains.annotations.Nullable;
10+
11+
import java.util.function.Function;
12+
13+
import rlib.util.dictionary.DictionaryFactory;
14+
import rlib.util.dictionary.ObjectDictionary;
15+
16+
/**
17+
* The implementation of the {@link EditableGenericObjectFactory} for making an editable object of default jME
18+
* controls.
19+
*
20+
* @author JavaSaBr
21+
*/
22+
public class ControlEditableGenericObjectFactory implements EditableGenericObjectFactory {
23+
24+
private static final ObjectDictionary<Class<?>, Function<Object, EditableGenericObject>> CONSTRUCTORS =
25+
DictionaryFactory.newObjectDictionary();
26+
27+
static {
28+
CONSTRUCTORS.put(AnimControl.class, object -> new AnimControlEditableGenericObject((AnimControl) object));
29+
}
30+
31+
private static final EditableGenericObjectFactory INSTANCE = new ControlEditableGenericObjectFactory();
32+
33+
public static EditableGenericObjectFactory getInstance() {
34+
return INSTANCE;
35+
}
36+
37+
@Nullable
38+
@Override
39+
public EditableGenericObject make(@NotNull final Object object) {
40+
final Function<Object, EditableGenericObject> constructor = CONSTRUCTORS.get(object.getClass());
41+
return constructor != null ? constructor.apply(object) : null;
42+
}
43+
}

0 commit comments

Comments
 (0)