Created
April 11, 2020 16:50
-
-
Save umiyuki/9a5ff7098a02db73e9f7c87a10cec103 to your computer and use it in GitHub Desktop.
v-rayとdatasmithプラグインが入ってる3dsMaxで任意のフォルダの中にあるv-ray向けmaxファイルをバッチ処理で全部udatasmithに変換するMaxScript
This file contains 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