python类polyListComponentConversion()的实例源码

validate_normals.py 文件源码 项目:config 作者: mindbender-studio 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def process(self, instance):
        from maya import cmds

        invalid = list()
        for mesh in cmds.ls(instance, type="mesh", long=True):
            faces = cmds.polyListComponentConversion(mesh, toVertexFace=True)
            locked = cmds.polyNormalPerVertex(faces,
                                              query=True,
                                              freezeNormal=True)

            invalid.append(mesh) if any(locked) else None

        # On locked normals, indicate that validation has failed
        # with a friendly message for the user.
        assert not invalid, (
            "Meshes found with locked normals: %s" % invalid)

        self.log.info("The normals of \"%s\" are correct." % instance)
validate_normals.py 文件源码 项目:pyblish-starter 作者: pyblish 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def process(self, instance):
        from maya import cmds

        invalid = list()
        for mesh in cmds.ls(instance, type="mesh", long=True):
            faces = cmds.polyListComponentConversion(mesh, toVertexFace=True)
            locked = cmds.polyNormalPerVertex(faces,
                                              query=True,
                                              freezeNormal=True)

            invalid.append(mesh) if any(locked) else None

        # On locked normals, indicate that validation has failed
        # with a friendly message for the user.
        assert not invalid, (
            "Meshes found with locked normals: %s" % invalid)

        self.log.info("The normals of \"%s\" are correct." % instance)
unused_node.py 文件源码 项目:surume 作者: tm8r 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def get_vertexes():
    sl = cmds.ls(sl=True)
    for s in sl:
        uvs = cmds.polyListComponentConversion(s, tuv=True)
        if not uvs:
            continue
        res = cmds.ls(uvs, fl=True)
        # print(res)
zbw_rig.py 文件源码 项目:zTools 作者: zethwillie 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def getVertUV(vertsList = [], *args):
    """use a vert input to get the UV value"""
    uvVals = []
    for v in vertsList:
        uv = cmds.polyListComponentConversion(v, fv=True, tuv=True)
        uvVal = cmds.polyEditUV(uv, q=True, u=True, v=True)
        uvVals.append(uvVal)
    return(uvVals)


问题


面经


文章

微信
公众号

扫码关注公众号