Skip to content

Commit

Permalink
Merge pull request #8 from SeriousAlexej/dev
Browse files Browse the repository at this point in the history
Prepare new Serious Editor (with property tree) for release
  • Loading branch information
SeriousAlexej committed Jun 15, 2021
2 parents 7dfa5aa + ad51118 commit 29067c0
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 16 deletions.
9 changes: 8 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,17 @@ after_build:
- xcopy /E /I VirtualTrees deploy\VirtualTrees
- xcopy /I ModEXT.txt deploy\
- xcopy /I SE1_10.gro deploy\
- mkdir deploy_portable
- xcopy /E /I Bin_1.10 deploy_portable\Bin_1.10
- xcopy /E /I Licenses deploy_portable\Bin_1.10\Licenses

artifacts:
- path: .\deploy
name: SeriousEngine-$(appveyor_build_version)
name: SeriousEngine-standalone-$(appveyor_build_version)
type: zip

- path: .\deploy_portable
name: SeriousEngine-portable(For vanilla 1.07)-$(appveyor_build_version)
type: zip

deploy:
Expand Down
Binary file added Help/editor_property_tree.gif
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 Help/editor_property_tree_2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 29 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

Enhanced and somewhat fixed version of engine tools (Modeler, World Editor)
* Compatible with 1.07!
* Added Property Tree for Serious Editor for more convenient workflow!
* Updated version of `assimp`, more import formats are available!
* Modeler upgrade to correctly read imported UV map without tears at seams (previously required creation of additional surfaces at seams to avoid that problem)
* Modeler bugfix to correctly handle UTF8
Expand All @@ -12,27 +13,42 @@ Enhanced and somewhat fixed version of engine tools (Modeler, World Editor)
* World Editor bugfix to correctly display color selection window
* New advanced UV mapping tools for World Editor

<p align="center">
Importing 3D meshes with multiple UV maps as brushes in World Editor
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/SeriousAlexej/Serious-Engine/master/Help/editor_model.gif">
</p>

<p align="center">
List of new supported 3D file formats
New Property Tree in Serious Editor
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/SeriousAlexej/Serious-Engine/master/Help/modeler_formats.gif">
</p>

<p align="center">
Modeler correctly imports UV map without distorsions by default
<img src="https://raw.githubusercontent.com/SeriousAlexej/Serious-Engine/master/Help/editor_property_tree.gif">
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/SeriousAlexej/Serious-Engine/master/Help/modeler.gif">
<img src="https://raw.githubusercontent.com/SeriousAlexej/Serious-Engine/master/Help/editor_property_tree_2.gif">
</p>

<details>
<summary>New 3D formats importing demos</summary>

<p align="center">
Importing 3D meshes with multiple UV maps as brushes in World Editor
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/SeriousAlexej/Serious-Engine/master/Help/editor_model.gif">
</p>

<p align="center">
List of new supported 3D file formats
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/SeriousAlexej/Serious-Engine/master/Help/modeler_formats.gif">
</p>

<p align="center">
Modeler correctly imports UV map without distorsions by default
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/SeriousAlexej/Serious-Engine/master/Help/modeler.gif">
</p>
</details>

<details>
<summary>World Editor mapping demos</summary>

Expand Down
3 changes: 3 additions & 0 deletions Sources/WorldEditor/Tree/property_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ class Property_Filename : public BaseEntityPropertyTreeItem

CTFileName curr_value = (m_dependencies ? _CurrentPropValueT<CTFileName>() : _CurrentPropValueT<CTFileNameNoDep>());
if (curr_value != "")
{
editor->addItem(QString(curr_value.FileName().str_String) + QString(curr_value.FileExt().str_String), 1);
editor->setToolTip(curr_value.str_String);
}
editor->addItem("(browse)", 2);
editor->addItem("(none)", 3);

Expand Down
13 changes: 13 additions & 0 deletions Sources/WorldEditor/Tree/property_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class Property_Float_Base : public BaseEntityPropertyTreeItem
editor->setDecimals(4);
editor->setSingleStep(0.25);
editor->setValue(_WrappedValue(_CurrentPropValueT<FLOAT>()));
editor->setFocusPolicy(Qt::StrongFocus);
editor->installEventFilter(this);

QObject::connect(editor, &QDoubleSpinBox::editingFinished, this, [this, editor]
{
Expand All @@ -54,6 +56,17 @@ class Property_Float_Base : public BaseEntityPropertyTreeItem
{
(void)editor;
}

private:
bool eventFilter(QObject* object, QEvent* event) override
{
if (event->type() == QEvent::Wheel)
{
event->ignore();
return true;
}
return BaseEntityPropertyTreeItem::eventFilter(object, event);
}
};

/*******************************************************************************************/
Expand Down
13 changes: 13 additions & 0 deletions Sources/WorldEditor/Tree/property_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class Property_Index : public BaseEntityPropertyTreeItem
editor->setStyleSheet(g_spin_style);
editor->setRange(-99999999, 99999999);
editor->setValue(_CurrentPropValue());
editor->setFocusPolicy(Qt::StrongFocus);
editor->installEventFilter(this);

QObject::connect(editor, &QDoubleSpinBox::editingFinished, this, [this, editor]
{
Expand All @@ -53,6 +55,17 @@ class Property_Index : public BaseEntityPropertyTreeItem
}

IMPL_GENERIC_PROPERTY_FUNCTIONS(INDEX)

private:
bool eventFilter(QObject* object, QEvent* event) override
{
if (event->type() == QEvent::Wheel)
{
event->ignore();
return true;
}
return BaseEntityPropertyTreeItem::eventFilter(object, event);
}
};

/*******************************************************************************************/
Expand Down
14 changes: 12 additions & 2 deletions Sources/WorldEditor/Tree/property_tree_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "ui_property_factory.h"
#include "clickable_label.h"

#include <QTimer>
#include <QPointer>

#include <algorithm>

namespace
Expand Down Expand Up @@ -343,8 +346,15 @@ void PropertyTreeModel::_FillSubProperties(const QModelIndex& parent, const std:
if (pointer_prop->ValueIsCommonForAllEntities() && _GetPointerEntity(pointer_prop))
{
pointer_prop->appendChild(std::make_unique<_DummyTreeItem>(pointer_prop));
beginInsertRows(createIndex(pointer_prop->row(), 0, pointer_prop), 0, 1);
endInsertRows();

QTimer::singleShot(0, this, [this, qpointer_prop = QPointer{ pointer_prop }]
{
if (qpointer_prop && dynamic_cast<_DummyTreeItem*>(qpointer_prop->child(0)))
{
beginInsertRows(createIndex(qpointer_prop->row(), 0, qpointer_prop), 0, 1);
endInsertRows();
}
});
}
}
}
Expand Down

0 comments on commit 29067c0

Please sign in to comment.