一些重要的mel命令

查询多边形顶点

  1. xform -q -worldSpace -t "pCylinderShape1.vtx[0]"

设置顶点坐标
  1. xform -objectSpace -t $x $y $z "pCylinderShape1.vtx[0]"
获取多边形的信息
  1. // query the number of faces
  2. polyEvaluate -f;
  3. // Result: 16
  4. // query the number of triangles
  5. polyEvaluate -t;
  6. // Result: 32
  7. // query the number of selected faces
  8. polyEvaluate -faceComponent;
  9. // Result: 2
  10. // query the number of vertices and faces
  11. polyEvaluate -v -f;
  12. // Result: 25 16
  13. // formatted query of the number of vertices and faces
  14. polyEvaluate -v -f -fmt;
  15. // Result: vertex=25 face=16
获取某个节点的连接信息
  1. // List all connections to BALL
  2. string $list[] = `listConnections BALL`;
  3. // List only incoming connections from BALL.tx
  4. listConnections -d off -s on BALL.tx;
  5. // List connections from BALL to nodes of type 'transform'
  6. listConnections -t transform;
  7. // List connections on BALL, ignoring unit conversion nodes
  8. listConnections -scn on BALL;
创建、取消节点连接
  1. // Connect the translation of two nodes together
  2. connectAttr firstGuy.t secondGuy.translate;
  3. // Connect the rotation of one node to the override colour
  4. // of a second node.
  5. connectAttr firstGuy.rotate secondGuy.overrideColor;
  6. // Break the connection between the rotate attributes.
  7. //
  8. disconnectAttr ($sph[0] + ".r") ($con[0] + ".r");
由变换节点获得形状节点
  1. $shapes = `listRelatives -shapes pCylinder1`;
  2. // List the name of the shape below the transform node.
  3. // (The result of the command is shown)
  4. string $shapes[] = `listRelatives -s -path "nexus"`;
  5. // Result: nexus|nexusShape //
粒子系统相关命令
  1. clearParticleStartState $ptclShape; // 把粒子的初始状态设为空,也就是清除所有粒子
  2. emit -object $ptclShape -pos $x $y $z; // 往粒子系统添加粒子
  3. saveInitialState $ptclShape; // 把当前状态设置为初始状态


自定义命令的注意事项

flag的短名称必须全部小写


一些重要的mel命令的更多相关文章

  1. 一些MEL命令

    这几天写maya脚本,发现一些新命令:   动画命令 cutKey 剪切某段动画曲线 simplify 简化某段曲线   基本命令 getAttr -size 数组属性名    获得数组属性的元素个数 ...

  2. 六、通过插件如何创建自己的MEL command

    1. MAYA API支持不同类型的plugin (1)Command Plugin——扩充MEL命令 (2)Tool Commands——通过鼠标输出 (3)DG plugin——对场景添加新的操作 ...

  3. 十三、File Translator怎么写

    ---恢复内容开始--- 1. File Translator可以将信息从maya中导入和导出. 2. 创建一个file translator需要从MPxFileTranslator继承. 3. 函数 ...

  4. 关于maya动力学系统的一些总结

    maya动力学有以下几套系统: 1.刚体.柔体系统 刚体系统的典型节点连接方法如下: 物体的变换节点.形状节点连接rigidBody节点,刚体节点输出力到解算器节点,解算器输出新的变换到变换节点 值得 ...

  5. 看ImplicitBackwardEulerSparse关于static solve的代码

    当选择static solve的时候,求解的流程如下: 1.获得内力 2.qresidual = 外力-内力,qdelta = qresidual, qdelta的非约束元素赋给bufferConst ...

  6. 考虑与Maya结合

    今天改进了Hessian各块的计算代码,减少了一些内存操作.下一步准备把模拟平台与Maya结合,这样就可以利用Maya丰富的变形算法了. 这一步需要考虑以下问题: 1.把场景设置为某一帧.这一点可以用 ...

  7. Maya FEM节点框架完成

    这几天把物理模拟框架移植到maya之中了. maya编程有一点比较关键,就是要让自己的程序逻辑适应maya的节点求值机制.在物理模拟中,往往需要进行时间积分,对此我的解决办法是,写一个节点rigSim ...

  8. maya绝招(41--60)

    第41招 捕捉和旋转 从MAYA5开始,双击工具箱中的移动缩放旋转工具,马上就可以调出工具属性栏.以旋转为例,将Snap Rotate勾选,并设置Step Size数值,就可以旋转特定的数值了 第42 ...

  9. maya 操作自我整理(一)

    绘制曲线时的点的控制 当我们在使用CV Curve Tool或者EP Curve Tool创建NURBS曲线的过程中,按下"Insert"键,配合键盘上的上.下箭头方向键,可以自由 ...

随机推荐

  1. Sharepoint学习笔记—习题系列--70-576习题解析 -(Q1-Q3)

    这里我把从网上搜集到的针对Sharepoint 70-576的有关练习进行系统的解析,整理成一个系列, 分期.分批次共享出来,供大家研究. 70-573考试注重的是"知道"相关知识 ...

  2. Xcode常用快捷键

    1. 文件CMD + N: 新文件CMD + SHIFT + N: 新项目CMD + O: 打开CMD + S: 保存CMD+OPt+S:保存所有文件CMD + SHIFT + S: 另存为CMD + ...

  3. [MySQL Reference Manual] 6 安全性

    6. 安全性 在Mysql安装配置时要考虑安全性的影响,以下几点: Ÿ   常规因素影响安全性 Ÿ   程序自身安全性 Ÿ   数据库内部的安全性,即,访问控制 Ÿ   网络安全性和系统安全性 Ÿ   ...

  4. 神奇的decimal,也许面试会问到哦~

    这段时间忙的像狗一样,写博客的事情也就耽搁了,继续扯,为什么说decimal神奇呢,大家都知道decimal是基元类型,但是 这个decimal类型在IL中居然没有相应的IL指令,也就是说CLR根本不 ...

  5. HBase应用开发回顾与总结系列之四:HBase配置管理类接口设计

      利用Eclipse进行HBase应用开发时,至少需要确定三个配置信息,如下表所示: #hbase config #HMaster服务部署主机及端口号 hbase.master=hdp-wuyong ...

  6. python基础(一)

    简单的‘Hello World!’ Python命令行 假设你已经安装好了Python, 那么在Linux命令行输入: $python 将直接进入python.然后在命令行提示符>>> ...

  7. jsp html5 video实现在线视频播放源码,支持IE6,7,8,10,11,谷歌,火狐等浏览器

    jsp源码: <%@ page language="java" import="java.util.*" pageEncoding="utf-8 ...

  8. HQL的一些语句总结

    HQL原文来自:http://slaytanic.blog.51cto.com/2057708/782175/   Slaytanic老师 关于Hadoop的介绍来自:http://www.cnblo ...

  9. ORACLE之ASM概念

    一.     ASM(自动存储管理)的来由: ASM是Oracle 10g R2中为了简化Oracle数据库的管理而推出来的一项新功能,这是Oracle自己提供的卷管理器,主要用于替代操作系统所提供的 ...

  10. mapred-site.xml 配置在线更新

    环境:ibm jdk , cdh2.35.0.2 需求:更新mapred-site.xml 中的mapreduce.map.java.opts 和 mapreduce.reduce.java.opts ...