This topic is now archived and is closed to further replies.

Arcibald Wearlot

Writing an export plugin for 3d studio max 4.02

Recommended Posts

i''m currently writing my first 3d engine with my own file format everything is going fine, but i need to write an exporter plugin for 3d studio to get some models to load into my engine i tried to write an export plugin myself but i found it very hard to do.. the sdk documentation is messy, i tried to search on google for some info/tutz but i found nothing i really can''t understand how to export some mesh data i''m using the plugin appwizard, and this is what i wrote so far:
int	ExportPlugin::DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts, DWORD options)
	//TODO: Implement the actual file Export here and 

	//		return TRUE If the file is exported properly

				ExportPluginOptionsDlgProc, (LPARAM)this);

	INode* pRootNode;
	ObjectState os=pRootNode->EvalWorldState(0);
	Object* pObject=os.obj;

	TriObject* pTriObject=(TriObject*)pObject->ConvertToType(0,Class_ID(TRIOBJ_CLASS_ID,0));
	Mesh ExportMesh=pTriObject->GetMesh();
        return TRUE;
this compiles perfectly but it gives me an error when i try to export anything, and max quits so can you tell me what''s wrong in this code? and i''m looking for some tutorials on this stuff, can you help me? thanks

Share this post

Link to post
Share on other sites