在Eclipse(使用PyDev)和EclipseMayaEdi中突出显示maya命令(例如polySphere)

2024-06-02 17:57:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我一直在找这个,但两个小时后我放弃了。在

我想用另一个IDE动态地使用Python运行maya脚本。所以我下载了Eclipse并安装了一些插件:EclipseMayaEditor(将Eclipse与Maya中的脚本编辑器连接)和PyDev(这样我就可以在Eclipse中使用python解释器)。在

它工作得非常好,我可以连接IDE和maya并从一个跳到另一个。但是我错过了玛雅脚本编辑器中的一个功能。。。在

Eclipse没有突出显示maya命令,如xformpolySphere等等。。。这不是什么大问题,但当我盯着屏幕看几个小时的时候,我的眼睛有点疼。。。在

有没有什么方法可以突出显示maya命令或maya节点或它们的名称(请原谅我缺乏技术词汇表)

非常感谢。在


Tags: 命令功能脚本插件动态编辑器ide解释器
2条回答

This article遍历使自动完成工作的步骤。虽然它没有完整的语法高亮显示那么好,但是它提供了在Eclipse中自动扩展函数名、字段和方法的功能。在

基本上,您需要确保您的解释器知道maya python目录和maya安装中pypredef文件夹的位置。这是我的照片。这是我的Maya python解释器的“库”选项卡:

enter image description here

这是预先设定的标签:

enter image description here

当然,路径将与maya的安装位置相关,但这足以启用“自动完成”。您可以在“首选项”>;“主题”设置中自定义颜色方案,但我不知道如何像maya编辑器那样从其他模块调用特定导入。在

我自己没有尝试过,但是Eclipse Maya Editor插件看起来很有前途。你试过了吗?根据描述:

This is a plugin for Eclipse that turns it into a Maya IDE. As it is Python-centric, it also requires the pyDev plugin. Features include:

  • Send the entire contents of an editor to Maya
  • Send a highlighted selection to Maya
  • Python and mel scripts supported
  • Anything done within Maya's own script editor is also echoed in the console view
  • Change the port number of the socket at any time
  • Open up documentation for Maya's Python API, Python Commands, Pymel, Qt, PySide, PyQt and User options
  • Get results back from Maya in it's own console view
  • Eclipse Helios, Eclipse Indigo and Eclipse Juno supported. Requires PyDev plugin.

不过,进一步阅读,它看起来可能无法突出显示。从列为“待定”的功能请求:

Color highlighting on maya python commands
Only maya mel commands get colored, but not maya python commands. The default python functions get highlighted, but not maya’s python commands. I find it useful to avoid typos...

有可能请求已经过期,并且从那时起就被实现了。你得自己试试才能确定。让我们知道!在

相关问题 更多 >