fixed opengl being triggered when not needed

This commit is contained in:
Asval
2025-07-15 22:30:46 +02:00
parent cfbee11e58
commit 364df7f402
2 changed files with 9 additions and 3 deletions

View File

@@ -78,6 +78,13 @@ public class CUE4ParseViewModel : ViewModel
set => SetProperty(ref _modelIsOverwritingMaterial, value);
}
private bool _modelIsWaitingAnimation;
public bool ModelIsWaitingAnimation
{
get => _modelIsWaitingAnimation;
set => SetProperty(ref _modelIsWaitingAnimation, value);
}
public bool IsSnooperOpen => _snooper is { Exists: true, IsVisible: true };
private Snooper _snooper;
public Snooper SnooperViewer
@@ -909,7 +916,7 @@ public class CUE4ParseViewModel : ViewModel
SnooperViewer.Run();
return true;
}
case UAnimSequenceBase when isNone && UserSettings.Default.PreviewAnimations || SnooperViewer.Renderer.Options.ModelIsWaitingAnimation:
case UAnimSequenceBase when isNone && UserSettings.Default.PreviewAnimations || ModelIsWaitingAnimation:
{
// animate all animations using their specified skeleton or when we explicitly asked for a loaded model to be animated (ignoring whether we wanted to preview animations)
SnooperViewer.Renderer.Animate(pointer.Object.Value);

View File

@@ -16,7 +16,6 @@ namespace FModel.Views.Snooper;
public class Options
{
public FGuid SelectedModel { get; private set; }
public bool ModelIsWaitingAnimation { get; private set; }
public int SelectedSection { get; private set; }
public int SelectedMorph { get; private set; }
public int SelectedAnimation{ get; private set; }
@@ -238,7 +237,7 @@ public class Options
public void AnimateMesh(bool value)
{
ModelIsWaitingAnimation = value;
Services.ApplicationService.ApplicationView.CUE4Parse.ModelIsWaitingAnimation = value;
}
public void ResetModelsLightsAnimations()