def __init__(self, parent=None): self.count = 0 #Setup Window super(MyForm, self).__init__(parent) self.mayaUI = 'dbViewerWindow' deleteUI(self.mayaUI) # read .ui directly loader = QtUiTools.QUiLoader() loader.setWorkingDirectory(moduleDir) f = QtCore.QFile("%s/dbViewer.ui" % moduleDir) f.open(QtCore.QFile.ReadOnly) self.myWidget = loader.load(f, self) self.ui = self.myWidget f.close() self.ui.show() self.ui.setWindowTitle('PT Matte Viewer') # variable self.asset = entityInfo.info() self.project = projectInfo.info() # project filters self.projectPrefix = ['Lego_', 'TVC_'] self.objectIDStep = 20 self.objectIDStart = 100 self.objectIDRange = 20000 # icons self.logo = '%s/%s' % (moduleDir, 'icons/logo.png') self.logo2 = '%s/%s' % (moduleDir, 'icons/shotgun_logo.png') self.okIcon = '%s/%s' % (moduleDir, 'icons/ok_icon.png') self.xIcon = '%s/%s' % (moduleDir, 'icons/x_icon.png') self.rdyIcon = '%s/%s' % (moduleDir, 'icons/rdy_icon.png') # table objectID self.idCol = 0 self.oIDCol = 1 self.assetNameCol = 2 self.assetPathCol = 3 self.userCol = 4 self.mIDsCol = 5 # table matteID self.umidCol = 0 self.midCol = 1 self.colorCol = 2 self.multiMatteCol = 3 self.vrayMtlCol = 4 # color self.dbColor = [0, 20, 60] self.presetColor = [0, 20, 100] self.initFunctions() self.initSignals()
def __init__(self, parent=None): self.count = 0 #Setup Window super(MyForm, self).__init__(parent) # QtGui.QWidget.__init__(self, parent) self.ui = ui.Ui_AlembicImportWin() self.ui.setupUi(self) # hook.logger.setLogFile(logPath, True) # hook.logger.setLevel('INFO') # hook.logger.setLogName(scriptName) # set version self.setWindowTitle('PT Alembic Cache Import v.1.0') # icons self.logo = '%s/%s' % (os.path.dirname(moduleDir), 'icons/logo.png') self.logo2 = '%s/%s' % (os.path.dirname(moduleDir), 'icons/alembic_logo.png') self.okIcon = '%s/%s' % (os.path.dirname(moduleDir), 'icons/ok_icon.png') self.xIcon = '%s/%s' % (os.path.dirname(moduleDir), 'icons/x_icon.png') self.rdyIcon = '%s/%s' % (os.path.dirname(moduleDir), 'icons/rdy_icon.png') self.ipIcon = '%s/%s' % (os.path.dirname(moduleDir), 'icons/ip_icon.png') self.refreshIcon = '%s/%s' % (os.path.dirname(moduleDir), 'icons/refresh_icon.png') self.infoIcon = '%s/%s' % (os.path.dirname(moduleDir), 'icons/info_icon.png') self.abcIcon = '%s/%s' % (os.path.dirname(moduleDir), 'icons/abc_icon.png') self.refIcon = '%s/%s' % (os.path.dirname(moduleDir), 'icons/ref_icon.png') self.iconSize = 15 # group self.cacheGrp = 'Geo_Grp' self.assetInfo = dict() self.cacheAssetTypeList = ['character', 'prop', 'animal'] self.normalAsset = '[asset]' self.nonCacheAsset = 'exportGrp' # table column self.cacheListCol = 0 self.inSceneCol = 1 self.lodCol = 2 self.currentVersionCol = 3 self.publishVersionCol = 4 self.statusCol = 5 self.assetPathCol = 6 self.cacheGrpCol = 7 self.shadeCol = 8 self.hierarchyCol = 9 self.nonCacheListCol = 0 self.nonCahceInSceneCol = 1 # instance projectInfo self.projectInfo = projectInfo.info() self.shotInfo = entityInfo.info() self.setting = None self.cacheData = None self.defaultAssetLevel = 'Cache' self.cacheAssetInfo = dict() # shot variable self.project = None self.episode = None self.sequence = None self.shot = None self.step = None self.dept = 'light' # path self.animCurvePath = None # start functions self.initSignal() self.initData()
from qtshim import QtCore, QtGui from qtshim import Signal from qtshim import wrapinstance sys.path.append('O:/studioTools/maya/python') from utils import fileUtils reload(fileUtils) from tool.sceneAssembly import asm_utils as asmUtils reload(asmUtils) from tool.utils import projectInfo reload(projectInfo) asset = projectInfo.info() from tool.setDress.assemblyBuilder import ui reload(ui) # MAYA UI import maya.OpenMayaUI as mui import maya.cmds as mc import maya.mel as mm def getMayaWindow(): ptr = mui.MQtUtil.mainWindow() if ptr is None: raise RuntimeError('No Maya window found.') window = wrapinstance(ptr)
def __init__(self, parent=None): self.count = 0 #Setup Window super(MyForm, self).__init__(parent) self.mayaUI = 'matteExportWin' deleteUI(self.mayaUI) # read .ui directly loader = QtUiTools.QUiLoader() loader.setWorkingDirectory(moduleDir) f = QtCore.QFile("%s/matteExport_ui.ui" % moduleDir) f.open(QtCore.QFile.ReadOnly) self.myWidget = loader.load(f, self) self.ui = self.myWidget f.close() self.ui.show() self.ui.setWindowTitle('PT Vray Matte Export v.1.2') # variable self.asset = entityInfo.info() self.project = projectInfo.info() # project filters self.projectPrefix = ['Lego_', 'TVC_', 'Maya'] # char ID self.objectIDStep = 20 self.objectIDStart = 1000 self.objectIDRange = 20000 # prop ID self.propIDStep = 10 self.propIDStart = 100000 self.propIDRange = 110000 # icons self.logo = '%s/%s' % (moduleDir, 'icons/logo.png') self.logo2 = '%s/%s' % (moduleDir, 'icons/logo2.png') self.okIcon = '%s/%s' % (moduleDir, 'icons/ok_icon.png') self.xIcon = '%s/%s' % (moduleDir, 'icons/x_icon.png') self.rdyIcon = '%s/%s' % (moduleDir, 'icons/rdy_icon.png') self.redIcon = '%s/%s' % (moduleDir, 'icons/red2_icon.png') self.openStatus = 'Open ' self.assignStatus = 'Assigned ' self.duplicatedStatus = 'Duplicated ID' self.readyStatus = 'Ready' self.inDb = 'In DataBase' self.wrongIDStatus = 'Wrong ID Setting' self.extraPresetStatus = 'Extra Preset' # target rigGrp self.rigGrp = ['Rig_Grp', 'Rig:Rig_Grp'] # matte presets self.charPresetPath = 'P:/Library/lookdev/mattePresets/charPreset' self.propPresetPath = 'P:/Library/lookdev/mattePresets/propPreset' self.presetData = dict() # table objectID self.idCol = 0 self.oIDCol = 1 self.assetNameCol = 2 self.assetPathCol = 3 self.userCol = 4 self.mIDsCol = 5 # table material list self.vrayMtlCol = 0 self.oID2Col = 1 self.tagCol = 2 self.statusCol = 3 self.MultiMatteCol = 4 self.colorCol = 5 # table colors self.red = [60, 0, 0] self.green = [0, 60, 0] self.blue = [20, 40, 100] self.lightGreen = [40, 100, 0] self.colorMap = {'red': [100, 0, 0], 'green': [0, 100, 0], 'blue': [0, 0, 100], None: [0, 0, 0]} self.initFunctions() self.initSignals()
from qtshim import QtCore, QtGui from qtshim import Signal from qtshim import wrapinstance sys.path.append('O:/studioTools/maya/python') from utils import fileUtils reload(fileUtils) from tool.sceneAssembly import asm_utils as asmUtils reload(asmUtils) from tool.utils import projectInfo reload(projectInfo) asset = projectInfo.info() from tool.setDress.assemblyBuilder import ui reload(ui) # MAYA UI import maya.OpenMayaUI as mui import maya.cmds as mc import maya.mel as mm def getMayaWindow(): ptr = mui.MQtUtil.mainWindow() if ptr is None: raise RuntimeError('No Maya window found.') window = wrapinstance(ptr) assert isinstance(window, QtGui.QMainWindow)
def __init__(self, parent=None): self.count = 0 #Setup Window super(MyForm, self).__init__(parent) self.mayaUI = 'matteImportWin' deleteUI(self.mayaUI) # read .ui directly loader = QtUiTools.QUiLoader() loader.setWorkingDirectory(moduleDir) f = QtCore.QFile("%s/matteImport_ui.ui" % moduleDir) f.open(QtCore.QFile.ReadOnly) self.myWidget = loader.load(f, self) self.ui = self.myWidget f.close() self.ui.show() self.ui.setWindowTitle('PT Vray Matte Import v.1.0') # variable self.asset = entityInfo.info() self.project = projectInfo.info() # project filters self.projectPrefix = ['Lego_', 'TVC_'] # char ID self.objectIDStep = 20 self.objectIDStart = 1000 self.objectIDRange = 20000 # prop ID self.propIDStep = 10 self.propIDStart = 100000 self.propIDRange = 110000 # icons self.logo = '%s/%s' % (moduleDir, 'icons/logo.png') self.logo2 = '%s/%s' % (moduleDir, 'icons/logo2.png') self.okIcon = '%s/%s' % (moduleDir, 'icons/ok_icon.png') self.xIcon = '%s/%s' % (moduleDir, 'icons/x_icon.png') self.rdyIcon = '%s/%s' % (moduleDir, 'icons/rdy_icon.png') self.redIcon = '%s/%s' % (moduleDir, 'icons/red2_icon.png') self.openStatus = 'Open ' self.assignStatus = 'Assigned ' self.duplicatedStatus = 'Duplicated ID' self.readyStatus = 'Ready' self.inDb = 'In DataBase' self.wrongIDStatus = 'Wrong ID Setting' self.extraPresetStatus = 'Extra Preset' # target rigGrp self.rigGrp = 'Rig_Grp' self.geoGrp = 'Geo_Grp' # table objectID self.statusCol = 0 self.assetCol = 1 self.noCol = 2 self.oIDCol = 3 self.mIDsCol = 4 self.pathCol = 5 # table colors self.red = [60, 0, 0] self.green = [0, 60, 0] self.blue = [20, 40, 100] self.lightGreen = [40, 100, 0] self.initFunctions() self.initSignals()