def create_company_globals(self, company, proj_management): print 'Creating Company Globals %s' % company dir_ = os.path.join(self.user_root, 'companies', company) if not os.path.exists(dir_): print '%s doesnt exist, making it' % dir_ os.makedirs(dir_) app_config(company=company, proj_management=proj_management)
def user_init(): """ Initializes needed User information :return: """ from cgl.core.config import app_config from cgl.core.utils.general import current_user from cgl.ui.widgets.dialog import LoginDialog current = current_user().lower() print current CONFIG = app_config() proj_man = CONFIG['account_info']['project_management'] print proj_man users = CONFIG['project_management'][proj_man]['users'] print users if users: print 1 if current in users.keys(): print 'Found user: %s in company globals' % current return proj_man, users[current] else: dialog = LoginDialog() dialog.exec_() if dialog.button == 'Ok': return proj_man, dialog.user_info else: print 'ERROR: %s not found in company globals file' % current dialog = LoginDialog() dialog.exec_() if dialog.button == 'Ok': return proj_man, dialog.user_info return False
import logging import os import re import click from cgl.core.config import app_config from cgl.core.utils.general import cgl_execute, write_to_cgl_data CONFIG = app_config() PATHS = CONFIG['paths'] PADDING = CONFIG['default']['padding'] settings = CONFIG['default'] thumb_res = settings['resolution']['thumb'] frame_rate = settings['frame_rate'] ext_map = CONFIG['ext_map'] PROJ_MANAGEMENT = CONFIG['account_info']['project_management'] OPTIONS = { '320p': ['180k', '360k', '-1:320'], '360p': ['300k', '600k', '-1:360'], '480p': ['500k', '1000k', '-1:480'], '576p': ['850k', '1700k', '-1:576'], '720p': ['1000k', '2000k', '-1:720'], '1080p': ['1000k', '2000k', '-1:1080'] } def create_proxy_sequence(input_sequence, output_sequence, width='1920', height='1080', do_height=False,
import os import click import logging from cgl.core.config import app_config from cgl.core.path import PathObject, CreateProductionData, split_sequence, number_to_hash, hash_to_number from cgl.core.path import prep_seq_delimiter, lj_list_dir, get_start_frame from cgl.core.utils.general import cgl_execute, write_to_cgl_data CONFIG = app_config()['paths'] settings = CONFIG['default'] thumb_res = settings['resolution']['thumb'] frame_rate = settings['frame_rate'] ext_map = CONFIG['ext_map'] PROJ_MANAGEMENT = CONFIG['account_info']['project_management'] OPTIONS = { '320p': ['180k', '360k', '-1:320'], '360p': ['300k', '600k', '-1:360'], '480p': ['500k', '1000k', '-1:480'], '576p': ['850k', '1700k', '-1:576'], '720p': ['1000k', '2000k', '-1:720'], '1080p': ['1000k', '2000k', '-1:1080'] } ##################################################################### # # Queries # #####################################################################