forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FbxImporter.cs
27 lines (24 loc) · 1.02 KB
/
FbxImporter.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
using System;
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
namespace Microsoft.Xna.Framework.Content.Pipeline
{
/// <summary>
/// Provides methods for reading AutoDesk (.fbx) files for use in the Content Pipeline.
/// </summary>
[ContentImporter(".fbx", DisplayName = "Fbx Importer - MonoGame", DefaultProcessor = "ModelProcessor")]
public class FbxImporter : ContentImporter<NodeContent>
{
public override NodeContent Import(string filename, ContentImporterContext context)
{
if (filename == null)
throw new ArgumentNullException("filename");
if (context == null)
throw new ArgumentNullException("context");
var importer = new OpenAssetImporter("FbxImporter", true);
return importer.Import(filename, context);
}
}
}