Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


3DS Max .NET SDK - Scene Exporter


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 CornyKorn   Members   -  Reputation: 476

Like
0Likes
Like

Posted 03 November 2012 - 09:06 AM

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());
		}
	}
}


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS