bug fixes

This commit is contained in:
4sval 2023-03-03 03:40:38 +01:00
parent edd3a47353
commit aca754a517
4 changed files with 17 additions and 12 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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);

View File

@ -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, () =>
{