diff --git a/FModel/ViewModels/ApplicationViewModel.cs b/FModel/ViewModels/ApplicationViewModel.cs index 81cbf32a..f9de0272 100644 --- a/FModel/ViewModels/ApplicationViewModel.cs +++ b/FModel/ViewModels/ApplicationViewModel.cs @@ -195,7 +195,7 @@ public class ApplicationViewModel : ViewModel public async Task InitImGuiSettings(bool forceDownload) { var imgui = Path.Combine(/*UserSettings.Default.OutputDirectory, ".data", */"imgui.ini"); - if (!forceDownload || File.Exists(imgui)) return; + if (File.Exists(imgui) && !forceDownload) return; await ApplicationService.ApiEndpointView.DownloadFileAsync("https://cdn.fmodel.app/d/configurations/imgui.ini", imgui); if (new FileInfo(imgui).Length == 0) diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs index 764367f2..7900f6a8 100644 --- a/FModel/ViewModels/CUE4ParseViewModel.cs +++ b/FModel/ViewModels/CUE4ParseViewModel.cs @@ -782,7 +782,7 @@ public class CUE4ParseViewModel : ViewModel TabControl.SelectedTab.SetDocumentText(solarisDigest.ReadableCode, false); return true; } - case UTexture2D texture when loadTextures: + case UTexture2D { IsVirtual: false } texture when loadTextures: { TabControl.SelectedTab.AddImage(texture, HasFlag(bulk, EBulkType.Auto)); return false; diff --git a/FModel/Views/Snooper/Animations/Skeleton.cs b/FModel/Views/Snooper/Animations/Skeleton.cs index d04df4b1..78ae1334 100644 --- a/FModel/Views/Snooper/Animations/Skeleton.cs +++ b/FModel/Views/Snooper/Animations/Skeleton.cs @@ -201,7 +201,8 @@ public class Skeleton : IDisposable { if (parentTrackIndex < 0) break; info = anim.TrackBonesInfo[parentTrackIndex]; - if (BonesIndicesByLoweredName.TryGetValue(info.Name.Text.ToLower(), out var parentBoneIndices) && parentBoneIndices.HasTrack) + if (boneIndices.LoweredParentBoneName.Equals(info.Name.Text, StringComparison.OrdinalIgnoreCase) && // same parent (name based) + BonesIndicesByLoweredName.TryGetValue(info.Name.Text.ToLower(), out var parentBoneIndices) && parentBoneIndices.HasTrack) boneIndices.ParentTrackIndex = parentBoneIndices.BoneIndex; else parentTrackIndex = info.ParentIndex; } while (!boneIndices.HasParentTrack); diff --git a/FModel/Views/Snooper/SnimGui.cs b/FModel/Views/Snooper/SnimGui.cs index 710810c8..41fb7497 100644 --- a/FModel/Views/Snooper/SnimGui.cs +++ b/FModel/Views/Snooper/SnimGui.cs @@ -165,19 +165,23 @@ public class SnimGui { if (ImGui.BeginTable("world_details", 2, ImGuiTableFlags.SizingStretchProp)) { - var length = s.Renderer.Options.Models.Count; - Layout("Renderer");ImGui.Text($" : {_renderer}"); - Layout("Version");ImGui.Text($" : {_version}"); - Layout("Loaded Models");ImGui.Text($" : x{length}");ImGui.SameLine(); - var b = false; - if (ImGui.SmallButton("Save All")) + var length = s.Renderer.Options.Models.Count; + + NoFramePaddingOnY(() => { - foreach (var model in s.Renderer.Options.Models.Values) + Layout("Renderer");ImGui.Text($" : {_renderer}"); + Layout("Version");ImGui.Text($" : {_version}"); + Layout("Loaded Models");ImGui.Text($" : x{length}");ImGui.SameLine(); + + if (ImGui.SmallButton("Save All")) { - b |= s.Renderer.Options.TrySave(model.Export, out _, out _); + foreach (var model in s.Renderer.Options.Models.Values) + { + b |= s.Renderer.Options.TrySave(model.Export, out _, out _); + } } - } + }); Modal("Saved", b, () => {