• 一些重要的mel命令


    一些重要的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的短名称必须全部小写






  • 相关阅读:
    前端html--position,旋转变换
    前端html--背景,文本,过渡效果属性
    前端html--margin,border,padding,盒模型
    前端html--css样式选择器
    前端html--超链接,表格,表单属性
    jQuery 中的事件绑定
    JavaScript简单了解
    private,protected,public和default的区别
    html基础和CSS选择器
    JSP小结
  • 原文地址:https://www.cnblogs.com/dydx/p/4378203.html
Copyright © 2020-2023  润新知