class WinA_Global: winName = "sgExportCache" title = "Export Cache" width = 500 height = 50 titleBarMenu = True exportPath_txf = '' exportType_radio = '' searchFor_txf = '' searchFor_txf = '' searchForType_radio = '' searchForType_check = '' searchForType_txf = '' fld_startFrame = '' fld_endFrame = '' om_cacheType = '' om_pointsSpace = '' import sgBFunction_fileAndPath infoFolderPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_cache_export' infoPathPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_cache/filePath.txt' infoPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_cache_export/info.txt'
class WinA_Global: winName = "sgPWindow_data_keyAndCache_export" title = "Export Data Key And Cache Export" width = 500 height = 50 titleBarMenu = True exportKeyPath_txf = '' exportCachePath_txf = '' fld_startFrame = '' fld_endFrame = '' chk_exportByMatrix = '' optionMenu = '' import sgBFunction_fileAndPath cacheExportInfoFolder = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_cache' cacheExportInfoFile = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_cache/filePath.txt' keyExportInfoFolder = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_key' keyExportInfoFile = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_key/filePath.txt' infoPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_keyAndCache_export/info.txt'
class WinA_Global: winName = "sgExportMeshGroup" title = "Export Mesh Group" width = 500 height = 50 titleBarMenu = True exportPath_txf = '' exportType_radio = '' searchFor_txf = '' searchFor_txf = '' searchForType_radio = '' searchForType_check = '' searchForType_txf = '' import sgBFunction_fileAndPath infoFolderPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_mesh_exportGroup' infoPathPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_mesh_group/filePath.txt' infoPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_mesh_exportGroup/info.txt'
class WinA_Global: winName = "sgExportKey" title = "Export Key" width = 500 height = 50 titleBarMenu = True exportPath_txf = '' exportType_radio = '' searchFor_txf = '' searchFor_txf = '' searchForType_radio = '' searchForType_check = '' searchForType_txf = '' fld_startFrame = '' fld_endFrame = '' chk_exportByMatrix = '' import sgBFunction_fileAndPath infoFolderPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_key_export' infoPathPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_key/filePath.txt' infoPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_key_export/info.txt'
class WinA_Global: winName = "sgImportMeshGroup" title = "Import Mesh Group" width = 500 height = 50 titleBarMenu = True import sgBFunction_fileAndPath infoFolderPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath() + '/sgPWindow_data_mesh_importGroup' infoPathPath= sgBFunction_fileAndPath.getLocusCommPackagePrefsPath() + '/sgPWindow_data_mesh_group/filePath.txt' infoPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath() + '/sgPWindow_data_mesh_importGroup/info.txt'
class WinA_Global: winName = "sgImportCache" title = "Import Cache" width = 500 height = 50 titleBarMenu = True import sgBFunction_fileAndPath infoFolderPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_cache_import' infoPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_cache/filePath.txt'
class WinA_Global: winName = sgBModel_sgPWindow.sgPWindow_file_keyAndCache_export_winName title = "Export File Key And Cache" width = 500 height = 50 titleBarMenu = True exportKeyPath_txf = '' exportCachePath_txf = '' fld_startFrame = '' fld_endFrame = '' fld_step = '' chk_exportByMatrix = '' optionMenu = '' import sgBFunction_fileAndPath cacheExportInfoFile = sgBFunction_fileAndPath.getPathInfo_sgPWindow_file_cache( ) keyExportInfoFile = sgBFunction_fileAndPath.getPathInfo_sgPWindow_file_key( ) infoPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_file_keyAndCache_export/info.txt' sgBModel_editUi.targetWindowsClose_whenSceneUpdate.append(winName)
class WinA_Global: winName = "sgPWindow_object_cam_export" title = "Export Camera" width = 500 height = 50 titleBarMenu = True txf_export = '' fld_startFrame = '' fld_endFrame = '' import sgBFunction_fileAndPath infoFolderPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_object_export' infoFilePath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_object_export/filePath.txt'
class WinA_Global: winName = "sgExportSceneBakeInfo" title = "Export Scene Bake Info" width = 500 height = 50 titleBarMenu = True import sgBFunction_fileAndPath filePathInfo = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_data_sceneBakeInfo/filePath.txt'
class WinA_Global: winName = sgBModel_sgPWindow.sgPWindow_file_meshGroup_import_winName title = "Import Mesh Group" width = 500 height = 50 titleBarMenu = True import sgBFunction_fileAndPath pathInfo = sgBFunction_fileAndPath.getPathInfo_sgPWindow_file_meshGroup() uiInfo = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_file_mesh_importGroup/info.txt'
def __init__(self): self.winName = 'sgWindow_data_mesh_import01' self.title = 'Import Mesh' self.width = 400 self.height = 50 self.field_mesh = Win01_field( 'Import Mesh Path : ' ) self.field_uv = Win01_field( 'Import UV Path : ' ) self.check = Win01_checkBox( "Skip Import by Name" ) self.buttons = Win01_buttons( 'Import Mesh', 'Import UV' ) self.cmd = Win01_command( self ) import sgBFunction_fileAndPath self.infoPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath() + '/sgPWindow_data_mesh/info.txt'
class WinA_Global: winName = 'sgAimConstraint' title = 'Aim Constraint' width = 300 height = 50 chk_autoAxis = '' omg_aimAxis = '' chk_createUp = '' chk_editUp = '' sep_00 = '' chk_mo = '' but_const = '' infoPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath() + '/sgAimConstraint/info.txt'
def __init__(self): self.winName = 'sgWindow_data_mesh_import01' self.title = 'Import Mesh' self.width = 400 self.height = 50 self.field_mesh = Win01_field('Import Mesh Path : ') self.field_uv = Win01_field('Import UV Path : ') self.check = Win01_checkBox("Skip Import by Name") self.buttons = Win01_buttons('Import Mesh', 'Import UV') self.cmd = Win01_command(self) import sgBFunction_fileAndPath self.infoPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/sgPWindow_file_mesh/info.txt'
def assignCommand(targetPath): import sgBFunction_fileAndPath locusPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath() radioButtonInfoPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + '/radioButtonInfo' for root, dirs, names in os.walk(targetPath): root = root.replace('\\', '/') targets = [] for dir in dirs: targets.append([dir, 'isDir']) for name in names: extention = name.split('.')[-1] f = open(root + '/' + name, 'r') data = f.read() f.close() if extention in ['mel', 'melScript']: targets.append([ name, "import maya.mel\nmaya.mel.eval('source \"%s\"')" % (root + '/' + name) ]) else: if data.find('%') != -1: targets.append( [name, 'execfile( "%s" )' % (root + '/' + name)]) else: targets.append([name, data]) targets.sort() for i in range(len(targets)): target, command = targets[i] splits = root.replace(targetPath, '')[1:].split('.') if len(splits) == 1: parentUIName = _3dGroupMenu else: parentUIName = getUIName(root.split('/')[-1]) targetUIName, label = getUINameAndLabel(target) targetOnlyName = target.split('.')[1] if targetOnlyName[0] == '@': if targetOnlyName == '@radioCollection': cmds.radioMenuItemCollection(targetUIName, p=parentUIName) else: firstLine = command.split('\n')[0] uiName = firstLine.split("'")[-2] cmds.menuItem(uiName, l=label[1:], c=command, radioButton=False, p=parentUIName) elif targetOnlyName[0] == '#': dividerLabel = targetOnlyName[1:].replace('-', '') if dividerLabel: if i == 0: cmds.menuItem(targetUIName + 'labelSpace', l='', p=parentUIName) cmds.menuItem(targetUIName + targetOnlyName, d=1, dividerLabel=dividerLabel, p=parentUIName) else: cmds.menuItem(targetUIName + targetOnlyName, d=1, p=parentUIName) else: if command == 'isDir': cmds.menuItem(targetUIName, l=label, sm=1, p=parentUIName, to=1) else: cmds.menuItem(targetUIName, l=label, c=command, p=parentUIName) for root, dirs, names in os.walk(radioButtonInfoPath): for name in names: command = cmds.menuItem(name, q=1, c=1) tempFilePath = locusPath + '/~~tempFile' f = open(tempFilePath, 'w') f.write(command) f.close() execfile(tempFilePath) os.remove(tempFilePath) cmds.menuItem(name, e=1, radioButton=True) break
import maya.cmds as cmds import sgModelUI import cPickle, shutil import sgBFunction_fileAndPath settingInfoPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath( ) + "/reloadPluginInfo.txt" tempPluginTestPath = sgBFunction_fileAndPath.getDefaultScenePath() sgBFunction_fileAndPath.makeFile(settingInfoPath, False) sgBFunction_fileAndPath.makeFile(tempPluginTestPath, False) class TwoTextFiels: def __init__(self, firstString, secondString, w=120, h=22): self.firstString = firstString self.secondString = secondString self.width = w self.height = h def create(self): form = cmds.formLayout() txt_first = cmds.text(l=self.firstString, al='right', w=self.width, h=self.height) txt_second = cmds.text(l=self.secondString, al='right',
import maya.cmds as cmds import sgModelUI import cPickle, shutil import sgBFunction_fileAndPath settingInfoPath = sgBFunction_fileAndPath.getLocusCommPackagePrefsPath() + "/reloadPluginInfo.txt" tempPluginTestPath = sgBFunction_fileAndPath.getDefaultScenePath() sgBFunction_fileAndPath.makeFile( settingInfoPath, False ) sgBFunction_fileAndPath.makeFile( tempPluginTestPath, False ) class TwoTextFiels: def __init__(self, firstString, secondString, w=120, h=22 ): self.firstString = firstString self.secondString = secondString self.width = w self.height = h def create(self): form = cmds.formLayout() txt_first = cmds.text( l=self.firstString, al='right', w= self.width, h=self.height ) txt_second = cmds.text( l=self.secondString, al='right', w= self.width, h=self.height ) fld_first = cmds.textField( h=self.height ) fld_second = cmds.textField( h=self.height )