def __init__(self):
        self.Temp = None
        self.sTool = 'PBTool'  # Tool name node under 'Anim_Tool'

        # Importing Studio Settings
        self.dShotInfo = StudioSettings.ShotInfo(1, 0)
        aPBInfo = StudioSettings.ProjectInfo('ABA')[0]
        self.iPBwidth = aPBInfo[0]
        self.iPBheight = aPBInfo[1]

        sFileName = '%s_%s_.rv' % (self.dShotInfo['sSeqNumber'],
                                   self.dShotInfo['sShotNumber'])
        print sFileName
        self.sRvPath = os.path.join(self.dShotInfo['sPlayBlastToolPath'],
                                    sFileName)
        print sRvPath
        self.oUI = 'PB_%s_%s' % (
            self.dShotInfo['sSeqNumber'], self.dShotInfo['sShotNumber']
        )  # Watch out when this is only numbers, the tool fails.

        # Setting up tool custom dictionary for storage
        self.dDict = StudioSettings.SceneInfoStorage(self.sTool)
        if not self.dDict:
            self.dDict = {
                '1': '1',
                '2': '-',
                '3': '-',
                '4': '-',
                'currentStartFrame': 1001,
                'currentEndFrame': 1010,
                'prodStartFrame': None,
                'prodEndFrame': None,
                'markedFrames': [],
                'CalcTool': 0,
                'AnnotateTool': 0,
                'ConvertTool': 0,
                'ConvertToolFrom': [0, 0, 0, 0, 0],
                'ConvertToolTo': [0, 0, 0, 0, 0],
                'PickedFile': '',
                'LastCapture': '',
            }

        # Reset display and sizes of extra tools.
        for tool in ['CalcTool', 'ConvertTool', 'AnnotateTool']:
            self.dDict[tool] = 0

        # Reset Convert tool
        self.dDict['ConvertToolFrom'] = [0, 0, 0, 0, 0]
        self.dDict['ConvertToolTo'] = [0, 0, 0, 0, 0]

        StudioSettings.SceneInfoStorage(self.sTool, self.dDict)  # Store dDict

        self.UISetWindow()
        self.UICreate()
        self.UIDisplayChecker()
	def Button_OpenFolder(self, *args):
		StudioSettings.ShotInfo(0,1) # (1,1) = (Folder Creation, Print paths.)
		aPath = self.GetScenePathFromCurrentEnvironment().split('/')
		#aPath = self.sScenePath
		sPath = '/'.join(aPath)

		if not cmds.getModifiers() == 0:
			StudioSettings.OSFileBrowserCommand(sPath)
			aPrint = ['a7a8af', 'Opening Folder.', 0x6b6c75]

		else:
			StudioSettings.CopyToClipBoard(sPath)
			aPrint = ['a7a8af', 'Copied to Clipboard.', 0x6b6c75]

		cmds.inViewMessage(amg = '<text style="color:#%s";>%s</text>'%(aPrint[0], aPrint[1]), pos = 'botCenter', fade = True, fts = 7, ft = 'arial',bkc = aPrint[2] )
Example #3
0
    def __init__(self):

        self.aDropMenu = [
            [],
            [],
            [],
            [],
        ]
        self.iButton1 = 0
        self.iButton2 = 0
        self.iTextField1 = 0
        self.iTextField2 = 0
        self.sUser = getpass.getuser()
        self.oUI = ''

        # Get Studio Settings from external

        #self.sScriptPath = '/vol/transfer/dyabu/Scripts/mayaScripts'
        #StudioSettings = __import__("StudioSettings")
        #self.StudioSettings = imp.load_source('StudioSettings', '%s/StudioSettings.py'% self.sScriptPath)

        self.dShotInfo = StudioSettings.ShotInfo(
            1, 0)  # (1,1) = (Folder Creation, Print paths.)
        #print self.dShotInfo

        # ScenePath stuffs

        #self.sScenePath = self.aShotInfo[1]
        self.sScenePath = self.dShotInfo['sScenePath']
        #self.sShotPath = ''
        self.sShotPath = '/'.join(self.sScenePath.split('/')[:-1])

        #self.GetScenePathFromCurrentEnvironment()

        if self.ErrorCheckAndFolderCreation():
            self.aAllList = self.CollectMayaFiles()
            self.oWindow = None
            self.UISetWindow()
            self.UICreate()
        else:
            cmds.warning('Please Save your current scene.')
    import pickle

import StudioSettings

# vvv 1/1

fNukeCreatorFile = os.path.join(os.path.dirname(__file__),
                                "NukeCreator_Customizer.py")

# Getting Shot Number - StudioSettings.py
#sScriptName = 'StudioSettings' # remove '.py'
#sScriptPath = '/vol/transfer/dyabu/Scripts/mayaScripts/%s.py' % sScriptName
#StudioSettings = imp.load_source(sScriptName, sScriptPath)

# Getting info using StudioSettings
dShotInfo = StudioSettings.ShotInfo(
    1, 0)  # (1,1) = (Folder Creation, Print paths.)

# vvv paths 1/1
dShot = {
    "FilePath":
    "/%s/shots/%s/%s/motion/work/maya/dyabu/Images/Nuke/TheNukeFile.nk" %
    (dShotInfo['sProject'], dShotInfo['sSeqNumber'], dShotInfo['sShotNumber']),
    'ShotNumber':
    "  %s %s" % (dShotInfo['sSeqNumber'], dShotInfo['sShotNumber']),
    'sShotNumber':
    dShotInfo['sShotNumber'],
    'sSeqNumber':
    dShotInfo['sSeqNumber'],
    'sProject':
    dShotInfo['sProject'],
    'sNukeFileFolder':
def main():
	# Start here
	StudioSettings.ShotInfo(0, 1)