Sign in to follow this  
eviltwigflipper

Maya API Problem

Recommended Posts

Im programming a custom maya converter for one of my projects, but i'm some having problems. When ever I call MFileIO::open, and pass it the filename to open, it generates Error loading 'C:\projects\darklight\src\code\builds/base\models\weapons\earthshaker.mb' because (kFailure): Unexpected Internal Failure I have researched the problem and I can't find a answer. I have called MLibrary::initialize before i start anything, and heres the code I have so far for my conversion function.
int ConvertModel( void ) {
	MStatus	status;
	char    *fileName = va("%s%s", basePathDir, modelDef.inputMaya);

	Com_Print("Converting %s to %s\n", modelDef.inputMaya, modelDef.outputMd3);
	Com_Print("Loading File\n");

	MString	mayaName( fileName );

	status = MFileIO::newFile( true );
	if ( !status ) {
		Com_Print("Error Reseting Maya File State because %s\n",fileName, status.errorString().asChar() );
		return 0;
	}
	status = MFileIO::open( mayaName, NULL, true );
	if ( !status ) {
		Com_Print("Error loading '%s' because %s\n",fileName, status.errorString().asChar() );
		return 0;
	}

	return 1;
}

Im using maya 5. Any ideas why its generating: Unexpected Internal Failure? [Edited by - eviltwigflipper on March 11, 2006 7:24:14 PM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this