一半君的总结纸

听话只听一半君

Tag Archives: mel

#55 如何从已知的多边形面得到相应的点或者边(返回结果按逆时针方向排序 ( “render” order) )?

下图中有一个当前选中的多边形(polymesh)的面(face). 如果我们使用API查询这个面的信息,可以知道Maya是按照如下顺序连接4个点来得到这个面的: 11, 4, 12, 9. 或者也可以说,是按照如下的顺序来生成4条边的: 13, 14, 18, 17.

阅读余下文章

#03 怎样得到当前选中的多边形(polymesh)的面(face)所包含的所有点(vertex)或边(edge)? (或者反之得到选择的面)

有个隐藏的(其实并不能算隐藏,只是他的名字不是那么望文生义)的MEL命令可以达到我们的目的(最初在Quang Tran的edgePath/facePath工具里被用到):

polyListComponentConversion

阅读余下文章

#03 How can a get a list of all vertex or edge components that are associated with a polymesh face? (or vice versa)

There’s a nice little hidden (well, non-obvious anyway) MEL command that came to light with Quang Tran’s edgePath/facePath tools:

polyListComponentConversion

阅读余下文章

#02 怎样才能知道当前场景文件里有哪些参考文件(references),怎样知道他们现在是loaded还是unloaded状态,如何load或者unload他们?

下面的命令可以返回当前场景文件中所有的参考文件(referenced files):

string $references[] = `file -q -r`;
references = pm.getReferences()
references = cmds.file(q=True,r=True)

阅读余下文章

#02 How do I determine which Reference files are currently defined or loaded? How do I load and unload them?

To find out which References exist for the currently loaded file:

string $references[] = `file -q -r`;

阅读余下文章

#01 How do you find out all these things about MEL? I can’t find some things in the documentation!

Believe it or not, I always recommend Maya’s MEL documentation to learn the syntax: bookmark the “MEL Functions: Alphabetical” page. Check out all of the MEL commands available. Browse the DG node docs as well to get a sense of the internal workings and relationships.

Also, I snoop a lot. I scan and search the “internal” MEL scripts that activate tools, perform commands, create windows and dialogs.

阅读余下文章

#01 怎样找到Script Editor里出来的那些命令? 为什么有些命令在帮助里找不到!

首先应该去MAYA自带的MEL帮助里找: 把”MEL Functions: Alphabetical” 放到你的收藏夹上. 在这里你可以找到所有的MEL命令. 这里同时也列出了所有的 DG 节点.

有些”内部的” MEL 脚本你在这里是找不到的,比如被用来设置当前的tool, 创建窗口和对话框的一些脚本.

阅读余下文章

#00 我以前从没写过代码,怎么破!!!怎样才能快速的学会写Mel Script? 去报 C, C++ or Java 的培训班有用咩?

in short ,没用 …
首先我来说说我是怎么开始写代码的

阅读余下文章

#00 I’ve never done any programing before. What is the best way to start learning how to write MEL scripts? Would courses that teach C, C++ or Java help?

First I’ll tell you my background in scripting and coding:

I started with learning BASIC on the Commodore PET machines, circa 1982. In 1983 I bought a VIC-20 and continued BASIC programming. I moved up through the C-64 and the Amiga, where I finally tackled learning C. Once I got into PC-land, I tried my hand at plug-ins for Lightwave, C++ and Java.

阅读余下文章