/*This script is used to create a new file and merge all the xrefed filed into the newly created file
Scripted by Hua*MuLan~ , 03,20, 2009
email/MSN:qq343294964@126.com
Hopefully , You Can Enjoy It :P
*/
filename = maxFilePath + (getFilenameFile maxFilename) + "XrefsMergedScene"		--filename just used to hold the newly created file name, want some change modify it , I just add "XrefsMergedScene to the end of orignal file name
saveMaxFile filename useNewFile:true	--create new file use filename variable as its file name and set the newly created file to the current scene.
while xrefs.getXRefFileCount() > 0 do		--loop while the scene still have xref object in it .
(
	xrefShell = xrefs.getXRefFile 1		-- get the first xref object in the scene.
	merge xrefShell		--merge it into the scene
)
