当前位置: 首页 > article >正文

后台使用Motionbuilder

问题描述

当使用脚本批量处理任务时,希望能用Motionbuilder后台执行一个python文件

解决方法

motionbuilder.exe -batch -s Script_Path

使用命令行标记

完整命令行标记一览

Flag Options

-help
    Displays this help information and exits. (also -?)

-batch
    Starts MotionBuilder in batch mode (without the UI). This flag is
    usually used for executing a Python script, which can be set with
    the -F flag.

-buildInfo
    Displays the MotionBuilder build information and exits.

-console
    (Windows only) This opens an output window used by FBTrace in the
    OR SDK, where the appropriate stdout/err stream goes. If you choose to
    use this console output window for Python output, you also need to use
    the -verbosePython flag.

-F [filename]
    This is an alternative way to open a file with MotionBuilder at
    startup. If this flag is omitted, you must specify the filename you
    want to open as the last parameter in the list.

-G [width] [height]
    Sets the window size of MotionBuilder to the values specified. The
    default state is maximized.

-S
    Starts MotionBuilder in full screen mode. This is equivalent to
    selecting Display > Full Screen inside the Viewer. To exit full screen
    mode, press Alt+Enter or Esc.

-suspendMessages
    Disables all the warnings and pop-up dialogs. This flag is useful for
    automation purposes when you do not want the script to be interrupted
    by dialog boxes. By default, all warnings and dialog boxes are shown.

-T[UI Name]
    Finds a tool with the matching name among the tools that MotionBuilder
    has registered, and if it is found, activates it. This flag parameter
    is case sensitive. Note: There is no space between the -T and the
    [UI Name] parameter.

-verbosePython
    Outputs all Python messages to the appropriate stdout/err stream. This
    puts the Python print messages to the window that you activate using
    the -console flag as well as to the Python Editor. This is the same
    location that FBTrace outputs to when using the OR SDK. By default,
    Python output is only presented in the Python Editor.

-3
    Enables warnings about features that will be removed in Python 3.0
    You can use this flag to see how much work will be necessary to port
    code to Python 3.0.

--sdk-begin & --sdk-end
    The SDK plug-in developers can access command line arguments within a
    pair of delimiters (--sdk-begin & --sdk-end). See the
    FBSystem::GetCommandLineArgs() function reference.

Usage Examples

Opens the scene contained in mia_blue.fbx on startup.

    motionbuilder.exe mia_blue.fbx


Launches in full screen mode and opens the scene contained in mia_blue.fbx.

    motionbuilder.exe -S mia_blue.fbx


Launches the script testScript.py on startup and suppresses all message
boxes that the script might generate.

    motionbuilder.exe -suspendMessages testScript.py


Launches the Audio tool located in the sample tools folder on startup.
Note: The Audio tool needs to be compiled first.

    motionbuilder.exe -TAudio


Launches the script Script.py and sends the output to the console output
window.

    motionbuilder.exe -console -verbosePython Script.py


Launches with an active window of 500x500, and opens the scene
mia_blue.fbx.

    motionbuilder.exe -G 500 500 mia_blue.fbx


Launches the console, the Python Editor tool, and opens the scene contained
in mia_blue.fbx. Note: The quotes surrounding "-TPython Editor" are there
to ensure the Python Editor tool is launched. Without these quotes, only
the Python tool would be launched, if it exists.

    motionbuilder.exe -console "-TPython Editor" mia_blue.fbx

Environment Variables

MB_CONFIG_DIR
    The directory specified in this environment variable determines the
    location where MotionBuilder configuration will be stored. If not set,
    configuration files will be stored in document or home directory.

MOTIONBUILDER_PLUGIN_PATH
    The list of directories contained in this environment variable
    determines the location from which MotionBuilder will load compiled
    plug-ins.

MOTIONBUILDER_PYTHON_STARTUP
    The list of directories contained in this environment variable
    determines the location from which MotionBuilder will load Python
    startup scripts.

MOBU_FBX_EXTENSION_PATH
    The list of directories contained in this environment variable
    determines the location from which MotionBuilder will load FBX MB
    extension plug-ins.

FILMBOX_CONSOLE
    (Windows only) Setting this environment variable to 1 allows the
    console to appear, otherwise the console will not appear.

K_NO_CRASH_RECOVERY
    (Linux only) Setting this environment variable to 1 enables the
    CrashRecoverySignalHandler, otherwise it is disabled.

MOTIONBUILDER_SAVELOAD_EMBEDMEDIAS
    This environment variable is used for overriding the corresponding
    setting in a configuration file. Any other value except Yes is
    considered as false.

MOTIONBUILDER_SAVELOAD_SHOWEMBEDMEDIASOPTION
    The ShowEmbedMediasOption preference item can be used in the SaveLoad
    section of a configuration file to control whether the Embed Medias
    checkbox appears in the Save dialog box. This environment variable can
    can also be used for overriding the corresponding setting in a
    configuration file. Any other value except Yes is considered as false.

http://www.kler.cn/a/290212.html

相关文章:

  • vivo 游戏中心包体积优化方案与实践
  • 使用pytest+openpyxl做接口自动化遇到的问题
  • vue项目npm run serve出现【- Network: unavailable】(从排查到放弃)
  • 矩阵的各种计算:乘法、逆矩阵、转置、行列式等——基于Excel实现
  • 985研一学习日记 - 2024.11.12
  • PaaS云原生:分布式集群中如何构建自动化压测工具
  • 聚类算法-Kmeans聚类
  • 【60天备战软考高级系统架构设计师——第八天:设计模式概述】
  • Spring Boot项目中结合MyBatis详细使用
  • “智能化自动化” 架构之4:中间建模脑的软件设计三大原则-依赖倒置控制反转和依赖注入
  • 在react中利用three.js 渲染模型 让鼠标拖拽是模型转动
  • redhat7.9安装zsh以及常用插件
  • 具有平面规则性的单目视觉惯性里程计
  • 反射API与AOP在微服务治理中的实践与思考
  • 飞利浦开放式耳机怎么样?南卡、飞利浦、QCY耳机真实测评
  • 【Leetcode 2399 】 检查相同字母间的距离 —— 哈希表
  • git分支的管理
  • Windows 欺骗主机 Burn-In 的自动化工具
  • Mysql-慢SQL的处理以及SQL优化
  • webpack--处理资源
  • 【linux002】目录操作命令篇 - ls 命令
  • 用table展示表头和侧边都是动态
  • 注册安全分析报告:央视网
  • 基于SpringBoot+Vue+MySQL的宠物寄养服务管理系统
  • ElementPlus实现页面,上部分是表单,下部分是表格
  • 从PX4源码PX4-Autopolite中的Boards中选择适合自己移植的版本