Created
April 11, 2020 16:50
v-rayとdatasmithプラグインが入ってる3dsMaxで任意のフォルダの中にあるv-ray向けmaxファイルをバッチ処理で全部udatasmithに変換するMaxScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
--VRayの警告を非表示 | |
setVRaySilentMode() | |
--フォルダの中の全てのmaxファイルについて | |
local files = getFiles @"C:\変換したいmaxファイルがあるフォルダのパス\*.max" | |
for f in files do ( | |
dirName = getFilenamePath f | |
fileName = getFilenameFile f | |
outputName = dirName + fileName + ".udatasmith" | |
isThereFile = doesFileExist outputName | |
--すでにudatasmithがファイルがあれば処理スキップ | |
if isThereFile == false then ( | |
loadMAXFile f quiet:true | |
--udatasmithファイルを出力 | |
DatasmithExport.IncludeTarget = #VisibleObjects | |
DatasmithExport.AnimatedTransforms = #ActiveTimeSegment | |
DatasmithExport.Export outputName false | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment