本文整理匯總了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]])
示例2: btnCreateSphere_clicked
# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import polySphere [as 別名]
def btnCreateSphere_clicked(self):
print('btnCreateSphere_clicked')
cmds.polySphere()
示例3: polySphere
# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import polySphere [as 別名]
def polySphere():
cmds.polySphere()
示例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()
示例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]
示例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()))