def _replace_btn_clicked(self):
    if (self._root_folder_path is None):
        self._give_error_message('Please import your monkeyball root folder created by gamecube rebuilder')
        return
    self._tool_filepaths = self._find_required_tools()
    for i in range(self._replace_queue_list.count()):
        item = self._replace_queue_list.item(i)
        input_filepaths = item.data(self._input_filenames_key)
        obj_filepath = input_filepaths['obj']
        config_filepath = [value for (key, value) in input_filepaths.items() if ((key != 'obj') and (key != 'mtl'))][0]
        stage_id = item.data(self._output_stage_id_key)
        status = self._replace_stage_in_root(obj_filepath, config_filepath, stage_id)
        if (status in (Status.WARN, Status.FAIL)):
            item.setIcon(QIcon('resources/red_xmark.png'))
            return status
        item.setIcon(QIcon('resources/green_checkmark.png'))
        self._status_bar_label.setText((('written ' + os.path.basename(os.path.splitext(obj_filepath)[0])) + ' to root'))
    return Status.OK
def _replace_btn_clicked(self):
    if (self._root_folder_path is None):
        self._give_error_message('Please import your monkeyball root folder created by gamecube rebuilder')
        return
    self._tool_filepaths = self._find_required_tools()
    for i in range(self._replace_queue_list.count()):
        item = self._replace_queue_list.item(i)
        input_filepaths = item.data(self._input_filenames_key)
        obj_filepath = input_filepaths['obj']
        config_filepath = [value for (key, value) in input_filepaths.items() if ((key != 'obj') and (key != 'mtl'))][0]
        stage_id = item.data(self._output_stage_id_key)
        status = self._replace_stage_in_root(obj_filepath, config_filepath, stage_id)
        if (status in (Status.WARN, Status.FAIL)):
            item.setIcon(QIcon('resources/red_xmark.png'))
            return status
        item.setIcon(QIcon('resources/green_checkmark.png'))
        self._status_bar_label.setText((('written ' + os.path.basename(os.path.splitext(obj_filepath)[0])) + ' to root'))
    return Status.OK