here is Maya 2009 import fix - now tested! :)

Heyaz,

I know there are some work arounds but this works for auto import of maya files into Unity. Ive only done this/tested with Unity iPhone.

in FBXMayaMain.mel add this at the end:

if (getApplicationVersionAsFloat() >= 2009.0)
{
	loadPlugin "!//MAYA_PATH//!/Contents/MacOS/plug-ins/fbxmaya.bundle";
	eval ("source \"!//UNITY_TEMP//!/FBXMayaExport.mel\"");
}

in FBXMayaExport.mel add this before the line line about FBXExportShowUI:

if (`exists FBXExportFileVersion`)
{
FBXExportFileVersion FBX200611;
}

Thatll get ya running with auto import chocolaty goodness. :slight_smile: It will no longer crash maya to import if your using maya 2009.

I don’t know much about Maya / MEL, but I tested it, and it didn’t work, with Unity 2.1. :frowning:

Ill check it out on 2.1 later today. Also in:

FBXMayaMain.mel

I had left an extra “[” character in there before. I edited it so check if it matches what you have.

Heyaz! It works in 2.1! :slight_smile: I dunno what else to say about the code unless the Unity guys say its ok to put the full mel scripts up so you can drag and replace. Otherwise just edit the ones in the unity icon (show contents) with the changes.

I ended up fixing it just cause I was looking for something else. So I had the idea to look at the scripts right quick. :slight_smile: