Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,24 @@ jobs:
$exe = "${{github.workspace}}\bin\qtmesh.exe"
Write-Host "Running: $exe --version"
$output = & $exe --version
$exitCode = $LASTEXITCODE
Write-Host "Output: $output"
Write-Host "Exit code: $exitCode"
if ($output -notmatch "qtmesh \d+\.\d+\.\d+") {
Write-Error "CLI smoke test FAILED: output '$output' does not match expected 'qtmesh X.Y.Z'"
exit 1
}
# Note: qtmesh.exe may exit with STATUS_DLL_NOT_FOUND (0xC0000135, -1073741515)
# during ExitProcess() DLL unload on Windows — a known MinGW DLL detach artifact
# when the exit happens before Ogre statics are initialised. This does not indicate
# a functional failure; the version string was produced correctly.
# Fail only on codes that mean a genuine crash (non-negative non-zero).
if ($exitCode -gt 0) {
Write-Error "CLI smoke test FAILED: exe exited with code $exitCode"
exit 1
}
Write-Host "CLI smoke test PASSED"
exit 0
Comment thread
coderabbitai[bot] marked this conversation as resolved.

- name: Upload Artifact
if: github.event_name == 'release' && github.event.action == 'published'
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cmake_minimum_required(VERSION 3.24.0)
cmake_policy(SET CMP0005 NEW)
cmake_policy(SET CMP0048 NEW) # manages project version

project(QtMeshEditor VERSION 2.19.0 LANGUAGES C CXX)
project(QtMeshEditor VERSION 2.20.0 LANGUAGES C CXX)
message(STATUS "Building QtMeshEditor version ${PROJECT_VERSION}")

set(QTMESHEDITOR_VERSION_STRING "\"${PROJECT_VERSION}\"")
Expand Down
392 changes: 392 additions & 0 deletions qml/PropertiesPanel.qml

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/Assimp/Importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ THE SOFTWARE.
#include "AnimationProcessor.h"
#include "BoneProcessor.h"
#include "MeshProcessor.h"

#include <algorithm>

Ogre::MeshPtr AssimpToOgreImporter::loadModel(const std::string& path, bool convertToLeftHanded, unsigned int additionalFlags) {
Expand All @@ -45,7 +44,10 @@ Ogre::MeshPtr AssimpToOgreImporter::loadModel(const std::string& path, bool conv
aiProcess_RemoveComponent |
aiProcess_GenSmoothNormals |
aiProcess_ValidateDataStructure |
aiProcess_OptimizeGraph |
// aiProcess_OptimizeGraph intentionally omitted: it collapses the
// node hierarchy that aiProcess_PopulateArmatureData requires to
// link aiBone objects to their aiNode, causing hangs on re-imported
// skeletal meshes (e.g. exported LOD gltf2 files).
aiProcess_LimitBoneWeights |
aiProcess_SortByPType |
aiProcess_ImproveCacheLocality |
Expand All @@ -58,8 +60,6 @@ Ogre::MeshPtr AssimpToOgreImporter::loadModel(const std::string& path, bool conv
flags |= additionalFlags;

const aiScene* scene = importer.ReadFile(path, flags);

// Read coordinate system from FBX metadata (1=Y-up, 2=Z-up).
// Do this immediately after ReadFile while the scene is still valid.
m_sceneUpAxis = 1; // default: Y-up
if (scene && scene->mMetaData)
Expand Down
4 changes: 2 additions & 2 deletions src/CLIPipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,11 @@ int CLIPipeline::run(int argc, char* argv[])
}
if (arg == "--help" || arg == "-h") {
printUsage();
return 0;
_exit(0);
}
if (arg == "--version" || arg == "-v") {
printVersion();
return 0;
_exit(0);
}
// First non-flag argument is the subcommand
if (!arg.startsWith("-")) {
Expand Down
14 changes: 7 additions & 7 deletions src/CLIPipeline_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,38 +446,38 @@ TEST(CLIPipelineSmoke, PrintVersionDoesNotCrash)
EXPECT_NO_FATAL_FAILURE(CLIPipeline::printVersion());
}

// --- run() tests (early-return paths that don't create QApplication or call _exit) ---
// --- run() tests (early-return paths that call _exit(0) to bypass static destructors) ---

TEST(CLIPipelineRun, HelpFlag)
{
char arg0[] = "qtmesh";
char arg1[] = "--help";
char* argv[] = {arg0, arg1};
EXPECT_EQ(CLIPipeline::run(2, argv), 0);
EXPECT_EXIT(CLIPipeline::run(2, argv), testing::ExitedWithCode(0), "");
}

TEST(CLIPipelineRun, HelpFlagShort)
{
char arg0[] = "qtmesh";
char arg1[] = "-h";
char* argv[] = {arg0, arg1};
EXPECT_EQ(CLIPipeline::run(2, argv), 0);
EXPECT_EXIT(CLIPipeline::run(2, argv), testing::ExitedWithCode(0), "");
}

TEST(CLIPipelineRun, VersionFlag)
{
char arg0[] = "qtmesh";
char arg1[] = "--version";
char* argv[] = {arg0, arg1};
EXPECT_EQ(CLIPipeline::run(2, argv), 0);
EXPECT_EXIT(CLIPipeline::run(2, argv), testing::ExitedWithCode(0), "");
}

TEST(CLIPipelineRun, VersionFlagShort)
{
char arg0[] = "qtmesh";
char arg1[] = "-v";
char* argv[] = {arg0, arg1};
EXPECT_EQ(CLIPipeline::run(2, argv), 0);
EXPECT_EXIT(CLIPipeline::run(2, argv), testing::ExitedWithCode(0), "");
}

TEST(CLIPipelineRun, NoCommand)
Expand All @@ -493,7 +493,7 @@ TEST(CLIPipelineRun, VerboseWithHelp)
char arg1[] = "--verbose";
char arg2[] = "--help";
char* argv[] = {arg0, arg1, arg2};
EXPECT_EQ(CLIPipeline::run(3, argv), 0);
EXPECT_EXIT(CLIPipeline::run(3, argv), testing::ExitedWithCode(0), "");
}

TEST(CLIPipelineRun, CliWithHelp)
Expand All @@ -502,7 +502,7 @@ TEST(CLIPipelineRun, CliWithHelp)
char arg1[] = "--cli";
char arg2[] = "--help";
char* argv[] = {arg0, arg1, arg2};
EXPECT_EQ(CLIPipeline::run(3, argv), 0);
EXPECT_EXIT(CLIPipeline::run(3, argv), testing::ExitedWithCode(0), "");
}

// --- TestArgv helper for in-process cmd* tests ---
Expand Down
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ SceneTreeModel.cpp
ThemeManager.cpp
BatchExporter.cpp
MaterialPresetLibrary.cpp
MeshLodController.cpp
MeshValidator.cpp
)

set(HEADER_FILES
Expand Down Expand Up @@ -113,6 +115,8 @@ SceneTreeModel.h
ThemeManager.h
BatchExporter.h
MaterialPresetLibrary.h
MeshLodController.h
MeshValidator.h
)

set(TEST_SOURCES "")
Expand Down
Loading
Loading