def invoke(self, context, event=None): evoked_name = bpy.context.scene.meg_evoked_files files_prefix = '{}_'.format(evoked_name) base_path = op.join(mu.get_user_fol(), 'meg_evoked_files') source_files = get_meg_evoked_source_files(base_path, files_prefix) empty_layer = DataMakerPanel.addon.BRAIN_EMPTY_LAYER layers_array = bpy.context.scene.layers parent_obj_name = 'External' create_empty_if_doesnt_exists(parent_obj_name, empty_layer, layers_array, parent_obj_name) for input_file in source_files: if not op.isfile(input_file): continue f = np.load(input_file) for label_name in f['names']: mu.create_empty_in_vertex((0, 0, 0), '{}_{}'.format(evoked_name, label_name), DataMakerPanel.addon.BRAIN_EMPTY_LAYER, parent_obj_name) add_data_to_brain(base_path, files_prefix, files_prefix) _meg_evoked_files_update() return {"FINISHED"}
def invoke(self, context, event=None): evoked_name = bpy.context.scene.meg_evoked_files files_prefix = '{}_'.format(evoked_name) base_path = op.join(mu.get_user_fol(), 'meg_evoked_files') source_files = get_meg_evoked_source_files(base_path, files_prefix) empty_layer = DataMakerPanel.addon.BRAIN_EMPTY_LAYER layers_array = bpy.context.scene.layers parent_obj_name = 'External' create_empty_if_doesnt_exists(parent_obj_name, empty_layer, layers_array, parent_obj_name) for input_file in source_files: if not op.isfile(input_file): continue f = np.load(input_file) for label_name in f['names']: mu.create_empty_in_vertex( (0, 0, 0), '{}_{}'.format(evoked_name, label_name), DataMakerPanel.addon.BRAIN_EMPTY_LAYER, parent_obj_name) add_data_to_brain(base_path, files_prefix, files_prefix) _meg_evoked_files_update() return {"FINISHED"}
def create_empty_in_vertex_location(self, vertex_location): mu.create_empty_in_vertex(vertex_location, 'Activity_in_vertex', DataInVertMakerPanel.addon.ACTIVITY_LAYER)
def create_empty_in_vertex_location(vertex_location): mu.create_empty_in_vertex(vertex_location, 'Activity_in_vertex', DataInVertMakerPanel.addon.ACTIVITY_LAYER)