使用 Shotgun Toolkit 时 3ds Max 在启动时崩溃。

注意:本文档介绍仅当您能够控制 Toolkit 配置时才可用的功能。如果没有更高级的配置,请与支持部门联系。

从 Shotgun Desktop 或 Shotgun 网站启动 3ds Max 时,3ds Max 可能会冻结,同时出现一个冻结的白色对话框或者显示以下消息:

Microsoft Visual C++ Runtime Library (Not Responding)
Runtime Error!
Program: C:\Program Files\Autodesk\3ds Max 2016\3dsmax.exe
R6034
An Application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.

这通常是由于路径中的 msvcr90.dll 版本与 3ds Max 捆绑的 Python 版本发生冲突。

解决方案

首先,转到工作流配置的 config/hooks 文件夹并创建文件 before_app_launch.py。在该文件中,粘贴以下内容:

"""
Before App Launch Hook
This hook is executed prior to application launch and is useful if you need
to set environment variables or run scripts as part of the app initialization.
"""
import os
import tank

class BeforeAppLaunch(tank.Hook.get_hook_base_class()):
    """
    Hook to set up the system prior to app launch.
    """
    def execute(self, **kwargs):
        """
        The execute functon of the hook will be called to start the required application
        """
        env_path = os.environ["PATH"]
        paths = env_path.split(os.path.pathsep)
        # Remove folders which have msvcr90.dll from the PATH
        paths = [path for path in paths if "msvcr90.dll" not in map(
            str.lower, os.listdir(path))
        ]
        env_path = os.path.pathsep.join(paths)
        os.environ["PATH"] = env_path

现在,保存该文件。

然后,打开工作流配置中的 config/env/includes/app_launchers.yml 并查找 launch_3dsmax 条目。您应该将 hook_before_app_launch: default 替换为 hook_before_app_launch: '{config}/before_app_launch.py'.

您现在应该能够正常从 Shotgun 和 Shotgun Desktop 启动 3ds Max。如果仍然有问题,请联系 support@shotgunsoftware.com。

关注

0 评论

登录写评论。