Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(18)  |  Call(18)  |  Derive(0)  |  Import(0)

src/g/l/glTools-HEAD/utils/component.py   glTools(Download)
 
			# Transform
			if selPath.apiType() == OpenMaya.MFn.kTransform:
				numShapesUtil = OpenMaya.MScriptUtil()
				numShapesUtil.createFromInt(0)
 
			# Mesh
			if selPath.apiType() == OpenMaya.MFn.kMesh:
				meshFn = OpenMaya.MFnMesh(selPath.node())
				vtxCount = meshFn.numVertices()
				componentSelList.add(objName+'.vtx[0:'+str(vtxCount-1)+']')
			# Curve
			elif selPath.apiType() == OpenMaya.MFn.kNurbsCurve:
				componentSelList.add(objName+'.cv[0:'+str(curveFn.numCVs()-1)+']')
			# Surface
			elif selPath.apiType() == OpenMaya.MFn.kNurbsSurface:
				surfaceFn = OpenMaya.MFnNurbsSurface(selPath.node())
				componentSelList.add(objName+'.cv[0:'+str(surfaceFn.numCVsInU()-1)+'][0:'+str(surfaceFn.numCVsInV()-1)+']')
			# Lattice
			elif selPath.apiType() == OpenMaya.MFn.kLattice:

src/g/l/glTools-HEAD/common/componentUtilities.py   glTools(Download)
 
				# Transform
				if selPath.apiType() == OpenMaya.MFn.kTransform:
					numShapesUtil = OpenMaya.MScriptUtil()
					numShapesUtil.createFromInt(0)
 
				# Mesh
				if selPath.apiType() == OpenMaya.MFn.kMesh:
					meshFn = OpenMaya.MFnMesh(selPath.node())
					vtxCount = meshFn.numVertices()
					mc.select(objName+'.vtx[0:'+str(vtxCount-1)+']')
					OpenMaya.MGlobal.getActiveSelectionList(componentSelList)
 
				# Curve
				elif selPath.apiType() == OpenMaya.MFn.kNurbsCurve:
 
				# Surface
				elif selPath.apiType() == OpenMaya.MFn.kNurbsSurface:
					surfaceFn = OpenMaya.MFnNurbsSurface(selPath.node())
					uCvCount = surfaceFn.numCVsInU()
 
				# Lattice
				elif selPath.apiType() == OpenMaya.MFn.kLattice:
					sDiv = mc.getAttr(objName+'.sDivisions')
					tDiv = mc.getAttr(objName+'.tDivisions')