Example #1
0
 def set_default(self):
     castingsheet_path = self.get_castingsheet_path()
     if not castingsheet_path:
         return
     self.casting_data = resource.getInputData(castingsheet_path)
     self.combobox_type.clear()
     types = sorted(self.casting_data.keys())
     self.combobox_type.addItems(types)
Example #2
0
 def get_castingsheet_data(self):
     castingsheet_path = resource.getSpecificPreset(self.show_path,
                                                    'castingsheet')
     casting_data = {}
     if not os.path.isfile(castingsheet_path):
         return casting_data
     casting_data = resource.getInputData(castingsheet_path)
     return casting_data
Example #3
0
 def setup_shots(self):        
     castingsheet_path = self.get_castingsheet_path()
     if not os.path.isfile(self.get_castingsheet_path()):
         return
     casting_data = resource.getInputData(castingsheet_path)
     self.treewidget_shots.clear()
     toplevels = sorted(casting_data.keys())
     for toplevel in toplevels:
         toplevel_item = swidgets.add_treewidget_item(
             self.treewidget_shots, toplevel, icon='toplevel')
         sublevels = sorted(casting_data[toplevel].keys())
         for sublevel in sublevels:
             sublevel_item = swidgets.add_treewidget_item(toplevel_item, sublevel, icon='sublevel') 
             for asset in casting_data[toplevel][sublevel]:
                 asset_item = swidgets.add_treewidget_item(sublevel_item, asset, icon='asset')
                 asset_item.setStatusTip(0, asset)
Example #4
0
 def get_more_data(self, caption, subfield, version):
     '''
         add manifest data as well
     '''
     manifest_path = os.path.join(self.show_path, self.current_pipe,
                                  caption, subfield, version,
                                  '{}.manifest'.format(caption))
     sorted_data = {}
     if not os.path.isfile(manifest_path):
         return sorted_data
     data = resource.getInputData(manifest_path)
     sorted_data = copy.deepcopy(data)
     extrude = ['caption', 'tag', 'user', 'modified', 'location', 'type']
     for each in data:
         if each not in extrude:
             continue
         sorted_data.pop(each)
     return sorted_data
Example #5
0
 def get_preset_data(self):
     # include all show presets with common application data
     preset_data = {}
     presets = self.get_presets()
     if not presets:
         return preset_data
     common_applications_data = self.get_common_applications()
     build_in_applications_data = self.get_build_in_applications()
     for preset in presets:
         data = resource.getInputData(preset)
         current_show = data['current_show']['show']['long_name'][1]
         preset_data.setdefault(current_show, data)
         # add new bash key to each show applications
         for each_application in data['show_applications']:
             version = data['show_applications'][each_application][
                 'version'][1]
             bash_path = resource.getBinApplicationPath(
                 current_show, version)
             data['show_applications'][each_application]['bash'] = bash_path
         data['common_applications'] = common_applications_data
         data['build-in_applications'] = build_in_applications_data
     return preset_data