Esempio n. 1
0
    def project_comboBox_onActivated(self):
        '''project_comboBox'''
        self.currentProject = self.ui.project_comboBox.findText(project)
        getInfo = env.getInfo(projectName=self.currentProject)

        # Load asset type in project from DB
        self._loadAssetType()

        # Clear main list
        self.ui.main_listWidget.clear()
Esempio n. 2
0
    def _loadProject(self):
        '''Load project list from DB'''
        projectList = listAllProject()

        self.ui.project_comboBox.addItems(projectList)

        # get active project
        for project in getEnv.globalConfig_data['setting']['projects'].keys():
            if getEnv.globalConfig_data['setting']['projects'][project][
                    'active'] == True:
                break

        # set current actived project
        self.currentProject = self.ui.project_comboBox.findText(project)
        self.ui.project_comboBox.setCurrentIndex(self.currentProject)

        # Setup Environment
        getInfo = env.getInfo(projectName=project)

        return projectList
def saveComment(filename, comment):
    ''' Save comment data to data.json file '''

    info = env.getInfo(path=filename)
    filename = info.get_fileName()
    workspace = info.get_workspace()
    task = info.get_task()
    name = info.get_name()

    dataFile = workspace + "/data.json"

    # Create file
    if not os.path.exists(dataFile):

        data = {task: {filename: comment}}
        f = open(dataFile, 'w')
        f.write(json.dumps(data, indent=4))
        f.close()

    # Update data
    else:
        try:
            f = open(dataFile, 'r')
            raw_data = json.loads(f.read())
            f.close()
        except:
            raw_data = {}

        if not raw_data.has_key(task):
            raw_data[task] = {}

        raw_data[task][filename] = comment

        # Write file
        f = open(dataFile, 'w')
        f.write(json.dumps(raw_data, indent=4))
        f.close()

    return True
Esempio n. 4
0
import maya.cmds as cmds
import maya.mel as mel
import datetime, os

from sal_pipeline.src import env
from sal_pipeline.src import utils
from sal_pipeline.src import log
# reload(env)
# reload(utils)
# reload(log)

logger = log.logger("renderSetting")
logger = logger.getLogger()
getEnv = env.getEnv()
getInfo = env.getInfo()
rs_utils = utils.redshiftUtils()

_APP_VERSION_ = 'v 2.2'
# v 1.0 : Build for turntable render
# v 2.0 : Add RS_AOV set up
# v 2.1 : Add log
# v 2.2 : Add Shot option

_windowsName = "salRenderSetting_window"

# Read from config file : config/renderSetting.json
config = getEnv.get_appConfig("renderSetting")

# ---- UI ----------------------------------------