Skip to content

Commit

Permalink
Update v3.0.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunaretic committed Jul 27, 2024
2 parents 55beb65 + 5b31d27 commit 0cfb4c0
Show file tree
Hide file tree
Showing 11 changed files with 211 additions and 90 deletions.
3 changes: 3 additions & 0 deletions FFXIV_TexTools/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@
<setting name="Default_Modpack_Format" serializeAs="String">
<value>pmp</value>
</setting>
<setting name="UseAutoHeels" serializeAs="String">
<value>True</value>
</setting>
</FFXIV_TexTools.Properties.Settings>
</userSettings>
<runtime>
Expand Down
6 changes: 3 additions & 3 deletions FFXIV_TexTools/FFXIV_TexTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<Product>FFXIV_TexTools</Product>
<Copyright>Copyright © 2024</Copyright>

<ApplicationVersion>3.0.8.2</ApplicationVersion>
<AssemblyVersion>3.0.8.2</AssemblyVersion>
<FileVersion>3.0.8.2</FileVersion>
<ApplicationVersion>3.0.8.4</ApplicationVersion>
<AssemblyVersion>3.0.8.4</AssemblyVersion>
<FileVersion>3.0.8.4</FileVersion>

<LangVersion>9.0</LangVersion>
<UseWPF>true</UseWPF>
Expand Down
12 changes: 12 additions & 0 deletions FFXIV_TexTools/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions FFXIV_TexTools/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,8 @@
<Setting Name="Default_Modpack_Format" Type="System.String" Scope="User">
<Value Profile="(Default)">pmp</Value>
</Setting>
<Setting Name="UseAutoHeels" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>
19 changes: 18 additions & 1 deletion FFXIV_TexTools/ViewModels/ImportModelViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,21 @@ public string FinishText
}
}

private bool _AutoHeels = true;
public bool AutoHeels
{
get => _AutoHeels;
set
{
if(_AutoHeels != value)
{
Settings.Default.UseAutoHeels = value;
Settings.Default.Save();
}
_AutoHeels = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(AutoHeels)));
}
}
private ModelImportOptions ImportOptions;


Expand Down Expand Up @@ -135,6 +150,7 @@ public ImportModelViewModel(ImportModelView view, string internalPath, IItem ref
_internalPath = internalPath;
_simpleMode = simpleMode;
_clearEmpties = clearEmptyMaterials;
_AutoHeels = Settings.Default.UseAutoHeels;

ComplexOptionsEnabled = !simpleMode;

Expand Down Expand Up @@ -218,6 +234,7 @@ public ImportModelViewModel(ImportModelView view, string internalPath, IItem ref
}
}


_view.CloneUV1Button.Click += CloneUV1Button_Clicked;
_view.ShiftUVsButton.Click += ForceUVsButton_Clicked;
_view.UseImportedTangentButton.Click += UseExternalTangents_Clicked;
Expand All @@ -228,7 +245,6 @@ public ImportModelViewModel(ImportModelView view, string internalPath, IItem ref
}
}


private void CloneUV1Button_Clicked(object sender, RoutedEventArgs e)
{
Settings.Default.CloneUV1toUV2ForHair = _view.CloneUV1Button.IsChecked == true;
Expand Down Expand Up @@ -337,6 +353,7 @@ private async Task DoImport(bool showEditor)
options.CloneUV2 = _view.CloneUV1Button.IsChecked == true ? true : false;
options.AutoScale = _view.AutoScaleButton.IsChecked == true ? true : false;
options.UseImportedTangents = _view.UseImportedTangentButton.IsChecked == true ? true : false;
options.AutoAssignHeels = AutoHeels;

options.SourceApplication = XivStrings.TexTools;

Expand Down
9 changes: 8 additions & 1 deletion FFXIV_TexTools/Views/Item/ItemViewControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,14 @@ private async Task GetTextures(ModTransaction tx)
}
else
{
textures = await Mtrl.GetTexturePathsFromMtrlPath(mtrl, false, false, tx);
try
{
textures = await Mtrl.GetTexturePathsFromMtrlPath(mtrl, false, false, tx);
}
catch
{
//this.ShowWarning("Unable to read Material")
}
}

foreach(var tex in textures)
Expand Down
15 changes: 9 additions & 6 deletions FFXIV_TexTools/Views/Models/ImportModelEditView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@
<Grid x:Name="MeshPartGrid" Grid.Row="1" Grid.Column="2">
<!-- Mesh Part Grid Definitions -->
<Grid.RowDefinitions>
<RowDefinition Height="45"/>
<RowDefinition Height="45"/>
<RowDefinition Height="45"/>
<RowDefinition Height="125"/>
Expand All @@ -261,16 +262,18 @@

<Button Grid.Row="1" Margin="10,0" Content="Modify Part Vertices" Click="ModifyPart_Click" VerticalAlignment="Center"></Button>

<Label Content="Attributes" Margin="10,10,10,0" Grid.Row="2" VerticalAlignment="Top" HorizontalContentAlignment="Center" FontSize="18" FontWeight="Bold" Height="34" Grid.Column="1"/>
<Button Grid.Row="2" Margin="10,0" Content="Auto-Assign Simple-Heels Attribute" Click="AssignHeels_Click" VerticalAlignment="Center" ToolTip="Automatically assigns an offset attribute for the SimpleHeels plugin. Only affects body/leg/foot equipment."></Button>

<Label Content="Attributes" Margin="10,10,10,0" Grid.Row="3" VerticalAlignment="Top" HorizontalContentAlignment="Center" FontSize="18" FontWeight="Bold" Height="34" Grid.Column="1"/>

<Rectangle Grid.Row="2" Stroke="{DynamicResource NormalBorderBrush}" Margin="10,5,10,10" Grid.Column="1" Grid.RowSpan="2"/>
<Rectangle Grid.Row="3" Stroke="{DynamicResource NormalBorderBrush}" Margin="10,5,10,10" Grid.Column="1" Grid.RowSpan="2"/>


<ComboBox x:Name="AddAttributeBox" Margin="20,50,19,0" Grid.Row="2" VerticalAlignment="Top" Height="26" Grid.Column="1"/>
<TextBox x:Name="AddAttributeTextBox" Height="26" Margin="20,0,20,15" Grid.Row="2" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Bottom" IsEnabled="False" Grid.Column="1"/>
<ComboBox x:Name="AddAttributeBox" Margin="20,50,19,0" Grid.Row="3" VerticalAlignment="Top" Height="26" Grid.Column="1"/>
<TextBox x:Name="AddAttributeTextBox" Height="26" Margin="20,0,20,15" Grid.Row="3" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Bottom" IsEnabled="False" Grid.Column="1"/>

<ListBox x:Name="AttributesListBox" Margin="20,0,20,50" Grid.Row="3" Style="{DynamicResource SimpleListBox}" Grid.Column="1" MinHeight="150"/>
<Button x:Name="RemoveAttributeButton" Content="Remove Attribute" Margin="20,0,20,15" Grid.Row="3" Height="27" VerticalAlignment="Bottom" Grid.Column="1" IsEnabled="False"/>
<ListBox x:Name="AttributesListBox" Margin="20,0,20,50" Grid.Row="4" Style="{DynamicResource SimpleListBox}" Grid.Column="1" MinHeight="150"/>
<Button x:Name="RemoveAttributeButton" Content="Remove Attribute" Margin="20,0,20,15" Grid.Row="4" Height="27" VerticalAlignment="Bottom" Grid.Column="1" IsEnabled="False"/>


</Grid>
Expand Down
19 changes: 19 additions & 0 deletions FFXIV_TexTools/Views/Models/ImportModelEditView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,5 +292,24 @@ private void ModifyModel_Click(object sender, RoutedEventArgs e)
ModifyVerticesWindow.ShowVertexModifier(_newModel, _newModel, this);
_viewModel.UpdateFlow();
}

private async void AssignHeels_Click(object sender, RoutedEventArgs e)
{
var mesh = (int)MeshNumberBox.SelectedValue;
var part = (int)PartNumberBox.SelectedValue;
var atr = ModelModifiers.AssignHeelAttribute(_newModel);
await SetupUi();

MeshNumberBox.SelectedValue = mesh;
PartNumberBox.SelectedValue = part;

if (!string.IsNullOrWhiteSpace(atr))
{
this.ShowInfo("Heel Offset Assigned", "The heel offset attribute: " + atr + " has been assigned to the first available part in the model.");
} else
{
this.ShowInfo("No Attribute Assigned", "The mesh either does not stick through the floor, or is not a valid target for the heels plugin.\n\nThe model attributes have not been changed.");
}
}
}
}
3 changes: 2 additions & 1 deletion FFXIV_TexTools/Views/Models/ImportModelView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
Expand Down Expand Up @@ -45,6 +45,7 @@
<ComboBox Grid.Row="1" Grid.Column="2" x:Name="RaceComboBox" Width="200" VerticalAlignment="Center"></ComboBox>

<CheckBox x:Name="UseImportedTangentButton" Content="Use Imported Tangents" Style="{DynamicResource SimpleCheckBox}" Grid.Row="0" Grid.Column="2" VerticalContentAlignment="Center" VerticalAlignment="Center" ToolTipService.ShowOnDisabled="True" ToolTip="Use Tangent/Binormal Data from the imported file, rather than recalculating it." />
<CheckBox x:Name="AutoHeelsBox" Content="Automatic Heels Attribute" Style="{DynamicResource SimpleCheckBox}" Grid.Row="2" Grid.Column="0" VerticalContentAlignment="Center" VerticalAlignment="Center" ToolTipService.ShowOnDisabled="True" ToolTip="Automatically assign attributes for SimpleHeels Plugin compatibility. (Only affects Body/Leg/Heel equipment models)" IsChecked="{Binding Path=AutoHeels}"/>

</Grid>
<UniformGrid Margin="10,0" Columns="3" Grid.Row="2">
Expand Down
Loading

0 comments on commit 0cfb4c0

Please sign in to comment.