FBX multiple objects export to separate files.

 From:  Michael Gibson
8226.18 In reply to 8226.17 
Hi Anton, so if I understand right you want the line to establish a common page width?

Is the script you are using the "ExportNamedObjectsToIndividualFiles.js" from above in this thread (http://moi3d.com/forum/index.php?webtag=MOI&msg=8226.8) ?

Do you want something like the line has a certain name and the script will export that additionally to each file?

So in the script ExportNamedObjectsToIndividualFiles.js, on line 36 it has this currently:

code:
for ( var name in named_objs )
{
	// Clear the selection and then set all objects of this name to be selected.
	moi.geometryDatabase.deselectAll();
	named_objs[name].setProperty( 'selected', true );


So if you want the line to export with each file, it could go like this:

code:
for ( var name in named_objs )
{
	// Clear the selection and then set all objects of this name to be selected.
	moi.geometryDatabase.deselectAll();
	named_objs[name].setProperty( 'selected', true );

// new code here:

	var line_name = 'reg_line';
	if ( name == line_name )
		continue; //  Don't export the line all by itself.

	// select the line so it will export.
	if ( named_objs[line_name] )
		named_objs[line_name].setProperty( 'selected', true );


I haven't tested that, let me know if it doesn't work.

- Michael