Skip to content

Instantly share code, notes, and snippets.

@deathponta
Created November 19, 2016 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deathponta/fea232b29d479e8df46cce0eefc73c81 to your computer and use it in GitHub Desktop.
Save deathponta/fea232b29d479e8df46cce0eefc73c81 to your computer and use it in GitHub Desktop.
【MaxScript】バッチ処理
-- 現在開いているMaxファイルのフルパスゲット
baseFilePath = maxFilePath+maxFileName
-- 今回は9ファイル処理。001 - 009。それ以上は別途対応が必要なり
for i=1 to 9 do(
-- Substring 関数え取得したパスを編集。拡張子前の一文字をiに置き換え
filePath = ((Substring baseFilePath 1 (baseFilePath.count-5)) + (i as String)+".max")
LoadMaxFile filePath
------------------------------
-- 個々に処理内容を書きます
Delete (for o in objects where classOf o == Text collect o)
------------------------------
CompleteRedraw()
SaveMaxFile filePath
)
-- ベースファイルを再度開く
loadMaxFile baseFilePath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment