本文整理汇总了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()))