コード例 #1
0
def publishModel():
    IO_publishModel(0)
    metaData = []
    localPrefDict = IO.loadDictionary('%s/localPrefs.json' %
                                      qtBase.local_path())
    metaData.append([
        'user', 'value',
        '%s' % localPrefDict["userName"]["value"].strip('\'')
    ])
    metaData.append([
        'note', 'value',
        '%s' % assetManagerUIWindow.mainWidget.textEdit_note.toPlainText()
    ])
    folderName = getProj.sceneFolder().rsplit('/', 1)[1]
    IO.writePrefsToFile(
        metaData, '%s/.data/%s_REF.json' % (getProj.sceneFolder(), folderName))
コード例 #2
0
def submitRenderUI():
    stf_window = qtBase.BaseWindow(qtBase.GetMayaWindow(),'submitToFarm.ui')
    stf_window._windowTitle = 'Submit to Farm'
    stf_window._windowName = 'SubmitToFarm'
    stf_window.pathModify = 'pipelime/'
    stf_window.BuildUI()
    stf_window.show(dockable=True)
    #hide config panel 
    stf_window.mainWidget.configPanel.setVisible(False)
    #connect buttons
    stf_window.mainWidget.submitButton.clicked.connect(submitButton)
    stf_window.mainWidget.pushButton_globals.clicked.connect(globalDict)
    stf_window.mainWidget.pushButton_project.clicked.connect(projectDict)
    stf_window.mainWidget.pushButton_user.clicked.connect(localDict)
    stf_window.mainWidget.pushButton_render.clicked.connect(selectRenderExe)
    stf_window.mainWidget.pushButton_submitExe.clicked.connect(selectSubmitExe)
    #icon on button
    try:
        buttonIcon = QtGui.QIcon("%s/icons/%s.png"%(qtBase.self_path(), "gear"))
        stf_window.mainWidget.pushButton_settings.setIcon(buttonIcon)
    except:
        pass
    #merge all dictionaries into one
    comboDict = {}
    comboDict = mergeDictionaries(comboDict,IO.loadDictionary('%s/config/globalPrefs.json'%qtBase.self_path()))
    comboDict = mergeDictionaries(comboDict,IO.loadDictionary('%s/data/projectPrefs.json'%getProj.getProject()))
    comboDict = mergeDictionaries(comboDict,IO.loadDictionary('%s/localPrefs.json'%qtBase.local_path()))
    rangeFromTimeline =  '%s-%s'%(sceneVar.getStartFrame(),sceneVar.getEndFrame())
    comboDict = mergeDictionaries(comboDict,{"lineEdit_range": {"value":rangeFromTimeline}})
    versionlessSceneName = ''.join([c for c in getProj.sceneName() if c not in "1234567890"])
    comboDict = mergeDictionaries(comboDict,IO.loadDictionary('%s/.data/%s.json'%(getProj.sceneFolder(),versionlessSceneName)))

    setOptions(comboDict,stf_window)
    return stf_window
コード例 #3
0
def fileDict():
    prefData = []
    prefData.append(['prioritySlider','value',stf_window.mainWidget.prioritySlider.value()])
    prefData.append(['comboBox_pool','value','\'%s\''%stf_window.mainWidget.comboBox_pool.currentText()])
    prefData.append(['spinBox_packetSize','value',stf_window.mainWidget.spinBox_packetSize.value()])
    prefData.append(['staggerStart','value',stf_window.mainWidget.lineEdit_stagger.text()])

    versionlessSceneName = ''.join([c for c in getProj.sceneName() if c not in "1234567890"])
    IO.writePrefsToFile(prefData,'%s/.data/%s.json'%(getProj.sceneFolder(),versionlessSceneName))
コード例 #4
0
def writeDataAfterSave():
    metaData = []
    localPrefDict = IO.loadDictionary('%s/localPrefs.json' %
                                      qtBase.local_path())
    metaData.append([
        'user', 'value',
        '%s' % localPrefDict["userName"]["value"].strip('\'')
    ])
    metaData.append([
        'note', 'value',
        '%s' % assetManagerUIWindow.mainWidget.textEdit_note.toPlainText()
    ])
    IO.writePrefsToFile(
        metaData,
        '%s/.data/%s.json' % (getProj.sceneFolder(), getProj.sceneName()))
コード例 #5
0
def layerDict(l):
    prefData = []
    #get image path for the render layer
    rendeFilePath = cmds.renderSettings(fin=True,fp=True,cts=True,lyr=l)
    path = rendeFilePath[0].rsplit('/',1)[0]
    filename = rendeFilePath[0].split('/')[-1]

    prefData.append(['img','imgpath','%s/'%path])
    prefData.append(['img','imgname',filename])
    prefData.append(['user','trelloID','name'])
    prefData.append(['user','trelloAddress','name'])
    prefData.append(['user','name',stf_window.mainWidget.lineEdit_name.text()])
    prefData.append(['user','slackID',stf_window.mainWidget.lineEdit_slack.text()])

    IO.writePrefsToFile(prefData,'%s/.data/%s.%s.json'%(getProj.sceneFolder(),getProj.sceneName(),l))