Export Maxscript

Export Maxscript

d_cooper_07
Observer Observer
297 Views
1 Reply
Message 1 of 2

Export Maxscript

d_cooper_07
Observer
Observer

Can anyone make me a script, willing to pay? 

 

Very simple.

Be able to select any number of folders

Find all files ending "-Exported-VRED.fbx"

Open each file.

Remove 6 dummy layers and 2 items of geometry (always same name)

Save as, original name but remove "-Exported-VRED.fbx" and replace with "-Working-Max.max"

 

Or is there a tool that already exists?? 

 

Thanks 

0 Likes
298 Views
1 Reply
Reply (1)
Message 2 of 2

denisT.MaxDoctor
Advisor
Advisor

 

fn fbx_batch_reexport dir: pattern:".fbx" recurse:on exportname: = 
(
	--pluginManager.loadClass FBXEXP
	pluginManager.loadClass FBXIMP 
	
	numfiles = 0
	
	if dir == unsupplied do dir = getSavePath()
	if doesdirectoryExist dir do
	(
		dir += @"\*"
		files = getfiles (dir + pattern) recurse:recurse
		numfiles = files.count
		for f in files do
		(
			--resetmaxfile #noPrompt
			--importFile f #noPrompt selectedOnly:off using:FBXEXP
			-- ****************** do something 
			
			if exportname != unsupplied then
				maxfile = substring f 1 (f.count - pattern.count) + exportname
			else 
				maxfile = substring f 1 (f.count - 3) + ".max"
			
			--saveMaxFile maxfile useNewFile:off quiet:on

			format "% >> %\n" f maxfile			
		)
	)
	numfiles
)

/*
fbx_batch_reexport pattern:"-Exported-VRED.fbx" exportname:"-Working-Max.max"
*/

 

 

more than half of the work you already have 😉

0 Likes