This package provides some functions to Microsoft Flight Simulator Scenery developers, especially those who extract photogrammetry data from other sources and need to do some cleaning and removing corrupted files.
After installing R (https://www.r-project.org), just run the code below to install the latest package stable version available:
if (!require("remotes")) install.packages("remotes")
remotes::install_github("viniciuszendron/msfsSceneryTools@main")
If a message asking to update packages appear, just press Enter key or select the option "None".
New function removeLods
remove specific LODS from a project. It removes LOD entries from .xml located in modelLib, its correspondent .bin/.gltf and textures in modelLib/textures.
removeLods
: Remove lods from project.removeLodNodesFromXML
: Remove lod nodes from XML.removeBinGltfByLods
: Remove .bin and .gltf by lods.removeModelLibTexturesByLods
: Remove textures by lods.
The new function updateSceneryFiles
was created to remove remaining scenery files from modelLib and modelLib/texture that are no longer registered in scene/objects.xml (e.g. deleted photogrammetry tiles from in-game scenery editor). It can also remove .PNG.DDS and .PNG.DDS.json files located inside of a TEXTURE folder of an already built project.
updateSceneryFiles
: Delete scenery files across the project (modelLib and modelLib/texture) that are no longer registered in scene/objects.xml. It can also remove .PNG.DDS and .PNG.DDS.json files located inside of a TEXTURE folder of an already built project by providing the TEXTURE path indeleteBuiltTextures
argument.getXmlGuid
: Get GUID from a modelLib .xml file.
- Functions
fixLods
andfixBinGltf
(both executed fromfixCorruptedFiles
) now removes all correspondent texture files (.png) from folder texture. Previously, only the corrupted .bin, .gltf and .xml were deleted, but the textures themselves were not. This behavior could make the final package bigger to the end user (as Flight Simulator editor does not remove them automatically). - New function:
objectsXmlGuids
(Get all guids identifiers registered in objects.xml file).