bool CRIBExporterInterface::respond (sxsdk::dialog_interface &dialog, sxsdk::dialog_item_class &item, int action, void *)
{
	const int id = item.get_id();		// アクションがあったダイアログアイテムのID.

	if (id == sx::iddefault) {
		m_data.Clear();
		load_dialog_data(dialog);
		return true;
	}

	if (id == sx::idok) {
		m_dlgOK = true;
	}

	if (id == dlg_integrators_id) {
		m_data.type = (RIBParam::INTEGRATORS_TYPE)item.get_selection();
		return true;
	}
	if (id == dlg_pixel_variance_id) {
		m_data.pixelVariance = item.get_float();
		return true;
	}
	if (id == dlg_min_samples_id) {
		m_data.minSamples = item.get_int();
		return true;
	}
	if (id == dlg_max_samples_id) {
		m_data.maxSamples = item.get_int();
		return true;
	}
	if (id == dlg_incremental_id) {
		m_data.incremental = item.get_bool();
		return true;
	}
	if (id == dlg_bias_id) {
		m_data.bias = item.get_float();
		return true;
	}
	if (id == dlg_max_diffuse_depth_id) {
		m_data.maxDiffuseDepth = item.get_int();
		return true;
	}
	if (id == dlg_max_specular_depth_id) {
		m_data.maxSpecularDepth = item.get_int();
		return true;
	}
	if (id == dlg_version_id) {
		m_data.prmanVersion = item.get_selection();
		return true;
	}
	if (id == dlg_rendering_format_type_id) {
		m_data.renderingFormatType = (RIBParam::RENDERING_FORMAT_TYPE)item.get_selection();
		return true;
	}
	if (id == dlg_rendering_image_type_id) {
		m_data.renderingImageType = (RIBParam::RENDERING_IMAGE_TYPE)item.get_selection();
		return true;
	}

	if (id == dlg_output_background_image_id) {
		m_data.outputBackgroundImage = item.get_bool();
		{
			sxsdk::dialog_item_class &item2 = dialog.get_dialog_item(dlg_background_image_size_id);
			item2.set_enabled(m_data.outputBackgroundImage);
		}
		{
			sxsdk::dialog_item_class &item2 = dialog.get_dialog_item(dlg_background_image_intensity_id);
			item2.set_enabled(m_data.outputBackgroundImage);
		}
		{
			sxsdk::dialog_item_class &item2 = dialog.get_dialog_item(dlg_background_draw_id);
			item2.set_enabled(m_data.outputBackgroundImage);
		}
		return true;
	}
	if (id == dlg_background_image_size_id) {
		m_data.backgroundImageSize = (RIBParam::BACKGROUND_IMAGE_SIZE)item.get_selection();
		return true;
	}
	if (id == dlg_background_image_intensity_id) {
		m_data.backgroundImageIntensity = item.get_float();
		return true;
	}
	if (id == dlg_background_draw_id) {
		m_data.backgroundDraw = item.get_bool();
		return true;
	}
	if (id == dlg_color_color_to_linear_id) {
		m_data.colorColorToLinear = item.get_bool();
		return true;
	}
	if (id == dlg_color_texture_to_linear_id) {
		m_data.colorTextureToLinear = item.get_bool();
		return true;
	}
	if (id == dlg_light_day_light_id) {
		m_data.lightDayLight = item.get_bool();
		return true;
	}
	if (id == dlg_statistics_end_of_frame_id) {
		m_data.statisticsEndOfFrame = item.get_bool();
		return true;
	}
	if (id == dlg_statistics_xml_file_id) {
		m_data.statisticsXMLFile = item.get_bool();
		return true;
	}
	if (id == dlg_subdivision_id) {
		m_data.doSubdivision = item.get_bool();
		return true;
	}
	if (id == dlg_denoise_id) {
		m_data.doDenoise = item.get_bool();
		return true;
	}

	return false;
}