def __init__(self, parent=None, **kwargs): super(Connect, self).__init__(**kwargs) self.dirname = os.path.join(resources.getWorkspacePath()) self.localhost = self.type self.name = self.type self.type = 'output_db' self.tag = self.type self.db_full_path = os.path.join( resources.getWorkspacePath(), self.localhost, '%s.json' % self.name) self.input_datas = self.get_widget_data(self.gridlayout) self.set_current() self.button_create.clicked.connect(self.create)
def create(self, input_data): ''' Description - Creates and edit the exists show this function set to operate :param input_data <{}> exmple input_data = { 'pipe_maya_directory': '/usr/autodesk/maya2016', 'pipe_nuke_version': '2.7', 'pipe_site_packages_directory': '/usr/lib64/python2.7/site-packages', 'pipe_nuke_directory': '/mnt/bkp/Icons gallery/icons_04', 'pipe_python_directory': '/usr/bin/python', 'pipe_maya_version': '2016', 'pipe_studio_pipe_directory': '/venture/subins_tutorials/studioPipe', 'pipe_name': 'studio_pipe', 'pipe_shows_directory': '/home/shreya/Documents/studio_pipe/showsdfsfdsfdf' } :example from studioPipe.api import studioPreferences studio_preferences = studioPreferences.Connect() studio_preferences.create(input_data) ''' input_data['enable'] = True studio_input = studioConnect.Connect() dirname = os.path.join(resources.getWorkspacePath()) studio_input.createDb(dirname=self.dirname, localhost=self.localhost, name=self.name, type=self.type, tag=self.tag, data={input_data['pipe_name']: input_data})
def __init__(self, **kwargs): ''' Description -API operate on read and write preferences informations. : __init__() <None>. ''' self.dirname = os.path.join(resources.getWorkspacePath()) self.localhost = 'preferences' self.name = 'preferences' self.type = 'output_db' self.tag = 'preferences' if 'dirname' in kwargs: self.dirname = kwargs['dirname'] if 'localhost' in kwargs: self.localhost = kwargs['localhost'] if 'name' in kwargs: self.name = kwargs['name'] if 'type' in kwargs: self.type = kwargs['type'] if 'tag' in kwargs: self.tag = kwargs['tag'] self.format = '.json' self.full_path = os.path.join(self.dirname, self.localhost, '%s%s' % (self.name, self.format))
def __init__(self, parent=None, **kwargs): super(Window, self).__init__(parent) self.current_show = None if 'show' in kwargs: self.current_show = kwargs['show'] self.type = kwargs['type'] self.value = kwargs['value'] self.title = kwargs['title'] self.label = kwargs['label'] self.width = kwargs['width'] self.height = kwargs['height'] self.brows_directory = resources.getWorkspacePath() self.brows_directory = '/mnt/bkp/Icons gallery/icons_04' self.q_image, self.q_image_path = None, None # current input file self.file_path = os.path.join(resources.getInputPath(), '%s.json' % self.type) print 'db path', self.file_path self.connect = studioConnect.Connect(self.file_path, value=self.value) self.data, self.sort_data, self.all_input_data = self.connect.getInputData( ) self.module, self.lable, self.version = platforms.get_tool_kit() self.setup_ui() self.load_widgets()
def __init__(self, parent=None, **kwargs): super(Connect, self).__init__(**kwargs) self.localhost = 'root' self.name = self.type self.type = 'output_db' self.tag = self.type self.db_full_path = os.path.join( resources.getWorkspacePath(), self.localhost, '%s.json' % self.name) self.button_create.clicked.connect(self.create)
def __init__(self, parent=None): super(Main, self).__init__(parent) self.brows_directory = resources.getWorkspacePath() self.brows_directory = '/mnt/bkp/Icons gallery/icons_04' self.studio_pipe_path = '/home/shreya/Documents/studio_pipe' self.module, self.lable, self.version = platforms.get_tool_kit() self.icon_format = 'png' self.width, self.height = 256, 144 self.show_data = {} self.description_type = {1: 'assets', 2: 'shots'} self.current_show = None self.current_discipline = None self.current_description = None # studio_header = studioHeader.Connect() # self.input_data, self.input_sort_data, self.input_key_data = studio_header.getInputData() self.setup_ui() self.load_tool_bar() self.set_icons()