Python maya.cmds.polySphere() Examples

The following are 6 code examples of maya.cmds.polySphere(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module maya.cmds , or try the search function .
Example #1
Source File: createGreenCageDeformer.py    From maya_greenCageDeformer with MIT License 6 votes vote down vote up
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]]) 
Example #2
Source File: MyWindow.py    From MayaDev with MIT License 5 votes vote down vote up
def btnCreateSphere_clicked(self):
        print('btnCreateSphere_clicked')
        cmds.polySphere() 
Example #3
Source File: Create.py    From rush with MIT License 5 votes vote down vote up
def polySphere():
    cmds.polySphere() 
Example #4
Source File: formExamples.py    From mGui with MIT License 5 votes vote down vote up
def create_sphere(*args, **kwargs):
    print "create my sphere"
    cmds.polySphere() 
Example #5
Source File: mayaSphere4.py    From tutorials with MIT License 5 votes vote down vote up
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] 
Example #6
Source File: createdNodesContext.py    From AdvancedPythonForMaya with GNU General Public License v3.0 5 votes vote down vote up
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()))