mirror of
https://github.com/4sval/FModel.git
synced 2026-04-05 00:26:17 -05:00
close snooper on extract + moonman (marsman?) specular
This commit is contained in:
parent
535ffd45ec
commit
bbda1c5c0d
|
|
@ -79,6 +79,7 @@ public class CUE4ParseViewModel : ViewModel
|
|||
set => SetProperty(ref _modelIsWaitingAnimation, value);
|
||||
}
|
||||
|
||||
public bool IsSnooperOpen => _snooper is { Exists: true, IsVisible: true };
|
||||
private Snooper _snooper;
|
||||
public Snooper SnooperViewer
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,7 +52,9 @@ public class ThreadWorkerViewModel : ViewModel
|
|||
|
||||
public async Task Begin(Action<CancellationToken> action)
|
||||
{
|
||||
if (!_applicationView.Status.IsReady)
|
||||
if (_applicationView.CUE4Parse.IsSnooperOpen)
|
||||
_applicationView.CUE4Parse.SnooperViewer.Close();
|
||||
else if (!_applicationView.Status.IsReady)
|
||||
{
|
||||
SignalOperationInProgress();
|
||||
return;
|
||||
|
|
@ -89,6 +91,8 @@ public class ThreadWorkerViewModel : ViewModel
|
|||
catch (OperationCanceledException)
|
||||
{
|
||||
_applicationView.Status.SetStatus(EStatusKind.Stopped);
|
||||
if (_applicationView.CUE4Parse.IsSnooperOpen)
|
||||
_applicationView.CUE4Parse.SnooperViewer.Close();
|
||||
CurrentCancellationTokenSource = null; // kill token
|
||||
OperationCancelled = true;
|
||||
OperationCancelled = false;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@ public class SpotLight : Light
|
|||
|
||||
Attenuation *= Constants.SCALE_DOWN_RATIO;
|
||||
InnerConeAngle = spot.GetOrDefault("InnerConeAngle", 50.0f);
|
||||
OuterConeAngle = spot.GetOrDefault("OuterConeAngle", 60.0f);
|
||||
OuterConeAngle = spot.GetOrDefault("OuterConeAngle", InnerConeAngle + 10);
|
||||
if (OuterConeAngle < InnerConeAngle)
|
||||
InnerConeAngle = OuterConeAngle - 10;
|
||||
}
|
||||
|
||||
public SpotLight(FGuid model, Texture icon, UObject parent, UObject spot, Transform transform) : base(model, icon, parent, spot, transform)
|
||||
|
|
@ -28,7 +30,9 @@ public class SpotLight : Light
|
|||
|
||||
Attenuation *= Constants.SCALE_DOWN_RATIO;
|
||||
InnerConeAngle = spot.GetOrDefault("InnerConeAngle", 50.0f);
|
||||
OuterConeAngle = spot.GetOrDefault("OuterConeAngle", 60.0f);
|
||||
OuterConeAngle = spot.GetOrDefault("OuterConeAngle", InnerConeAngle + 10);
|
||||
if (OuterConeAngle < InnerConeAngle)
|
||||
InnerConeAngle = OuterConeAngle - 10;
|
||||
}
|
||||
|
||||
public override void Render(int i, Shader shader)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ public class Material : IDisposable
|
|||
|
||||
public readonly CMaterialParams2 Parameters;
|
||||
public string Name;
|
||||
public string Path;
|
||||
public int SelectedChannel;
|
||||
public int SelectedTexture;
|
||||
public bool IsUsed;
|
||||
|
|
@ -43,6 +44,7 @@ public class Material : IDisposable
|
|||
{
|
||||
Parameters = new CMaterialParams2();
|
||||
Name = "";
|
||||
Path = "None";
|
||||
IsUsed = false;
|
||||
|
||||
Diffuse = Array.Empty<Texture>();
|
||||
|
|
@ -63,6 +65,7 @@ public class Material : IDisposable
|
|||
public void SwapMaterial(UMaterialInterface unrealMaterial)
|
||||
{
|
||||
Name = unrealMaterial.Name;
|
||||
Path = unrealMaterial.GetPathName();
|
||||
unrealMaterial.GetParams(Parameters, EMaterialFormat.AllLayers);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ public static class TextureHelper
|
|||
// B: Whatever (AO / S / E / ...)
|
||||
case "shootergame":
|
||||
case "divineknockout":
|
||||
case "moonman":
|
||||
case "marsman":
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
|
|
|
|||
|
|
@ -503,7 +503,7 @@ Snooper aims to give an accurate preview of models, materials, skeletal animatio
|
|||
else _swapper.Value = true;
|
||||
}
|
||||
ImGui.Separator();
|
||||
if (ImGui.Selectable("Copy Name to Clipboard")) ImGui.SetClipboardText(material.Name);
|
||||
if (ImGui.Selectable("Copy Path to Clipboard")) ImGui.SetClipboardText(material.Path);
|
||||
});
|
||||
ImGui.PopID();
|
||||
}
|
||||
|
|
@ -639,7 +639,7 @@ Snooper aims to give an accurate preview of models, materials, skeletal animatio
|
|||
material.ImGuiColors(material.Parameters.Colors);
|
||||
ImGui.TreePop();
|
||||
}
|
||||
if (ImGui.TreeNode("Referenced Textures"))
|
||||
if (ImGui.TreeNode("All Textures"))
|
||||
{
|
||||
material.ImGuiDictionaries("textures", material.Parameters.Textures);
|
||||
ImGui.TreePop();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user