zoukankan      html  css  js  c++  java
  • 《How to run one script by command line in 3dsMax》

    https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/3DSMax/files/GUID-BCB04DEC-7967-4091-B980-638CFDFE47EC-htm.html

    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 script rendercams.ms.

    The following example launch script loads two scenes, renders frames from each of the cameras in them, and then quits 3ds 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 scriptsstartup 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.

    Note: Command line -U MAXScript startup scripts are run after 3ds Max has completely booted and the standard scripts and startup scripts have been run.

    MAXScript Command-Line Switches

    The following switches work specifically with MAXScript files and functions.

    SwitchEffect
    -mip Starts 3ds Max in a minimized mode – but never allows you to open the window for interactive usage.
    -mxs This switch is essentially the same as -U MAXScript file.ms, but avoids the need for the .ms file. You can follow the switch with MAXScript commands.
    -silent Comparable to the MAXScript command, setSilentMode, this switch suppresses all MAXScript and 3ds Max UI dialogs so that batch scripts specified by the –U command do not get interrupted.
    -u MAXScript  Opens a specified MAXScript file.

    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 \server1foldermyScript.ms \server2folderfile.max

    This example suppresses the splash screen while starting 3ds Max in a minimized state, opens file.max from a network server and runsmyScript.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.

  • 相关阅读:
    优步中国大举扩张,2016进军100城市!
    优步中国:2月底前进军广东、湖南、湖北18个城市
    Uber能知道你是不是在开车的时候玩手机
    Uber入驻四川乐山峨眉地区
    南京优步上线黄金区域,接单可享更高奖励!
    优步UBER司机全国各地奖励政策汇总 (2月1日-2月7日)
    成都Uber优步司机奖励政策(2月1日)
    北京Uber优步司机奖励政策(2月1日)
    滴滴快车奖励政策,高峰奖励,翻倍奖励,按成交率,指派单数分级(2月1日)
    跨程序共享数据,读取联系人信息
  • 原文地址:https://www.cnblogs.com/DeanWang/p/7148572.html
Copyright © 2011-2022 走看看