Skip to content

Commit 3b80348

Browse files
committed
Port v6 changes
1 parent 0663b77 commit 3b80348

12 files changed

Lines changed: 67 additions & 1 deletion

File tree

AssimpNet/AssimpNet.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1111
<Authors>Nicholas Woodfield, Salvage</Authors>
1212
<Company />
13-
<Version>5.4.3.4</Version>
13+
<Version>6.0.2.0</Version>
1414
<PackageLicenseFile>License.txt</PackageLicenseFile>
1515
<Copyright>Copyright © 2012-2020 Nicholas Woodfield, © 2024-2025 Salvage</Copyright>
1616
<PackageIcon>logo.png</PackageIcon>

AssimpNet/Configs/PropertyConfig.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,6 +1869,25 @@ public FBXConvertToMetersConfig(bool convertToMeters)
18691869
: base(FBXConvertToMetersConfigName, convertToMeters, false) { }
18701870
}
18711871

1872+
/// <summary>
1873+
/// Specifies whether the importer should ignore the embedded axis directions in the FBX file and load it as is. Default value is false.
1874+
/// </summary>
1875+
public sealed class FBXIgnoreUpDirectionConfig : BooleanPropertyConfig
1876+
{
1877+
/// <summary>
1878+
/// Gets the string name used by FBXIgnoreUpDirectionConfig.
1879+
/// </summary>
1880+
public static string FBXIgnoreUpDirectionConfigName => AiConfigs.AI_CONFIG_IMPORT_FBX_IGNORE_UP_DIRECTION;
1881+
1882+
/// <summary>
1883+
/// Constructs a new FBXIgnoreUpDirectionConfig.
1884+
/// </summary>
1885+
/// <param name="ignoreUpDirection">True if the importer should ignore the embedded axis directions,
1886+
/// false if the file should be loaded as is.</param>
1887+
public FBXIgnoreUpDirectionConfig(bool ignoreUpDirection)
1888+
: base(FBXIgnoreUpDirectionConfigName, ignoreUpDirection, false) { }
1889+
}
1890+
18721891
/// <summary>
18731892
/// Specifies whether the importer will load multiple animations. Default value is true.
18741893
/// </summary>

AssimpNet/Enums.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,19 @@ public enum TextureType : int
11021102
/// Maya material declaration for a specular roughness texture.
11031103
/// </summary>
11041104
MayaSpecularRoughness = 25,
1105+
1106+
/// <summary>
1107+
/// Simulates a surface with directional properties.
1108+
/// </summary>
1109+
Anisotropy = 26,
1110+
1111+
/// <summary>
1112+
/// Textures for metalness and roughness properties packed together in a single texture.
1113+
/// Its green channel contains roughness values and its blue channel contains metalness values.
1114+
/// <a href="https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#metallic-roughness-material"/>
1115+
/// <a href="https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_material_pbrmetallicroughness_metallicroughnesstexture"/>
1116+
/// </summary>
1117+
GltfMetallicRoughness = 27,
11051118
}
11061119

11071120
/// <summary>

AssimpNet/Scene.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,33 @@ public void Clear()
217217
m_metadata.Clear();
218218
}
219219

220+
/// <summary>
221+
/// Will try to locate a bone described by its name.
222+
/// </summary>
223+
/// <param name="name">The name to look for.</param>
224+
/// <returns>The bone.</returns>
225+
public Bone FindBone(string name)
226+
{
227+
if(HasMeshes)
228+
{
229+
foreach(Mesh mesh in m_meshes)
230+
{
231+
if(mesh is { HasBones: true })
232+
{
233+
foreach(Bone bone in mesh.Bones)
234+
{
235+
if(bone != null && bone.Name == name)
236+
{
237+
return bone;
238+
}
239+
}
240+
}
241+
}
242+
}
243+
244+
return null;
245+
}
246+
220247
/// <summary>
221248
/// Gets an embedded texture by a string. The string may be a texture ID in the format of "*1" or is the
222249
/// file name of the texture.

AssimpNet/Unmanaged/AiConfigs.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,13 @@ public static class AiConfigs
590590
/// </summary>
591591
public const string AI_CONFIG_FBX_CONVERT_TO_M = "AI_CONFIG_FBX_CONVERT_TO_M";
592592

593+
/// <summary>
594+
/// Specifies whether the importer should ignore the embedded axis directions in the FBX file and load it as is.
595+
/// <para>Type: Bool. Default: false.</para>
596+
/// <remarks>Prior to Assimp v6.x.x the behavior was equivalent to the property being set to true.</remarks>
597+
/// </summary>
598+
public const string AI_CONFIG_IMPORT_FBX_IGNORE_UP_DIRECTION = "AI_CONFIG_IMPORT_FBX_IGNORE_UP_DIRECTION";
599+
593600
/// <summary>
594601
/// Specifies whether the importer will load multiple animations.
595602
/// <para>Type: Bool. Default: true.</para>
288 KB
Binary file not shown.

libs/Assimp/linux-x64/libassimp.so

296 KB
Binary file not shown.
181 KB
Binary file not shown.
179 KB
Binary file not shown.

libs/Assimp/win-arm64/assimp.dll

154 KB
Binary file not shown.

0 commit comments

Comments
 (0)