pymxs 替代已弃用的 MaxPlus 实用程序函数

问题描述

随着 Autodesk 从 3ds Max 中删除 MaxPlus,我现在不得不重新编写一些代码,并且想知道是否有其他方法可以访问某些 MaxPlus 实用程序功能。虽然我认为在 pymxs 下整合 Python 开发的决定是一个很好的决定,但如果事先移植了 pymxs 不支持的 MaxPlus 功能就更好了。

我现在需要寻找解决方案的已弃用 MaxPlus 实用程序函数示例:

MaxPlus.ViewportManager.GetActiveViewportShowEdgeFaces()
MaxPlus.PathManager.GetProjectFolderDir()
MaxPlus.PathManager.GetAutobackDir()

任何为我指明正确方向的帮助,将不胜感激。

解决方法

大多数视口功能位于 NitrousGraphicsManager 类中,因此对于您的第一个功能,请尝试:

>>> graphicsmanager = 
pymxs.runtime.NitrousGraphicsManager.GetActiveViewportSetting()
>>> graphicsmanager.ShowEdgedFacesEnabled
False
>>> graphicsmanager.ShowEdgedFacesEnabled = True

您可以在 pathconfig 结构中找到的第二个:

pymxs.runtime.pathconfig.getCurrentProjectFolderPath()

第三个存储为 3ds Max 系统目录,所以这应该可以工作:

>>> pymxs.runtime.GetDir(pymxs.runtime.name('autoback'))