Skip to content

Commit a8f5f69

Browse files
committed
начальная реализация редактора модели и дерево структуры
1 parent 6ba21f5 commit a8f5f69

Some content is hidden

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

46 files changed

+2491
-86
lines changed

resources/messages/messages.properties

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ FileEditorActionSave=Save
1515

1616
TextFileEditorName=Text editor
1717
PostFilterEditorName=Post Filter Viewer
18-
MaterialEditorName=Material Editor
18+
MaterialFileEditorName=Material Editor
1919

2020
PostFilterEditorMaterialListLabel=Material list
2121

2222
AssetEditorDialogTitle=Choose resource
2323
AssetEditorDialogButtonOk=Choose
2424
AssetEditorDialogButtonCancel=Cancel
2525

26-
MaterialEditorMaterialTypeLabel=Material type
26+
MaterialFileEditorMaterialTypeLabel=Material type
2727

28-
MaterialTexturesComponentTitle=Textures
29-
MaterialColorsComponentTitle=Colors
30-
MaterialOtherComponentTitle=Other
31-
MaterialRenderParamsComponentTitle=Settings of render
28+
MaterialFileEditorTexturesComponentTitle=Textures
29+
MaterialFileEditorColorsComponentTitle=Colors
30+
MaterialFileEditorOtherComponentTitle=Other
31+
MaterialFileEditorRenderParamsComponentTitle=Settings of render
3232

3333
Texture2DMaterialParamControlRepeat=Repeat
3434
Texture2DMaterialParamControlFlip=Flip
@@ -69,4 +69,11 @@ GraphicsDialogButtonOk=Apply
6969
GraphicsDialogButtonCancel=Cancel
7070
GraphicsDialogMessage=To apply the settings restart required.
7171

72-
BlendToJ3oFileConverterDescription=Convert from .blend to .j3o
72+
BlendToJ3oFileConverterDescription=Convert from .blend to .j3o
73+
74+
ModelFileEditorName=Model editor
75+
ModelFileEditorNoSky=No sky
76+
ModelFileEditorFastSky=Fast sky
77+
ModelFileEditorNodeTree=Structure
78+
ModelFileEditorProperties=Properties
79+
ModelFileEditorNodeMesh=Mesh

resources/messages/messages_ru.properties

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ FileEditorActionSave=Сохранить
1515

1616
TextFileEditorName=Текстовый редактор
1717
PostFilterEditorName=Просмоторщик пост эффектов
18-
MaterialEditorName=Редактор материалов
18+
MaterialFileEditorName=Редактор материалов
1919

2020
PostFilterEditorMaterialListLabel=Список материалов
2121

2222
AssetEditorDialogTitle=Выбор ресурса
2323
AssetEditorDialogButtonOk=Выбрать
2424
AssetEditorDialogButtonCancel=Отменить
2525

26-
MaterialEditorMaterialTypeLabel=Тип материала
26+
MaterialFileEditorMaterialTypeLabel=Тип материала
2727

28-
MaterialTexturesComponentTitle=Текстуры
29-
MaterialColorsComponentTitle=Цвета
30-
MaterialOtherComponentTitle=Остальные
31-
MaterialRenderParamsComponentTitle=Надстройки Рендера
28+
MaterialFileEditorTexturesComponentTitle=Текстуры
29+
MaterialFileEditorColorsComponentTitle=Цвета
30+
MaterialFileEditorOtherComponentTitle=Остальные
31+
MaterialFileEditorRenderParamsComponentTitle=Надстройки Рендера
3232

3333
Texture2DMaterialParamControlRepeat=Repeat
3434
Texture2DMaterialParamControlFlip=Flip
@@ -69,4 +69,11 @@ GraphicsDialogButtonOk=Применить
6969
GraphicsDialogButtonCancel=Отменить
7070
GraphicsDialogMessage=Для применения настроек необходим рестарт.
7171

72-
BlendToJ3oFileConverterDescription=Конверитровать .blend в .j3o
72+
BlendToJ3oFileConverterDescription=Конверитровать .blend в .j3o
73+
74+
ModelFileEditorName=Редактор модели
75+
ModelFileEditorNoSky=Без фона
76+
ModelFileEditorFastSky=Быстрый фон
77+
ModelFileEditorNodeTree=Структура
78+
ModelFileEditorProperties=Свойства
79+
ModelFileEditorNodeMesh=Сетка

resources/ui/css/base.css

Lines changed: 82 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -332,33 +332,61 @@
332332
-fx-background-color: transparent;
333333
}
334334

335-
/* ScrollBar */
336-
.scroll-bar > .increment-button,
337-
.scroll-bar > .decrement-button {
335+
/** ContextMenu */
336+
.context-menu {
337+
-fx-padding: 0.333333em 0.083333em 0.333333em 0.083333em; /* 4 1 8 1 */
338+
-fx-background-color: -fx-color-panel-900;
339+
-fx-background-insets: 0;
340+
-fx-background-radius: 0;
341+
-fx-effect: -fx-material-shadow-panel;
342+
}
343+
.context-menu .separator:horizontal .line {
344+
-fx-border-color: -fx-box-border transparent transparent transparent;
345+
-fx-border-insets: 1 0 0 0;
346+
}
347+
.context-menu > .scroll-arrow {
348+
-fx-padding: 0.416667em 0.416667em 0.416667em 0.416667em; /* 5 */
338349
-fx-background-color: transparent;
339-
-fx-border-color: transparent;
340-
-fx-border-width: 0;
341-
-fx-padding: 0;
350+
-fx-background-radius: 0;
351+
}
352+
.context-menu > .scroll-arrow:hover {
353+
-fx-background: -fx-selection-bar;
354+
-fx-background-color: -fx-background;
355+
-fx-background-radius: 0;
356+
-fx-text-fill: -fx-text-background-color;
357+
}
358+
.context-menu:show-mnemonics > .mnemonic-underline {
359+
-fx-stroke: -fx-text-fill;
342360
}
343361

344-
.scroll-bar > .increment-button:hover,
345-
.scroll-bar > .decrement-button:hover {
362+
363+
/* ScrollBar */
364+
365+
.scroll-bar:horizontal {
346366
-fx-background-color: transparent;
347-
-fx-border-color: transparent;
348-
-fx-border-width: 0;
349-
-fx-padding: 0;
367+
-fx-background-insets: 0;
350368
}
351-
352-
.scroll-bar:horizontal > .increment-button,
353-
.scroll-bar:horizontal > .decrement-button {
369+
.scroll-bar:vertical {
370+
-fx-background-color: transparent;
354371
-fx-background-insets: 0;
355-
-fx-padding: 0 0 4 0;
356372
}
357-
358-
.scroll-bar:vertical > .increment-button,
359-
.scroll-bar:vertical > .decrement-button {
373+
.scroll-bar:focused {
374+
-fx-background-color: transparent;
375+
-fx-background-insets: 0;
376+
}
377+
.scroll-bar:vertical:focused {
378+
-fx-background-color: transparent;
379+
-fx-background-insets: 0;
380+
}
381+
.scroll-bar > .thumb {
382+
-fx-background-color: -fx-color-500;
383+
-fx-background-insets: 0;
384+
-fx-background-radius: 0;
385+
}
386+
.scroll-bar:vertical > .thumb {
387+
-fx-background-color: -fx-color-500;
360388
-fx-background-insets: 0;
361-
-fx-padding: 0 4 0 0;
389+
-fx-background-radius: 0;
362390
}
363391

364392
.scroll-bar > .increment-button > .increment-arrow,
@@ -378,6 +406,7 @@
378406
-fx-padding: 0;
379407
}
380408

409+
381410
/* SplitPane */
382411

383412
.split-pane {
@@ -386,7 +415,7 @@
386415
}
387416

388417
.split-pane > .split-pane-divider {
389-
-fx-padding: 0 0.15em 0 0.25em; /* 0 3 0 3 */
418+
-fx-padding: 0 0.05em 0 0.05em; /* 0 3 0 3 */
390419
}
391420

392421
.split-pane:horizontal > .split-pane-divider {
@@ -1075,3 +1104,36 @@
10751104
-fx-background-color: transparent;
10761105
-fx-background-radius: 0;
10771106
}
1107+
1108+
/* ComboBox Popup */
1109+
1110+
.combo-box-popup > .list-view {
1111+
-fx-background-color: -fx-color-panel-900;
1112+
-fx-background-insets: 0;
1113+
-fx-background-radius: 0;
1114+
-fx-effect: -fx-material-shadow-panel;
1115+
}
1116+
.combo-box-popup > .list-view > .virtual-flow > .clipped-container > .sheet > .list-cell {
1117+
-fx-padding: 4 0 4 5;
1118+
/* No alternate highlighting */
1119+
-fx-background: transparent;
1120+
-fx-background-insets: 0;
1121+
}
1122+
.combo-box-popup > .list-view > .virtual-flow > .clipped-container > .sheet > .list-cell:filled:hover {
1123+
-fx-background: -fx-accent;
1124+
}
1125+
.combo-box-popup > .list-view > .virtual-flow > .clipped-container > .sheet > .list-cell:filled:selected,
1126+
.combo-box-popup > .list-view > .virtual-flow > .clipped-container > .sheet > .list-cell:filled:selected:hover {
1127+
-fx-background: -fx-accent;
1128+
}
1129+
.combo-box-popup > .list-view > .placeholder > .label {
1130+
-fx-text-fill: derive(-fx-control-inner-background,-30%);
1131+
}
1132+
1133+
/*
1134+
-fx-color-panel-400-transparent: rgba(71, 71, 71, 0.5);
1135+
-fx-color-panel-900: #3d3d3d;
1136+
1137+
-fx-material-shadow-panel: dropshadow(three-pass-box, #1a1a1a, 10, 0.01, 1, 1);
1138+
-fx-material-shadow-control: dropshadow(three-pass-box, #1a1a1a, 4, 0.1,
1139+
*/

resources/ui/css/custom_ids.css

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,13 @@
146146
-fx-max-width: -fx-min-width;
147147
}
148148

149-
#MaterialEditorToolbarLabel {
149+
#MaterialFileEditorToolbarLabel {
150150
-fx-min-height: 28;
151151
-fx-pref-height: -fx-min-height;
152152
-fx-max-height: -fx-min-height;
153153
}
154154

155-
#MaterialEditorToolbarBox {
155+
#MaterialFileEditorToolbarBox {
156156
-fx-min-height: 28;
157157
-fx-pref-height: -fx-min-height;
158158
-fx-max-height: -fx-min-height;
@@ -161,7 +161,7 @@
161161
-fx-max-width: -fx-min-width;
162162
}
163163

164-
#MaterialEditorParameterContainer {
164+
#MaterialFileEditorParameterContainer {
165165
-fx-background-color: -fx-color-panel-200;
166166
-fx-alignment: top-left;
167167
-fx-min-width: 300;
@@ -281,4 +281,33 @@
281281
-fx-min-height: 25;
282282
-fx-pref-height: -fx-min-height;
283283
-fx-max-height: -fx-min-height;
284+
}
285+
286+
#ModelFileEditorParameterContainer {
287+
-fx-background-color: -fx-color-panel-200;
288+
-fx-alignment: top-left;
289+
-fx-min-width: 300;
290+
-fx-pref-width: -fx-min-width;
291+
-fx-max-width: -fx-min-width;
292+
}
293+
294+
#ModelNodeTreeCell {
295+
-fx-min-height: 25;
296+
-fx-pref-height: -fx-min-height;
297+
-fx-max-height: -fx-min-height;
298+
-fx-background: transparent;
299+
}
300+
301+
#ModelNodeTreeCellDragged {
302+
-fx-min-height: 25;
303+
-fx-pref-height: -fx-min-height;
304+
-fx-max-height: -fx-min-height;
305+
-fx-background: -fx-color-A400;
306+
}
307+
308+
#ModelNodeTreeCellDropAvailable {
309+
-fx-min-height: 25;
310+
-fx-pref-height: -fx-min-height;
311+
-fx-max-height: -fx-min-height;
312+
-fx-background: -fx-color-A200;
284313
}
762 Bytes
Loading
472 Bytes
Loading
728 Bytes
Loading
834 Bytes
Loading
930 Bytes
Loading

src/com/ss/editor/Editor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public void simpleInitApp() {
229229
final AudioRenderer audioRenderer = getAudioRenderer();
230230
audioRenderer.setEnvironment(new Environment(Environment.Garage));
231231

232-
viewPort.setBackgroundColor(ColorRGBA.Gray);
232+
viewPort.setBackgroundColor(new ColorRGBA(50 / 255F, 50 / 255F, 50 / 255F, 1F));
233233
cam.setFrustumPerspective(55, (float) cam.getWidth() / cam.getHeight(), 1f, 1000);
234234

235235
final Node guiNode = getGuiNode();

0 commit comments

Comments
 (0)