Hey I am trying to create a method to handle creating new objects, with a 
dictionary

class GenerationProperties():
    primitives = { 
        'sphere' : cmds.polySphere,
        'geosphere' : cmds.polyPrimitive,
        'cube' : cmds.polyCube,
        'cylinder' : cmds.polyCylinder,
        'cone' : cmds.polyCone,
        'plane' : cmds.polyPlane,
        'torus' : cmds.polyTorus,
        'prism' : cmds.polyPrism, 
        'pyramid' : cmds.polyPyramid,
        'pipe' : cmds.polyPipe,
    }


    def CreatePrimitive(self, primitiveType, subdivisionsX = 1, 
subdivisionsY = 1):
        prim = self.primitives[primitiveType]()
        #how can I refrence prim to change it's subdivisions after I created
?
        # cmds.'Type?'(prim, subdivisionsX, subdivisionsY)



The problem that I am having is I don't know how I can use 
cmds.poly'Type'() as a generic (cast) to change the subdivisions or edit 
after I create the primitive. 


Any help would be appreciated! 

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/331d4f46-5bb2-45dd-9b9d-bde6b7caff91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to