當前位置: 首頁>>代碼示例>>Python>>正文


Python cmds.polySphere方法代碼示例

本文整理匯總了Python中maya.cmds.polySphere方法的典型用法代碼示例。如果您正苦於以下問題:Python cmds.polySphere方法的具體用法?Python cmds.polySphere怎麽用?Python cmds.polySphere使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在maya.cmds的用法示例。


在下文中一共展示了cmds.polySphere方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: doit

# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import polySphere [as 別名]
def doit(cage_tgt=None):
    if not cage_tgt:
        cage_tgt = cmds.ls(sl=True, o=True)
    cage = cage_tgt[0]
    tgt = cage_tgt[1:]

    cmds.loadPlugin('greenCageDeformer.py', qt=True)
    deformer = cmds.deformer(tgt, type='greenCageDeformer')[0]

    freezer = cmds.createNode('transformGeometry')
    cmds.connectAttr(cage + '.o', freezer + '.ig')
    cmds.connectAttr(cage + '.wm', freezer + '.txf')
    cmds.connectAttr(freezer + '.og', deformer + '.bc')
    cmds.disconnectAttr(freezer + '.og', deformer + '.bc')
    cmds.delete(freezer)

    cmds.connectAttr(cage + '.w', deformer + '.ic')
    cmds.dgeval(cmds.listConnections(deformer + '.og', s=False, d=True, sh=True, p=True))


#doit([cmds.polyCube(w=2.5, d=2.5, h=2.5)[0], cmds.polySphere()[0]]) 
開發者ID:ryusas,項目名稱:maya_greenCageDeformer,代碼行數:23,代碼來源:createGreenCageDeformer.py

示例2: btnCreateSphere_clicked

# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import polySphere [as 別名]
def btnCreateSphere_clicked(self):
        print('btnCreateSphere_clicked')
        cmds.polySphere() 
開發者ID:WendyAndAndy,項目名稱:MayaDev,代碼行數:5,代碼來源:MyWindow.py

示例3: polySphere

# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import polySphere [as 別名]
def polySphere():
    cmds.polySphere() 
開發者ID:minoue,項目名稱:rush,代碼行數:4,代碼來源:Create.py

示例4: create_sphere

# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import polySphere [as 別名]
def create_sphere(*args, **kwargs):
    print "create my sphere"
    cmds.polySphere() 
開發者ID:theodox,項目名稱:mGui,代碼行數:5,代碼來源:formExamples.py

示例5: _create

# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import polySphere [as 別名]
def _create(self, opts={}):   
        """
        Overload _create() method from MayaSphere with a new
        one that will generate a polySphere instead.
        """
        parts = cmds.polySphere(**opts)
        self.name = parts[0] 
開發者ID:justinfx,項目名稱:tutorials,代碼行數:9,代碼來源:mayaSphere4.py

示例6: test

# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import polySphere [as 別名]
def test():
    cmds.file(new=True, force=True)
    with CreatedNodesContext() as cnc:
        cubes = cmds.polyCube()
        cmds.polySphere()
        cmds.spaceLocator()
        cmds.delete(cubes)
        print "Created the following nodes:\n\t%s" % ('\n\t'.join(cnc.nodes())) 
開發者ID:dgovil,項目名稱:AdvancedPythonForMaya,代碼行數:10,代碼來源:createdNodesContext.py


注:本文中的maya.cmds.polySphere方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。