Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/0.8.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
JavaSaBr committed Dec 30, 2016
2 parents 5643afc + b00997e commit 7d6266b
Show file tree
Hide file tree
Showing 149 changed files with 2,573 additions and 462 deletions.
2 changes: 1 addition & 1 deletion .idea/runConfigurations/Editor.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build-native.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project name="jME SpaceShift Editor" default="do-deploy" basedir="build"
xmlns:fx="javafx:com.sun.javafx.tools.ant">

<property name="editor.version" value="0.8.7" />
<property name="editor.version" value="0.8.8" />

<target name="init-fx-tasks">
<path id="fxant">
Expand Down
Binary file modified libs/jME/jme3-core-3.2.0-sources.jar
Binary file not shown.
Binary file modified libs/jME/jme3-core-3.2.0.jar
Binary file not shown.
Binary file modified libs/jME/jme3-effects-3.2.0-sources.jar
Binary file not shown.
Binary file modified libs/jME/jme3-effects-3.2.0.jar
Binary file not shown.
Binary file modified libs/jME/jme3-lwjgl3-3.2.0-sources.jar
Binary file not shown.
Binary file modified libs/jME/jme3-lwjgl3-3.2.0.jar
Binary file not shown.
Binary file modified libs/tonegod.emitter-2.0.jar
Binary file not shown.
Binary file modified libs/tonegod.emitter-sources-2.0.jar
Binary file not shown.
12 changes: 11 additions & 1 deletion resources/messages/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ OtherSettingsDialogButtonOk=Apply
OtherSettingsDialogButtonCancel=Cancel
BlendToJ3oFileConverterDescription=Convert from .blend to .j3o
FBXToJ3oFileConverterDescription=Convert from .fbx to .j3o
ObjToJ3oFileConverterDescription=Convert from .obj to .j3o
SceneToJ3oFileConverterDescription=Convert from .scene to .j3o
MeshXmlToJ3oFileConverterDescription=Convert from .mesh.xml to .j3o
ModelFileEditorName=Model editor
ModelFileEditorToolObjects=Objects
Expand Down Expand Up @@ -123,6 +127,8 @@ ModelNodeTreeActionDirectionLight=Direction light
ModelNodeTreeActionPointLight=Point light
ModelNodeTreeActionSpotLight=Spot light
ModelNodeTreeActionAnimationPlay=Play
ModelNodeTreeActionAnimationPlaySettings=Play settings
ModelNodeTreeActionAnimationStop=Stop
ModelNodeTreeActionCreateTEmitter=Particles emitter
ModelNodeTreeActionEmitterChangeShape=Change shape
ModelNodeTreeActionEmitterChangeTriangleShape=Triangle
Expand Down Expand Up @@ -226,6 +232,11 @@ RenameDialogNewNameLabel=New name
RenameDialogButtonOk=Rename
RenameDialogButtonCancel=Cancel
PlayAnimationSettingsDialogTitle=Play settings
PlayAnimationSettingsDialogLoopMode=Loop mode
PlayAnimationSettingsDialogSpeed=Speed
PlayAnimationSettingsDialogButtonOk=Apply
QuestionDialogTitle=Question
QuestionDialogButtonOk=Yes
QuestionDialogButtonCancel=No
Expand Down Expand Up @@ -267,7 +278,6 @@ GenerateTangentsDialogTitle=Generate tangents
GenerateTangentsDialogAlgorithmLabel=Type algorithm
GenerateTangentsDialogSplitMirrored=Split vertices with mirrored UVs
GenerateTangentsDialogButtonOk=Generate
GenerateTangentsDialogButtonCancel=Cancel
BoundingVolumeModelPropertyControlName=Model size
BoundingVolumeModelPropertyControlSphere=Sphere
Expand Down
12 changes: 11 additions & 1 deletion resources/messages/messages_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ OtherSettingsDialogButtonOk=Применить
OtherSettingsDialogButtonCancel=Отменить
BlendToJ3oFileConverterDescription=Конверитровать .blend в .j3o
FBXToJ3oFileConverterDescription=Конверитровать .fbx в .j3o
ObjToJ3oFileConverterDescription=Конверитровать .obj в .j3o
SceneToJ3oFileConverterDescription=Конверитровать .scene в .j3o
MeshXmlToJ3oFileConverterDescription=Конверитровать .mesh.xml в .j3o
ModelFileEditorName=Редактор модели
ModelFileEditorToolObjects=Объекты
Expand Down Expand Up @@ -123,6 +127,8 @@ ModelNodeTreeActionDirectionLight=Направленный свет
ModelNodeTreeActionPointLight=Точечный источник света
ModelNodeTreeActionSpotLight=Световое пятно
ModelNodeTreeActionAnimationPlay=Воспроизвести
ModelNodeTreeActionAnimationPlaySettings=Настройки воспроизведения
ModelNodeTreeActionAnimationStop=Остановить
ModelNodeTreeActionCreateTEmitter=Источник частиц
ModelNodeTreeActionEmitterChangeShape=Изменить форму
ModelNodeTreeActionEmitterChangeTriangleShape=Треугольник
Expand Down Expand Up @@ -226,6 +232,11 @@ RenameDialogNewNameLabel=Новое имя
RenameDialogButtonOk=Переименовать
RenameDialogButtonCancel=Отменить
PlayAnimationSettingsDialogTitle=Настройки воспроизведения
PlayAnimationSettingsDialogLoopMode=Режим повторения
PlayAnimationSettingsDialogSpeed=Скорость
PlayAnimationSettingsDialogButtonOk=Применить
QuestionDialogTitle=Вопрос
QuestionDialogButtonOk=Да
QuestionDialogButtonCancel=Нет
Expand Down Expand Up @@ -267,7 +278,6 @@ GenerateTangentsDialogTitle=Генерация тангентов
GenerateTangentsDialogAlgorithmLabel=Тип алгоритма
GenerateTangentsDialogSplitMirrored=Разделять вершины с зеркальным UVs
GenerateTangentsDialogButtonOk=Сгенерировать
GenerateTangentsDialogButtonCancel=Отмена
BoundingVolumeModelPropertyControlName=Размер модели
BoundingVolumeModelPropertyControlSphere=Сфера
Expand Down
Binary file modified resources/ui/css/custom_classes.bss
Binary file not shown.
12 changes: 12 additions & 0 deletions resources/ui/css/custom_classes.css
Original file line number Diff line number Diff line change
Expand Up @@ -341,4 +341,16 @@

.paragraph-box:has-caret {
-fx-background-color: #f2f9fc;
}

.log-severity {
-fx-fill: #f92670;
}

.log-framework {
-fx-fill: #ddb03f;
}

.log-class {
-fx-fill: #62c59f;
}
Binary file modified resources/ui/css/custom_ids.bss
Binary file not shown.
32 changes: 15 additions & 17 deletions resources/ui/css/custom_ids.css
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@

#TextEditorTextArea {
-fx-background-color: -fx-background-background;
-fx-stroke: white;
}

#TextEditorTextArea .caret {
Expand Down Expand Up @@ -411,7 +412,7 @@

#SettingsDialogLabel {
-fx-alignment: center-right;
-fx-min-width: 240;
-fx-min-width: 250;
-fx-pref-width: -fx-min-width;
-fx-max-width: -fx-min-width;
-fx-min-height: 25;
Expand Down Expand Up @@ -687,24 +688,21 @@
-fx-max-width: -fx-min-width;
}

#GenerateTangentsDialogLabel {
-fx-min-height: 24;
-fx-pref-height: -fx-min-height;
-fx-max-height: -fx-min-height;
-fx-min-width: 200;
-fx-pref-width: -fx-min-width;
-fx-max-width: -fx-min-width;
-fx-alignment: center-right;
#JmePreviewManagerImageView {
}

#GenerateTangentsDialogComboBox {
-fx-min-height: 24;
-fx-pref-height: -fx-min-height;
-fx-max-height: -fx-min-height;
-fx-min-width: 250;
-fx-pref-width: -fx-min-width;
-fx-max-width: -fx-min-width;
#LogView {
-fx-background-color: -fx-background-background;
-fx-fill: white;
-fx-text-fill: white;
}

#JmePreviewManagerImageView {
#LogView .caret {
-fx-stroke: white;
}

#LogView .content {
-fx-background-color: -fx-background-background;
-fx-fill: white;
-fx-text-fill: white;
}
Binary file added resources/ui/icons/actions/16/audio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/ui/icons/actions/16/bone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/ui/icons/actions/16/copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/ui/icons/actions/16/cut.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/ui/icons/actions/16/new_file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/ui/icons/actions/16/paste.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/ui/icons/actions/16/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/ui/icons/actions/16/transformation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/ui/icons/actions/16/view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/ui/icons/vibrancy/mimetypes/16/fbx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/com/ss/editor/FileExtensions.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,8 @@ public interface FileExtensions {
String GLSL_FRAGMENT = "frag";

String BLENDER = "blend";
String FBX = "fbx";
String OBJ = "obj";
String SCENE = "scene";
String MESH_XML = "mesh.xml";
}
23 changes: 23 additions & 0 deletions src/com/ss/editor/FolderAssetLocator.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,31 @@
import com.jme3.asset.AssetLocator;
import com.jme3.asset.AssetManager;
import com.jme3.asset.StreamAssetInfo;
import com.jme3.asset.plugins.UrlAssetInfo;
import com.ss.editor.config.EditorConfig;

import java.io.IOException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;

import rlib.util.FileUtils;
import rlib.util.array.Array;
import rlib.util.array.ArrayFactory;

/**
* The implementation of {@link AssetLocator} for loading the data from asset folder.
*
* @author JavaSaBr
*/
public class FolderAssetLocator implements AssetLocator {

private static final Array<String> URL_EXTENSIONS = ArrayFactory.newArray(String.class);

static {
URL_EXTENSIONS.add(FileExtensions.SCENE);
}

@Override
public void setRootPath(String rootPath) {
}
Expand All @@ -35,6 +47,17 @@ public AssetInfo locate(final AssetManager manager, final AssetKey key) {
final Path resolve = currentAsset.resolve(name);
if (!Files.exists(resolve)) return null;

final String extension = FileUtils.getExtension(resolve);

if (URL_EXTENSIONS.contains(extension)) {
try {
final URL url = resolve.toUri().toURL();
return UrlAssetInfo.create(manager, key, url);
} catch (IOException e) {
throw new RuntimeException(e);
}
}

try {
return new StreamAssetInfo(manager, key, newInputStream(resolve));
} catch (IOException e) {
Expand Down
24 changes: 22 additions & 2 deletions src/com/ss/editor/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ public class Messages {
public static final String OTHER_SETTINGS_DIALOG_BUTTON_CANCEL;

public static final String BLEND_TO_J3O_FILE_CONVERTER_DESCRIPTION;
public static final String FBX_TO_J3O_FILE_CONVERTER_DESCRIPTION;
public static final String OBJ_TO_J3O_FILE_CONVERTER_DESCRIPTION;
public static final String SCENE_TO_J3O_FILE_CONVERTER_DESCRIPTION;
public static final String MESH_XML_TO_J3O_FILE_CONVERTER_DESCRIPTION;

public static final String MODEL_FILE_EDITOR_NAME;
public static final String MODEL_FILE_EDITOR_TOOL_OBJECTS;
Expand Down Expand Up @@ -138,6 +142,8 @@ public class Messages {
public static final String MODEL_NODE_TREE_ACTION_POINT_LIGHT;
public static final String MODEL_NODE_TREE_ACTION_SPOT_LIGHT;
public static final String MODEL_NODE_TREE_ACTION_ANIMATION_PLAY;
public static final String MODEL_NODE_TREE_ACTION_ANIMATION_PLAY_SETTINGS;
public static final String MODEL_NODE_TREE_ACTION_ANIMATION_STOP;
public static final String MODEL_NODE_TREE_ACTION_CREATE_TEMITTER;
public static final String MODEL_NODE_TREE_ACTION_EMITTER_CHANGE_SHAPE;
public static final String MODEL_NODE_TREE_ACTION_EMITTER_CHANGE_TRIANGLE_SHAPE;
Expand Down Expand Up @@ -241,6 +247,11 @@ public class Messages {
public static final String RENAME_DIALOG_BUTTON_OK;
public static final String RENAME_DIALOG_BUTTON_CANCEL;

public static final String PLAY_ANIMATION_SETTINDS_DIALOG_TITLE;
public static final String PLAY_ANIMATION_SETTINDS_DIALOG_LOOP_MODE;
public static final String PLAY_ANIMATION_SETTINDS_DIALOG_SPEED;
public static final String PLAY_ANIMATION_SETTINDS_DIALOG_BUTTON_OK;

public static final String QUESTION_DIALOG_TITLE;
public static final String QUESTION_DIALOG_BUTTON_OK;
public static final String QUESTION_DIALOG_BUTTON_CANCEL;
Expand Down Expand Up @@ -282,7 +293,6 @@ public class Messages {
public static final String GENERATE_TANGENTS_DIALOG_ALGORITHM_LABEL;
public static final String GENERATE_TANGENTS_DIALOG_TITLE;
public static final String GENERATE_TANGENTS_DIALOG_BUTTON_OK;
public static final String GENERATE_TANGENTS_DIALOG_BUTTON_CANCEL;

public static final String BOUNDING_VOLUME_MODEL_PROPERTY_CONTROL_NAME;
public static final String BOUNDING_VOLUME_MODEL_PROPERTY_CONTROL_SPHERE;
Expand Down Expand Up @@ -396,6 +406,10 @@ public class Messages {
OTHER_SETTINGS_DIALOG_BUTTON_CANCEL = bundle.getString("OtherSettingsDialogButtonCancel");

BLEND_TO_J3O_FILE_CONVERTER_DESCRIPTION = bundle.getString("BlendToJ3oFileConverterDescription");
FBX_TO_J3O_FILE_CONVERTER_DESCRIPTION = bundle.getString("FBXToJ3oFileConverterDescription");
OBJ_TO_J3O_FILE_CONVERTER_DESCRIPTION = bundle.getString("ObjToJ3oFileConverterDescription");
SCENE_TO_J3O_FILE_CONVERTER_DESCRIPTION = bundle.getString("SceneToJ3oFileConverterDescription");
MESH_XML_TO_J3O_FILE_CONVERTER_DESCRIPTION = bundle.getString("MeshXmlToJ3oFileConverterDescription");

MODEL_FILE_EDITOR_NAME = bundle.getString("ModelFileEditorName");
MODEL_FILE_EDITOR_TOOL_OBJECTS = bundle.getString("ModelFileEditorToolObjects");
Expand Down Expand Up @@ -429,6 +443,8 @@ public class Messages {
MODEL_NODE_TREE_ACTION_POINT_LIGHT = bundle.getString("ModelNodeTreeActionPointLight");
MODEL_NODE_TREE_ACTION_SPOT_LIGHT = bundle.getString("ModelNodeTreeActionSpotLight");
MODEL_NODE_TREE_ACTION_ANIMATION_PLAY = bundle.getString("ModelNodeTreeActionAnimationPlay");
MODEL_NODE_TREE_ACTION_ANIMATION_PLAY_SETTINGS = bundle.getString("ModelNodeTreeActionAnimationPlaySettings");
MODEL_NODE_TREE_ACTION_ANIMATION_STOP = bundle.getString("ModelNodeTreeActionAnimationStop");
MODEL_NODE_TREE_ACTION_CREATE_TEMITTER = bundle.getString("ModelNodeTreeActionCreateTEmitter");
MODEL_NODE_TREE_ACTION_EMITTER_CHANGE_SHAPE = bundle.getString("ModelNodeTreeActionEmitterChangeShape");
MODEL_NODE_TREE_ACTION_EMITTER_CHANGE_TRIANGLE_SHAPE = bundle.getString("ModelNodeTreeActionEmitterChangeTriangleShape");
Expand Down Expand Up @@ -532,6 +548,11 @@ public class Messages {
RENAME_DIALOG_BUTTON_OK = bundle.getString("RenameDialogButtonOk");
RENAME_DIALOG_BUTTON_CANCEL = bundle.getString("RenameDialogButtonCancel");

PLAY_ANIMATION_SETTINDS_DIALOG_TITLE = bundle.getString("PlayAnimationSettingsDialogTitle");
PLAY_ANIMATION_SETTINDS_DIALOG_LOOP_MODE = bundle.getString("PlayAnimationSettingsDialogLoopMode");
PLAY_ANIMATION_SETTINDS_DIALOG_SPEED = bundle.getString("PlayAnimationSettingsDialogSpeed");
PLAY_ANIMATION_SETTINDS_DIALOG_BUTTON_OK = bundle.getString("PlayAnimationSettingsDialogButtonOk");

QUESTION_DIALOG_TITLE = bundle.getString("QuestionDialogTitle");
QUESTION_DIALOG_BUTTON_OK = bundle.getString("QuestionDialogButtonOk");
QUESTION_DIALOG_BUTTON_CANCEL = bundle.getString("QuestionDialogButtonCancel");
Expand Down Expand Up @@ -573,7 +594,6 @@ public class Messages {
GENERATE_TANGENTS_DIALOG_ALGORITHM_LABEL = bundle.getString("GenerateTangentsDialogAlgorithmLabel");
GENERATE_TANGENTS_DIALOG_SPLIT_MIRRORED = bundle.getString("GenerateTangentsDialogSplitMirrored");
GENERATE_TANGENTS_DIALOG_BUTTON_OK = bundle.getString("GenerateTangentsDialogButtonOk");
GENERATE_TANGENTS_DIALOG_BUTTON_CANCEL = bundle.getString("GenerateTangentsDialogButtonCancel");

BOUNDING_VOLUME_MODEL_PROPERTY_CONTROL_NAME = bundle.getString("BoundingVolumeModelPropertyControlName");
BOUNDING_VOLUME_MODEL_PROPERTY_CONTROL_SPHERE = bundle.getString("BoundingVolumeModelPropertyControlSphere");
Expand Down
2 changes: 1 addition & 1 deletion src/com/ss/editor/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public abstract class Config {
public static final String CONFIG_RESOURCE_PATH = "/com/ss/editor/config/config.xml";

public static final String TITLE = "jME3 SpaceShift Editor";
public static final String VERSION = "v.0.8.7";
public static final String VERSION = "v.0.8.8";

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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.ss.editor.control.scene;

import com.jme3.animation.AnimControl;
import com.ss.editor.control.scene.impl.AnimControlEditableGenericObject;
import com.ss.editor.ui.control.model.property.builder.impl.generic.EditableGenericObject;
import com.ss.editor.ui.control.model.property.builder.impl.generic.EditableGenericObjectFactory;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.function.Function;

import rlib.util.dictionary.DictionaryFactory;
import rlib.util.dictionary.ObjectDictionary;

/**
* The implementation of the {@link EditableGenericObjectFactory} for making an editable object of default jME
* controls.
*
* @author JavaSaBr
*/
public class ControlEditableGenericObjectFactory implements EditableGenericObjectFactory {

private static final ObjectDictionary<Class<?>, Function<Object, EditableGenericObject>> CONSTRUCTORS =
DictionaryFactory.newObjectDictionary();

static {
CONSTRUCTORS.put(AnimControl.class, object -> new AnimControlEditableGenericObject((AnimControl) object));
}

private static final EditableGenericObjectFactory INSTANCE = new ControlEditableGenericObjectFactory();

public static EditableGenericObjectFactory getInstance() {
return INSTANCE;
}

@Nullable
@Override
public EditableGenericObject make(@NotNull final Object object) {
final Function<Object, EditableGenericObject> constructor = CONSTRUCTORS.get(object.getClass());
return constructor != null ? constructor.apply(object) : null;
}
}
Loading

0 comments on commit 7d6266b

Please sign in to comment.