You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Older blender (2.79b) can't read the dx10 texture header (supposedly 2.83+ can though)
- The conversion flags for each format should be specified in SnapshotProfiles/TexFormat.txt
- texconv from the direct x tools project is used to do the conversion and its binary should be in TPLib
<CheckBoxx:Name="convertTex"ToolTip="If needed, convert textures into d3d9 format readable by blender 2.79b"Content="Convert Textures"HorizontalAlignment="Left"Margin="200,368,0,0"VerticalAlignment="Top"Width="116"IsChecked="{Binding Path=ConvertTextures}"/>
// Find the first existing path for SnapTexFormatFile
69
+
letfilePath=
70
+
PathToSnapshotProfiles
71
+
|> List.map (fun dir -> Path.Combine(dir, SnapTexFormatFile))
72
+
|> List.tryFind File.Exists
73
+
74
+
// If no path is found, fail with an error
75
+
letfilePath=
76
+
match filePath with
77
+
| Some path -> path
78
+
| None -> failwithf "%A not found in any of the specified paths: %A (relative to: %A)" SnapTexFormatFile PathToSnapshotProfiles (Environment.CurrentDirectory)
79
+
80
+
// Read the file and process each line
81
+
// syntax: src dxgi input format number (from dxgiformat.h) = list of flags to be supplied to texconv
82
+
// example: 71 = -f BC1_UNORM -dx9
83
+
letlines= File.ReadAllLines(filePath)
84
+
letkvpList=
85
+
lines
86
+
|> Array.choose (fun line ->
87
+
lettrimmedLine= line.Trim()
88
+
89
+
// Skip blank lines or comments
90
+
if String.IsNullOrWhiteSpace(trimmedLine)|| trimmedLine.StartsWith("//")|| trimmedLine.StartsWith("#")then
0 commit comments