FBX plugin doesn't use scripted scale setting

dankeating3d
Explorer
Explorer

FBX plugin doesn't use scripted scale setting

dankeating3d
Explorer
Explorer

I'm trying to create a one-click export for FBX using the scripting commands listed here:

 

http://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=GUID-76CF67F4-BBBB-48C6-AE48-6EF6975CB870

 

 

I have this block of MEL : 

 

	//units settings 
	FBXExportScaleFactor 1.0 ; 
	FBXProperty Export|AdvOptGrp|UnitsGrp|DynamicScaleConversion -v false;
	FBXProperty Export|AdvOptGrp|UnitsGrp|UnitsSelector -v "Meters";
	currentUnit -linear "m";
FBXPushSettings;

which is followed by: 

 

	FBXExport -f $exportName -s ;

"$exportName" is the output path I want.

 

It runs fine. However the scale of the exported file is not correct.  

 

If you export a FBX manually and set the scale (under advanced settings> Units) incorrectly and then use the exporter script it will use the scale set in the previous export. If I run the script twice - the second export will be the correct scale.

 

Also if I open Maya and immediately use the export script it will spit out this error:

// Error: Syntax Error: bad value for this property. Use a valid enum item. // 

This seems to be caused by the FBX plugin not being properly initialized when you start Maya. The value it's complaining about is "Meters".

 

EDIT: Also I put in debug print commands that execute after the export

		print ("file units " + ` currentUnit -q -linear` + "\r\n");
		print ("scaleFactor " + `FBXExportScaleFactor -q` + "\r\n");
		print ("convertUnit " + `FBXExportConvertUnitString  -q` + "\r\n");
		print ("unitsSelector " + `FBXProperty Export|AdvOptGrp|UnitsGrp|UnitsSelector -q` + "\r\n");

These show the scale values as being set correctly by the code even though the exported file is not the right scale

0 Likes
Reply
646 Views
1 Reply
Reply (1)

faline.custodio.da.silva
Alumni
Alumni

@dankeating3d

 

Hello there,

 

Thank you for posting! This is outside my knowledge with MEL, but I wanted to let you know that we are looking for answers to this issue. I'm collaborating with my colleagues and help is on the way.

 

I appreciate your participation in our community! Have a great day, and a fantastic weekend. =]

 

 

Faline

 


Faline Custodio Da Silva

0 Likes