Advertisement

3DS Max .NET SDK - Scene Exporter

Started by November 03, 2012 03:06 PM
-1 comments, last by CornyKorn21 12 years ago
I have posted this on the Autodesk forums and Google group. Although there is zero activity, so not quite sure where else to go except here.

I'm attempting to write a scene exporter using the 3DS Max .NET SDK. I currently have what I thought was the bare minimum setup in order to create an exporter. After building the DLL I copy it into the bin/assemblies directory and launch MAX 2013 and attempt an export. I receive the message "An error has occurred and the application will now close. No scene changes have occurred since your last save."


I copy and pasted the Descriptor and Loader from the example in http://area.autodesk...rp-source-code.

Do I have something set up wrong in my code that could cause this issue? My project references Autodesk.Max and the "Copy Local" is set to false.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Max;
namespace TestExporter
{
public class TestExporter : Autodesk.Max.Plugins.SceneExport
{
public override string AuthorName
{
get { return "Test"; }
}
public override string CopyrightMessage
{
get { return "Test"; }
}
public override int DoExport(string name, Autodesk.Max.IExpInterface ei, Autodesk.Max.IInterface i, bool suppressPrompts, uint options)
{
return 1;
}
public override string Ext(int n)
{
return "mesh";
}
public override int ExtCount
{
get { return 1; }
}
public override string LongDesc
{
get { return "Test Export Utility"; }
}
public override string OtherMessage1()
{
return "";
}
public override string OtherMessage2()
{
return "";
}
public override string ShortDesc
{
get { return "Test"; }
}
public override void ShowAbout(IntPtr hWnd)
{
return;
}
public override uint Version
{
get { return 1; }
}
}
public class Descriptor : Autodesk.Max.Plugins.ClassDesc2
{
public override string Category
{
get { return "Test"; }
}
public override IClass_ID ClassID
{
get { return Loader.Global.Class_ID.Create(0x3990388b, 0x696868d0); }
}
public override string ClassName
{
get { return "Test Export Utility"; }
}
public override object Create(bool loading)
{
return new TestExporter();
}
public override bool IsPublic
{
get { return true; }
}
public override SClass_ID SuperClassID
{
get { return SClass_ID.SceneExport; }
}
}
public static class Loader
{
public static IGlobal Global;
public static IInterface13 Core;
public static void AssemblyMain()
{
Global = Autodesk.Max.GlobalInterface.Instance;
Core = Global.COREInterface13;
Core.AddClass(new Descriptor());
}
}
}

This topic is closed to new replies.

Advertisement