mirror of
https://github.com/4sval/FModel.git
synced 2026-06-22 16:00:17 -05:00
HighlightedCheckBox
This commit is contained in:
parent
ba31c63073
commit
eb49b3c853
|
|
@ -1 +1 @@
|
|||
Subproject commit 61042149e8e2a4ea2bd34300b4f276cf6cec6ab8
|
||||
Subproject commit 52292cb88d4de990fbcf6e07fac883e3a8d13d4f
|
||||
|
|
@ -13,9 +13,9 @@ public class CustomDirectory : ViewModel
|
|||
case "Fortnite [LIVE]":
|
||||
return new List<CustomDirectory>
|
||||
{
|
||||
new("Cosmetics", "FortniteGame/Content/Athena/Items/Cosmetics/"),
|
||||
new("Emotes [AUDIO]", "FortniteGame/Content/Athena/Sounds/Emotes/"),
|
||||
new("Music Packs [AUDIO]", "FortniteGame/Content/Athena/Sounds/MusicPacks/"),
|
||||
new("Cosmetics", "FortniteGame/Plugins/GameFeatures/BRCosmetics/Content/Athena/Items/Cosmetics/"),
|
||||
new("Emotes [AUDIO]", "FortniteGame/Plugins/GameFeatures/BRCosmetics/Content/Athena/Sounds/Emotes/"),
|
||||
new("Music Packs [AUDIO]", "FortniteGame/Plugins/GameFeatures/BRCosmetics/Content/Athena/Sounds/MusicPacks/"),
|
||||
new("Weapons", "FortniteGame/Content/Athena/Items/Weapons/"),
|
||||
new("Strings", "FortniteGame/Content/Localization/")
|
||||
};
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ using CUE4Parse.GameTypes.DBD.Encryption.Aes;
|
|||
using CUE4Parse.GameTypes.PAXDEI.Encryption.Aes;
|
||||
using CUE4Parse.GameTypes.NetEase.MAR.Encryption.Aes;
|
||||
using CUE4Parse.GameTypes.FSR.Encryption.Aes;
|
||||
using CUE4Parse.UE4.Assets.Exports.Atom;
|
||||
using EpicManifestParser;
|
||||
using FModel.Creator;
|
||||
using FModel.Extensions;
|
||||
|
|
@ -854,6 +855,7 @@ public class CUE4ParseViewModel : ViewModel
|
|||
return false;
|
||||
}
|
||||
case UWorld when isNone && UserSettings.Default.PreviewWorlds:
|
||||
case UAtomModel when isNone && UserSettings.Default.PreviewStaticMeshes:
|
||||
case UStaticMesh when isNone && UserSettings.Default.PreviewStaticMeshes:
|
||||
case USkeletalMesh when isNone && UserSettings.Default.PreviewSkeletalMeshes:
|
||||
case USkeleton when isNone && UserSettings.Default.SaveSkeletonAsMesh:
|
||||
|
|
|
|||
|
|
@ -101,8 +101,8 @@ public class GameSelectorViewModel : ViewModel
|
|||
.GroupBy(value => (int)value == ((int)value & ~0xF));
|
||||
private IEnumerable<DirectorySettings> EnumerateDetectedGames()
|
||||
{
|
||||
yield return GetUnrealEngineGame("Fortnite", "\\FortniteGame\\Content\\Paks", EGame.GAME_UE5_4);
|
||||
yield return DirectorySettings.Default("Fortnite [LIVE]", Constants._FN_LIVE_TRIGGER, ue: EGame.GAME_UE5_4);
|
||||
yield return GetUnrealEngineGame("Fortnite", "\\FortniteGame\\Content\\Paks", EGame.GAME_UE5_5);
|
||||
yield return DirectorySettings.Default("Fortnite [LIVE]", Constants._FN_LIVE_TRIGGER, ue: EGame.GAME_UE5_5);
|
||||
yield return GetUnrealEngineGame("Pewee", "\\RogueCompany\\Content\\Paks", EGame.GAME_RogueCompany);
|
||||
yield return GetUnrealEngineGame("Rosemallow", "\\Indiana\\Content\\Paks", EGame.GAME_UE4_21);
|
||||
yield return GetUnrealEngineGame("Catnip", "\\OakGame\\Content\\Paks", EGame.GAME_Borderlands3);
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@
|
|||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<CheckBox Grid.Row="1" Grid.Column="4" Margin="5 0 0 5" ToolTip="Enable custom UE versions"
|
||||
IsChecked="{Binding UseCustomEGames, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
IsChecked="{Binding UseCustomEGames, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
BorderBrush="White" Style="{StaticResource HighlightedCheckBox}" />
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="Directory" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="2" Grid.Column="2" Text="{Binding SelectedDirectory.GameDirectory, Mode=TwoWay}" />
|
||||
|
|
|
|||
|
|
@ -80,6 +80,31 @@
|
|||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HighlightedCheckBox" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BorderBrush" Value="White" />
|
||||
<Style.Triggers>
|
||||
<EventTrigger RoutedEvent="CheckBox.Loaded">
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<ColorAnimation From="YellowGreen"
|
||||
To="Goldenrod"
|
||||
Storyboard.TargetProperty="BorderBrush.Color"
|
||||
AutoReverse="True"
|
||||
RepeatBehavior="Forever"
|
||||
Duration="0:0:1" />
|
||||
<ThicknessAnimation From="0"
|
||||
To="2"
|
||||
Storyboard.TargetProperty="BorderThickness"
|
||||
AutoReverse="True"
|
||||
RepeatBehavior="Forever"
|
||||
Duration="0:0:1" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CustomSeparator" TargetType="Separator" BasedOn="{StaticResource {x:Type Separator}}">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static adonisUi:Brushes.Layer1BorderBrush}}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}"/>
|
||||
|
|
|
|||
|
|
@ -143,7 +143,8 @@
|
|||
</ComboBox>
|
||||
<CheckBox Grid.Row="6" Grid.Column="6" Margin="5 0 0 5" ToolTip="Enable custom UE versions"
|
||||
DataContext="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:Views.SettingsView}}}"
|
||||
IsChecked="{Binding SettingsView.UseCustomEGames, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
IsChecked="{Binding SettingsView.UseCustomEGames, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
BorderBrush="White" Style="{StaticResource HighlightedCheckBox}" />
|
||||
|
||||
<TextBlock Grid.Row="7" Grid.Column="0" Text="Texture Platform *" VerticalAlignment="Center" Margin="0 0 0 5" ToolTip="Override the game's platform to ensure texture compatibility" />
|
||||
<ComboBox Grid.Row="7" Grid.Column="2" Grid.ColumnSpan="5" ItemsSource="{Binding SettingsView.Platforms}" SelectedItem="{Binding SettingsView.SelectedUePlatform, Mode=TwoWay}"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using CUE4Parse_Conversion.Animations;
|
|||
using CUE4Parse_Conversion.Meshes;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Exports.Animation;
|
||||
using CUE4Parse.UE4.Assets.Exports.Atom;
|
||||
using CUE4Parse.UE4.Assets.Exports.Component.StaticMesh;
|
||||
using CUE4Parse.UE4.Assets.Exports.Material;
|
||||
using CUE4Parse.UE4.Assets.Exports.SkeletalMesh;
|
||||
|
|
@ -97,6 +98,9 @@ public class Renderer : IDisposable
|
|||
case UWorld wd:
|
||||
LoadWorld(cancellationToken, wd, Transform.Identity);
|
||||
break;
|
||||
case UAtomModel at:
|
||||
LoadAtom(cancellationToken, at);
|
||||
break;
|
||||
}
|
||||
SetupCamera();
|
||||
}
|
||||
|
|
@ -622,6 +626,50 @@ public class Renderer : IDisposable
|
|||
LoadWorld(cancellationToken, w, transform);
|
||||
}
|
||||
|
||||
private void LoadAtom(CancellationToken cancellationToken, UAtomModel original)
|
||||
{
|
||||
var length = original.Primitives.Length;
|
||||
for (var i = 0; i < length; i++)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
Services.ApplicationService.ApplicationView.Status.UpdateStatusLabel($"{original.Name} ... {i}/{length}");
|
||||
|
||||
foreach (var part in original.Primitives[i].Parts)
|
||||
{
|
||||
var fixedPath = part.AtomPrimitive.AssetPathName.Text
|
||||
.Replace("Primitives", "ProcessedMeshes")
|
||||
.Replace("VX", "SM_VX");
|
||||
if (!Utils.TryLoadObject(fixedPath, out UStaticMesh staticMesh) || !staticMesh.TryConvert(out var mesh))
|
||||
continue;
|
||||
|
||||
var guid = staticMesh.LightingGuid;
|
||||
var transform = new Transform
|
||||
{
|
||||
Position = part.Transforms[0].Translation * Constants.SCALE_DOWN_RATIO,
|
||||
Rotation = part.Transforms[0].Rotation,
|
||||
Scale = part.Transforms[0].Scale3D
|
||||
};
|
||||
|
||||
if (Options.TryGetModel(guid, out var model))
|
||||
{
|
||||
model.AddInstance(transform);
|
||||
}
|
||||
else
|
||||
{
|
||||
model = new StaticModel(staticMesh, mesh, transform);
|
||||
foreach (var section in model.Sections)
|
||||
{
|
||||
section.Show = true;
|
||||
}
|
||||
Options.Models[guid] = model;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CameraOp.Setup(original.SourceModel.Bounds * Constants.SCALE_DOWN_RATIO);
|
||||
Services.ApplicationService.ApplicationView.Status.UpdateStatusLabel($"{original.Name} ... {length}/{length}");
|
||||
}
|
||||
|
||||
public void WindowResized(int width, int height)
|
||||
{
|
||||
CameraOp.AspectRatio = width / (float) height;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user