X Tutup
Skip to content

Change modelcompiler single model filepathing, change Editor location for MSVC#6063

Merged
fluffyfreak merged 2 commits intopioneerspacesim:masterfrom
fluffyfreak:fix-modelcompiler-bad-path
Feb 13, 2025
Merged

Change modelcompiler single model filepathing, change Editor location for MSVC#6063
fluffyfreak merged 2 commits intopioneerspacesim:masterfrom
fluffyfreak:fix-modelcompiler-bad-path

Conversation

@fluffyfreak
Copy link
Contributor

I noticed a bug/issue when trying to convert a single model to SGM format. It would only output the SGM to the full filepath if I specified inplace or some other 3rd parameter.

I've changed this to always find the full filepath regardless of having extra parameters.

The Editor.exe was also being output to a folder which meant I couldn't debug it from MSVC so for MSVC builds it now output to the CMAKE_SOURCE_DIR like the game and other tools.

@fluffyfreak fluffyfreak merged commit ddb008d into pioneerspacesim:master Feb 13, 2025
4 checks passed
@fluffyfreak fluffyfreak deleted the fix-modelcompiler-bad-path branch February 13, 2025 16:38
}
// find all of the models
FileSystem::FileSource &fileSource = FileSystem::gameDataFiles;
for (FileSystem::FileEnumerator files(fileSource, "models", FileSystem::FileEnumerator::Recurse); !files.Finished(); files.Next()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Post-facto review: there is a significantly nicer range-for iterator available for FileEnumerator now, if you happen to revisit this code.

// Full typename included for informational purposes, feel free to abbreviate to auto
for (const FileSystem::FileInfo &info : fileSource.Enumerate("models", FileSystem::FileEnumerator::Recurse)) {
    // ...
}

// Alternatively:
for (const FileSystem::FileInfo &info : fileSource.Recurse("models" /*, additional flags */)) // ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup