def exportGeoFromUI(): ''' writeGeoCache from UI ''' # Get UI info path = mc.textFieldButtonGrp('meshCache_pathTBG',q=True,text=True) start = mc.intFieldGrp('meshCache_rangeIFG',q=True,v1=True) end = mc.intFieldGrp('meshCache_rangeIFG',q=True,v2=True) pad = mc.intFieldGrp('meshCache_paddingIFG',q=True,v1=True) uvSet = mc.textFieldGrp('meshCache_uvSetTFG',q=True,text=True) worldSpace = bool(mc.radioButtonGrp('meshCache_spaceRBG',q=True,sl=True)-1) gz = mc.checkBoxGrp('meshCache_gzipCBG',q=True,v1=True) # Check UV Set if uvSet == 'default': uvSet = '' # Get selection sel = [i for i in mc.ls(sl=True,fl=True,o=True) if glTools.utils.mesh.isMesh(i)] if not sel: print 'No valid mesh objects selected for export!!' return # Export each mesh for mesh in sel: # Generate file name mesh_name = mesh.replace(':','_') # Export glTools.tools.meshCache.writeGeoCache(path,mesh_name,mesh,start,end,pad,uvSet,worldSpace,gz)