From a0355c9b897281d0bfea48bec9d490724ecabd96 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Sun, 12 Apr 2026 17:54:45 -0500 Subject: Add NIF previewer plugin with Linux-specific fixes Vendored from github.com/Parapets/mo2-preview_nif and adapted for Linux: - BSA texture resolution via MO2 virtual tree with case-insensitive fallback walk (Linux FS is case-sensitive; NIFs reference textures with arbitrary case against files on disk) - Process-wide cached BSA candidate list, keyed by profile path, priority-sorted, filtering disabled mods - Path backslash normalization before loose-file lookup - Polygon offset on SLSF1_Decal-flagged shapes to break z-ties with coincident base meshes (road decals, moss overlays) - Opaque framebuffer via glColorMask alpha lock so alpha-blended shapes can't bleed the dialog background through the preview area - QMouseEvent::globalPosition().toPoint() for Qt6 compatibility Preview dialog behavior (organizercore.cpp): - Switch previewFile and previewFileWithAlternatives from stack-allocated exec() to heap + ApplicationModal + show() + WA_DeleteOnClose. - Parent passed as nullptr so preview lifetime is decoupled from the stack-allocated ModInfoDialog that spawns it. Nested exec() inside the enclosing dialog's exec() was softlocking on close. Co-Authored-By: Claude Opus 4.6 (1M context) --- libs/preview_nif/plugindefinition.json | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 libs/preview_nif/plugindefinition.json (limited to 'libs/preview_nif/plugindefinition.json') diff --git a/libs/preview_nif/plugindefinition.json b/libs/preview_nif/plugindefinition.json new file mode 100644 index 0000000..d0d25c2 --- /dev/null +++ b/libs/preview_nif/plugindefinition.json @@ -0,0 +1,42 @@ +{ + "Name": "Preview NIF", + "Author": "Parapets", + "Description": "Supports previewing NIF files", + "DocsUrl": "", + "GithubUrl": "https://github.com/Exit-9B/modorganizer-preview_nif", + "NexusUrl": "https://www.nexusmods.com/skyrimspecialedition/mods/69813", + "Versions": [ + { + "Version": "0.2.0b", + "Released": "2023-11-27", + "MinSupport": "2.5.0", + "MaxSupport": "2.5.0", + "MinWorking": "2.5.0", + "MaxWorking": "", + "DownloadUrl": "https://github.com/Exit-9B/modorganizer-preview_nif/releases/download/v0.2.0/preview_nif-0.2.0.7z", + "PluginPath": [ + "preview_nif.dll", + "data" + ], + "LocalePath": [], + "DataPath": [], + "ReleaseNotes": [] + }, + { + "Version": "0.1.8.1b", + "Released": "2022-06-24", + "MinSupport": "2.4.3", + "MaxSupport": "2.4.4", + "MinWorking": "2.4.3", + "MaxWorking": "2.4.5a3", + "DownloadUrl": "https://github.com/Exit-9B/modorganizer-preview_nif/releases/download/v0.1.8/preview_nif-0.1.8.1.7z", + "PluginPath": [ + "preview_nif.dll", + "data" + ], + "LocalePath": [], + "DataPath": [], + "ReleaseNotes": [] + } + ] +} -- cgit v1.3.1