Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d4f9cd6
fix(compilation-warnings): fix compilation warning on ubuntu
iMeaNz Jul 25, 2025
5ec7572
fix(compilation-warnings): fix warning in example
iMeaNz Jul 25, 2025
667db8d
fix(compilation-warnings): fix msvc warnings
iMeaNz Jul 25, 2025
bea3560
fix(compilation-warnings): fix last ubuntu warning
iMeaNz Jul 25, 2025
0451191
fix(compilation-warnings): fix last warnings
iMeaNz Jul 25, 2025
e555357
fix(compilation-warnings): step is now unsigned int
iMeaNz Jul 25, 2025
5c088d2
tests(compilation-warnings): remove underscore for more clear intent
iMeaNz Jul 25, 2025
0d0e39c
fix: first batch of compilation warning (#389)
iMeaNz Jul 26, 2025
2e2a294
fix(sonar-editor): first batch of sonar issues fix
iMeaNz Jul 25, 2025
129611d
fix(sonar-editor): fix const expr for windows
iMeaNz Jul 26, 2025
fcfe9b5
fix(sonar-editor): fix last sonar editor issues
iMeaNz Jul 26, 2025
5ba084a
fix(sonar-engine): fix first batch of sonar issues
iMeaNz Jul 26, 2025
fa9068e
fix(sonar-engine): missing include for windows
iMeaNz Jul 26, 2025
5d3896f
fix(sonar-engine): add exception for non trivially copyable component…
iMeaNz Jul 26, 2025
009d675
fix: fixing sonar issues in the editor (#392)
iMeaNz Jul 26, 2025
982fc8b
fix: fix sonar issues in the engine (#395)
iMeaNz Jul 26, 2025
7690335
feat(windows-titlebar): add dark mode and title bar name customization
Thyodas Jul 26, 2025
eef1079
fix(windows-titlebar): invalid variable in argument
Thyodas Jul 27, 2025
6bab0c7
feat: add dark mode and title bar name customization (#394)
iMeaNz Jul 28, 2025
d577c76
feat(render-passes): add pipeline render target not set exception
iMeaNz Jul 25, 2025
0e23593
feat(render-passes): make resize abstract + add getOutput virtual method
iMeaNz Jul 25, 2025
9c2fb04
refactor(render-passes): pipeline now only have one render target, ea…
iMeaNz Jul 25, 2025
7502d36
refactor(render-passes): forward and grid pass draw onto the same ren…
iMeaNz Jul 25, 2025
a8b3001
refactor(render-passes): mask pass only has one framebuffer
iMeaNz Jul 25, 2025
5bb29fa
refactor(render-passes): outline pass now retrieve the framebuffer fr…
iMeaNz Jul 25, 2025
9e47ffc
refactor(render-passes): call the correct method
iMeaNz Jul 25, 2025
092b452
tests(render-passes): fix tests to comply with the new api
iMeaNz Jul 25, 2025
891828e
style(compilation-warnings): fix test name + remove debug prints
iMeaNz Jul 25, 2025
ae0de61
hotfix(render-passes): temp fix for render passes on windows
iMeaNz Jul 25, 2025
89fa97d
tests(render-passes): fix tests to comply with the new api
iMeaNz Jul 25, 2025
911f0d6
style(compilation-warnings): fix test name + remove debug prints
iMeaNz Jul 25, 2025
8517c8b
fix(render-passes): remove constructor argument
iMeaNz Jul 26, 2025
e539919
fix(render-passes): rebase confclits and change window title type
ThomasParenteau Jul 30, 2025
5c2fab5
fix: render passes (#390)
ThomasParenteau Jul 30, 2025
0d83eac
chore(deps): bump actions/download-artifact from 4 to 5
dependabot[bot] Aug 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ jobs:
steps:
- name: Download NSIS installer
id: download
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
pattern: 'nexo-engine-installer-msvc14-windows-latest'

Expand Down Expand Up @@ -345,7 +345,7 @@ jobs:
steps:
- name: Download DEB installer
id: download
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
pattern: 'nexo-engine-installer-gcc13-ubuntu-latest'

Expand Down
1 change: 0 additions & 1 deletion editor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ set(SRCS
editor/src/DocumentWindows/AssetManager/Shutdown.cpp
editor/src/DocumentWindows/AssetManager/Update.cpp
editor/src/DocumentWindows/AssetManager/FolderTree.cpp
editor/src/DocumentWindows/AssetManager/Thumbnail.cpp
editor/src/DocumentWindows/AssetManager/FileDrop.cpp
editor/src/DocumentWindows/ConsoleWindow/Init.cpp
editor/src/DocumentWindows/ConsoleWindow/Log.cpp
Expand Down
1 change: 0 additions & 1 deletion editor/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <loguru.hpp>
#include <core/exceptions/Exceptions.hpp>

#include "Path.hpp"
#include "scripting/native/ManagedTypedef.hpp"
#include "scripting/native/Scripting.hpp"

Expand Down
2 changes: 1 addition & 1 deletion editor/src/ADocumentWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace nexo::editor {
{
const bool isDocked = currentWindow->DockIsActive;
const ImGuiID currentDockID = currentWindow->DockId;
auto dockId = m_windowRegistry.getDockId(windowName);
const auto dockId = m_windowRegistry.getDockId(windowName);

// If it's the first time opening the window and we have a dock id saved in the registry, then we force set it
if (m_firstOpened && (dockId && currentDockID != *dockId))
Expand Down
4 changes: 2 additions & 2 deletions editor/src/DockingRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace nexo::editor {

std::optional<ImGuiID> DockingRegistry::getDockId(const std::string& name) const
{
auto it = dockIds.find(name);
const auto it = dockIds.find(name);
if (it != dockIds.end()) {
return it->second;
}
Expand All @@ -34,7 +34,7 @@ namespace nexo::editor {

void DockingRegistry::resetDockId(const std::string &name)
{
auto it = dockIds.find(name);
const auto it = dockIds.find(name);
if (it == dockIds.end())
return;
dockIds.erase(it);
Expand Down
19 changes: 6 additions & 13 deletions editor/src/DocumentWindows/AssetManager/AssetManagerWindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ namespace nexo::editor {
} color;
};

std::set<int> m_selectedAssets;
std::set<unsigned int> m_selectedAssets;
std::unordered_map<std::string, std::vector<std::string>, TransparentStringHash, std::equal_to<>> m_folderChildren;
LayoutSettings m_layout;

void calculateLayout(float availWidth);
void drawMenuBar();
void drawAssetsGrid();
void drawAsset(const assets::GenericAssetRef& asset, int index, const ImVec2& itemPos, const ImVec2& itemSize);
void handleSelection(int index, bool isSelected);
void drawAsset(const assets::GenericAssetRef& asset, unsigned int index, const ImVec2& itemPos, const ImVec2& itemSize);
void handleSelection(unsigned int index, bool isSelected);

assets::AssetType m_selectedType = assets::AssetType::UNKNOWN;
std::string m_currentFolder; // Currently selected folder
Expand All @@ -87,13 +87,6 @@ namespace nexo::editor {
void drawFolderTree();
void drawFolderTreeItem(const std::string& name, const std::string& path);

void drawTextureThumbnail(
ImDrawList *drawList,
ImTextureID textureId,
const ImVec2 &itemPos,
const ImVec2& thumbnailEnd
) const ;

struct FolderCreationState {
bool isCreatingFolder = false;
char folderName[256] = "";
Expand All @@ -106,7 +99,7 @@ namespace nexo::editor {
FolderCreationState m_folderCreationState;
assets::AssetRef<assets::Texture> m_folderIcon;

ImTextureID getFolderIconTexture();
ImTextureID getFolderIconTexture() const;

void handleNewFolderCreation();
void drawFolder(
Expand All @@ -120,8 +113,8 @@ namespace nexo::editor {
bool m_showDropIndicator = false;

void handleDroppedFiles();
const assets::AssetLocation getAssetLocation(const std::filesystem::path &path) const;
void importDroppedFile(const std::string& filePath);
assets::AssetLocation getAssetLocation(const std::filesystem::path &path) const;
void importDroppedFile(const std::string& filePath) const;
};

/**
Expand Down
46 changes: 10 additions & 36 deletions editor/src/DocumentWindows/AssetManager/FileDrop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,21 @@
///////////////////////////////////////////////////////////////////////////////

#include "AssetManagerWindow.hpp"
#include "assets/Asset.hpp"
#include "assets/AssetImporter.hpp"
#include "assets/AssetLocation.hpp"
#include "assets/Assets/Model/Model.hpp"
#include "assets/Assets/Texture/Texture.hpp"
#include "Logger.hpp"
#include <filesystem>
#include <algorithm>

namespace nexo::editor {

static assets::AssetType getAssetTypeFromExtension(const std::string &extension)
assets::AssetLocation AssetManagerWindow::getAssetLocation(const std::filesystem::path &path) const
{
static const std::set<std::string> imageExtensions = {
".png", ".jpg", ".jpeg", ".bmp", ".tga", ".gif", ".psd", ".hdr", ".pic", ".pnm", ".ppm", ".pgm"
};
if (imageExtensions.contains(extension))
return assets::AssetType::TEXTURE;
static const std::set<std::string> modelExtensions = {
".gltf", ".glb", ".fbx", ".obj", ".dae", ".3ds", ".stl", ".ply", ".blend", ".x3d", ".ifc"
};
if (modelExtensions.contains(extension))
return assets::AssetType::MODEL;
return assets::AssetType::UNKNOWN;
}

const assets::AssetLocation AssetManagerWindow::getAssetLocation(const std::filesystem::path &path) const
{
std::string assetName = path.stem().string();
const std::string assetName = path.stem().string();
std::filesystem::path folderPath;
std::string targetFolder = !m_hoveredFolder.empty() ? m_hoveredFolder : m_currentFolder;
const std::string targetFolder = !m_hoveredFolder.empty() ? m_hoveredFolder : m_currentFolder;

std::string assetPath = targetFolder;
std::string locationString = assetName + "@" + assetPath;
std::string locationString = assetName + "@" + targetFolder;

LOG(NEXO_DEV,
"Creating asset location: {} (current folder: '{}', hovered: '{}')",
Expand Down Expand Up @@ -78,31 +59,24 @@ namespace nexo::editor {
buildFolderStructure();
}

void AssetManagerWindow::importDroppedFile(const std::string& filePath)
void AssetManagerWindow::importDroppedFile(const std::string& filePath) const
{
std::filesystem::path path(filePath);
const std::filesystem::path path(filePath);

if (!std::filesystem::exists(path)) {
LOG(NEXO_WARN, "Dropped file does not exist: {}", filePath);
return;
}

std::string extension = path.extension().string();
std::transform(extension.begin(), extension.end(), extension.begin(), ::tolower);

assets::AssetType assetType = getAssetTypeFromExtension(extension);
if (assetType == assets::AssetType::UNKNOWN) {
LOG(NEXO_WARN, "Unsupported file type: {}", extension);
return;
}
std::ranges::transform(extension, extension.begin(), ::tolower);

assets::AssetLocation location = getAssetLocation(path);
const assets::AssetLocation location = getAssetLocation(path);

assets::AssetImporter importer;
assets::ImporterFileInput fileInput{path};
try {
auto assetRef = importer.importAssetAuto(location, fileInput);
if (!assetRef)
assets::AssetImporter importer;
if (const auto assetRef = importer.importAssetAuto(location, fileInput); !assetRef)
LOG(NEXO_ERROR, "Failed to import asset: {}", location.getPath().data());
} catch (const std::exception& e) {
LOG(NEXO_ERROR, "Exception while importing {}: {}", location.getPath().data(), e.what());
Expand Down
25 changes: 9 additions & 16 deletions editor/src/DocumentWindows/AssetManager/FolderTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ namespace nexo::editor {

if (opened) {
// Use the precomputed children list
auto it = m_folderChildren.find(path);
if (it != m_folderChildren.end()) {
if (const auto it = m_folderChildren.find(path); it != m_folderChildren.end()) {
for (const auto& childPath : it->second) {
// Find the name of the child from m_folderStructure
std::string childName;
Expand All @@ -83,7 +82,7 @@ namespace nexo::editor {
ImGui::OpenPopup("Create New Folder");

// Center the popup
ImVec2 center = ImGui::GetMainViewport()->GetCenter();
const ImVec2 center = ImGui::GetMainViewport()->GetCenter();
ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));

if (ImGui::BeginPopupModal("Create New Folder", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) {
Expand All @@ -102,7 +101,7 @@ namespace nexo::editor {

// Check if folder already exists
bool folderExists = false;
for (const auto& [path, _] : m_folderStructure) {
for (const auto &path: m_folderStructure | std::views::keys) {
if (path == newFolderPath) {
folderExists = true;
break;
Expand Down Expand Up @@ -164,20 +163,17 @@ namespace nexo::editor {

std::unordered_set<std::string> seen{""};

const auto assets = assets::AssetCatalog::getInstance().getAssets();
for (auto& ref : assets) {
if (auto assetData = ref.lock()) {
for (const auto assets = assets::AssetCatalog::getInstance().getAssets(); auto& ref : assets) {
if (const auto assetData = ref.lock()) {
// normalized path: e.g. "Random/Sub"
std::filesystem::path p{ assetData->getMetadata().location.getPath() };
std::filesystem::path curr;
for (auto const& part : p) {
// skip empty or “_internal” style parts
auto s = part.string();
if (s.empty() || s.front() == '_')
if (auto s = part.string(); s.empty() || s.front() == '_')
continue;
curr /= part;
auto folderPath = curr.string();
if (seen.emplace(folderPath).second) {
if (auto folderPath = curr.string(); seen.emplace(folderPath).second) {
m_folderStructure.emplace_back(
folderPath,
curr.filename().string()
Expand Down Expand Up @@ -208,10 +204,7 @@ namespace nexo::editor {

// favorites section
{
ImGuiTreeNodeFlags headerFlags = ImGuiTreeNodeFlags_DefaultOpen | ImGuiTreeNodeFlags_OpenOnDoubleClick;
bool favoritesOpen = ImGui::TreeNodeEx(ICON_FA_STAR " Favorites", headerFlags);

if (favoritesOpen) {
if (ImGui::TreeNodeEx(ICON_FA_STAR " Favorites", ImGuiTreeNodeFlags_DefaultOpen | ImGuiTreeNodeFlags_OpenOnDoubleClick)) {
struct FavoriteItem {
std::string label;
assets::AssetType type;
Expand All @@ -224,7 +217,7 @@ namespace nexo::editor {
};

for (const auto& fav : favorites) {
bool isSelected = (fav.type == m_selectedType);
const bool isSelected = (fav.type == m_selectedType);

ImGuiTreeNodeFlags itemFlags = ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen;
if (isSelected)
Expand Down
Loading
Loading