从命令行启动3ds max(带命令行选项)并加载执行MAXScript
来源:互联网 发布:防身甩棍淘宝网 编辑:程序博客网 时间:2024/05/19 02:05
Starting 3ds Max from the Command Line
You can start 3ds Max from the command line in a Command Prompt window, or include the command line in a batch file. There are a number of switches that you can use on the command line.
To start 3ds Max from the command line:
- Open a Command Prompt window.
- Change the directory to the 3ds Max root directory, if this directory is not in your PATH statement.
- Type 3dsmax to start 3ds Max. Optionally, add a command-line switch (see below).
Command-Line Switches
You can use the following switches after 3dsmax on the command line.
Use a space to separate the 3ds Max executable name from the command-line switch.
Examples:
3dsmax −l
3dsmax −i otherfile
3dsmax anyscene
3dsmax −c MaxCustom
Using the -v Option
You use the -v option to load a different display driver at startup. This option overrides the setting in 3dsmax.ini.
Follow the -v with one of these choices for the driver you want to use:
o: Loads the OpenGL driver.
d: Loads the Direct3D driver.
- 9 (-vx9): Nitrous in Direct3D 9 mode.
- 11 (-vx11): Nitrous in Direct3D 11 mode.
- s (-vxs): Nitrous in Direct3D 11 mode with WARP.
n: Loads a null driver.
For example, if you ordinarily run Nitrous using Direct3D 11 (the default display mode) and want to switch to Direct3D 9 for a session, you would type: 3dsmax −vx9
Using the -z Option
If you call product support, the representative might ask you to run this option to determine the exact version of your software. This option only writes to a file; it does not start 3ds Max.
Follow the -z with a file name:
3dsmax −z id.txt
The file (in this example, id.txt) is written to the 3ds Max root directory.
Running Scripts from the Command Line
3ds Max allows you to enter MAXScript commands directly on the command line. When you launch 3ds Max from a DOS command line, you can have it run a specified launch script. This can be useful for tasks such as unattended batch rendering.
This capability uses the existing -U command line switch that names a utility to be run when 3ds Max is started. The -U switch allows an optional extra argument which, for MAXScript, is taken to be the name of the launch script to run. The case (capitalization) of MAXScript must be as shown in the following example (entered after you CD to 3ds Max directory):
3dsmax -U MAXScript rendercams.ms
This example command line would launch the 3ds Max executable , start MAXScript, and then have it run the launch scriptrendercams.ms.
The following example launch script loads two scenes, renders frames from each of the cameras in them, and then quits3ds Max:
loadMaxFile "foo.max"for c in cameras do render camera:c outputfile:("foo_"+c.name+".bmp")loadMaxFile "baz.max"for c in cameras do render camera:c outputfile:("baz_"+c.name+".bmp")quitMax #noPrompt
This example makes use of the quitMax() method to exit 3ds Max when the script is finished. Launch scripts need not be batch scripts as in this example, but may be used to condition 3ds Max for interactive use, for example by loading a scene file and setting some user-interface options.
The normal startup scripts, startup.ms and those in the \scripts\startup directory, are run before the launch script. It is also possible to install scripts into individual scene files that run automatically when that scene is open or closed or at certain other events.
MAXScript Command-Line Switches
The following switches work specifically with MAXScript files and functions.
Examples of desired syntax usage:
3dsmax.exe -silent -mxs "for c in cameras do render c outputFile:(c.name + ".bmp") vfb:off " file.max
This example starts 3ds Max in silent mode, opens file.max and renders each camera view to a BMP file without showing the Rendered Frame Window.
3dsmax.exe -q -mi -U MAXScript \\server1\folder\myScript.ms \\server2\folder\file.max
This example suppresses the splash screen while starting 3ds Max in a minimized state, opens file.max from a network server and runs myScript.ms found on another server. If myScript.ms contains the same commands as the first example, both of these examples would give the same results.
3dsmax.exe -q -silent -mip -mxs "for c in cameras do render c outputFile:(c.name + ".bmp") vfb:on; quitMAX() #nopromptfile.max" file.max
The final example suppresses the splash screen while starting 3ds Max in silent mode and in a permanently minimized state, opens file.max, renders each camera view to a BMP file showing the Rendered Frame Window, then exits 3ds Max.
- 从命令行启动3ds max(带命令行选项)并加载执行MAXScript
- maxscript(3ds Max) 备忘录(二)
- 3ds max - maxscript调试器使用指南
- 3ds max maxscript python 入门--执行python的三种途径
- 3ds max - 浅谈MaxScript与Max SDK的区别
- MaxScript——3ds max 中的物体系
- 3ds Max 2014的Maxscript中使用正则表达式
- 命令行执行带参数的php脚本,并取得参数
- 从命令行启动Services
- wireshark从命令行启动
- 从命令行启动应用程序
- 如何通过命令行启动VC并加载工程
- 201403-3 命令行选项
- CCF201403-3命令行选项
- CCF201403-3 命令行选项
- 201403-3 命令行选项
- 201403-3 命令行选项
- Msiexec(命令行选项)
- 多线程Operation
- 【多线程】(二)Interlocked系列函数
- java面试题-HashMap原理
- 逆波兰表达式
- LeetCode 126 Remove Element
- 从命令行启动3ds max(带命令行选项)并加载执行MAXScript
- 【10月末总结】
- c语言中可变参数
- Unity3D-游戏退出
- 【跟我一起学Unity3D】做一个2D的90坦克大战之地图编辑器
- Linux MEDIAWIKI+APACHE+PHP架构维基网站建置
- 独家秘方学技术
- 利用Avro Bindings向Oracle NoSQL读写数据
- 在mac下使用glfw进行OpenGL编程