def get_snapshot(self, mode): ''' get the snapshot depending on the mode i.e. input, output''' dict = self.get_current_aux_data() output_snapshots = input_snapshots = None # the check for key is needed since snapshot can be None if dict and dict.has_key('%s_snapshots' % mode): if mode == 'output': output_snapshots = dict.get('%s_snapshots' % mode) else: input_snapshots = dict.get('%s_snapshots' % mode) else: sobject = self.get_current_sobject() context = self.get_context() loader = ProdLoaderContext() output_snapshots = loader.get_output_snapshots(sobject, context) input_snapshots = loader.get_input_snapshots(sobject, context) # this is for sharing with AssetLoaderWdg # should only be called once per sobject self.append_aux_data({'output_snapshots': output_snapshots, \ 'input_snapshots': input_snapshots}) if mode == 'output': return output_snapshots else: return input_snapshots
def get_snapshot(my, mode): ''' get the snapshot depending on the mode i.e. input, output''' dict = my.get_current_aux_data() output_snapshots = input_snapshots = None # the check for key is needed since snapshot can be None if dict and dict.has_key('%s_snapshots' %mode): if mode == 'output': output_snapshots = dict.get('%s_snapshots' %mode) else: input_snapshots = dict.get('%s_snapshots' %mode) else: sobject = my.get_current_sobject() process = my.get_process() loader = ProdLoaderContext() if my.shot_search_type: loader.set_shot_search_type(my.shot_search_type) output_snapshots = loader.get_output_snapshots(sobject, process) input_snapshots = loader.get_input_snapshots(sobject, process) # this is for sharing with AssetLoaderWdg # should only be called once per sobject idx = my.get_current_index() my.insert_aux_data(idx, {'output_snapshots': output_snapshots, \ 'input_snapshots': input_snapshots}) if mode == 'output': return output_snapshots else: return input_snapshots
def get_snapshot(my, mode): ''' get the snapshot depending on the mode i.e. input, output''' dict = my.get_current_aux_data() output_snapshots = input_snapshots = None # the check for key is needed since snapshot can be None if dict and dict.has_key('%s_snapshots' %mode): if mode == 'output': output_snapshots = dict.get('%s_snapshots' %mode) else: input_snapshots = dict.get('%s_snapshots' %mode) else: sobject = my.get_current_sobject() context = my.get_context() loader = ProdLoaderContext() output_snapshots = loader.get_output_snapshots(sobject, context) input_snapshots = loader.get_input_snapshots(sobject, context) # this is for sharing with AssetLoaderWdg # should only be called once per sobject my.append_aux_data({'output_snapshots': output_snapshots, \ 'input_snapshots': input_snapshots}) if mode == 'output': return output_snapshots else: return input_snapshots
def get_snapshot(my, mode): ''' get the snapshot depending on the mode i.e. input, output''' dict = my.get_current_aux_data() output_snapshots = input_snapshots = None # the check for key is needed since snapshot can be None if dict and dict.has_key('%s_snapshots' % mode): if mode == 'output': output_snapshots = dict.get('%s_snapshots' % mode) else: input_snapshots = dict.get('%s_snapshots' % mode) else: sobject = my.get_current_sobject() process = my.get_process() loader = ProdLoaderContext() if my.shot_search_type: loader.set_shot_search_type(my.shot_search_type) output_snapshots = loader.get_output_snapshots(sobject, process) input_snapshots = loader.get_input_snapshots(sobject, process) # this is for sharing with AssetLoaderWdg # should only be called once per sobject idx = my.get_current_index() my.insert_aux_data(idx, {'output_snapshots': output_snapshots, \ 'input_snapshots': input_snapshots}) if mode == 'output': return output_snapshots else: return input_snapshots