Not applicable
06-01-2020
12:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
For the record, I am more artist than I am technical so I am still learning and open minded to my code. But basically I have a situation that I have been trying to solve for weeks.... and I am stumped like no other.
This script works in Max 2019 but does not work in Max 2020... I don't have the slightest clue, could someone help guide me?
#
#import modules
#
import MaxPlus as max
import pymxs
import os
#
#define a master folder and suffix name
#
folder = r"C:\Users\me\Desktop\test2"
convertedEndingName = "_BUILD"
# Find any .max files in the folder specified, if max exist, open, export # entire scene to fbx.
for root, dirs, files in os.walk(folder):
for item in files:
if item.endswith((".max", ".MAX")):
filePath = os.path.join(root, item)
filePath = filePath.replace('\\', '\\\\')
filePath1 = r'"' + filePath + '"'
print(filePath1)
filePathExported = filePath.replace('.max', '').replace('.MAX', '')
sm = r'loadMaxFile ' + filePath1 + ' quiet:true prompt:false useFileUnits:false'
max.Core.EvalMAXScript(sm)
filePathExported = r'"' + filePathExported + '_MAX' + convertedEndingName +'.fbx"'
print(filePathExported)
efbx = r'exportFile ' + filePathExported + '#noPrompt ' + ' selectedOnly:false'
max.Core.EvalMAXScript(efbx)
Solved! Go to Solution.
Link copied