Some refactoring

This commit is contained in:
mnaumov
2021-05-18 22:45:43 -07:00
parent db7afee383
commit 44601b7a38
7 changed files with 45 additions and 45 deletions
@@ -27,7 +27,7 @@ namespace AZ
->Field("DisplayMapperOperationType", &DisplayMapperComponentConfig::m_displayMapperOperation)
->Field("LdrColorGradingLutEnabled", &DisplayMapperComponentConfig::m_ldrColorGradingLutEnabled)
->Field("LdrColorGradingLut", &DisplayMapperComponentConfig::m_ldrColorGradingLut)
->Field("AcesParameters", &DisplayMapperComponentConfig::m_acesParameterOverrides)
->Field("AcesParameterOverrides", &DisplayMapperComponentConfig::m_acesParameterOverrides)
;
}
}
@@ -49,58 +49,58 @@ namespace AZ
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
;
editContext->Class<DisplayMapperAcesParameters>(
"DisplayMapperAcesParameters", "")
editContext->Class<AcesParameterOverrides>(
"AcesParameterOverrides", "")
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
->DataElement(
AZ::Edit::UIHandlers::CheckBox, &DisplayMapperAcesParameters::m_overrideDefaults, "Override Defaults",
AZ::Edit::UIHandlers::CheckBox, &AcesParameterOverrides::m_overrideDefaults, "Override Defaults",
"When enabled allows parameter overrides for ACES configuration")
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(
AZ::Edit::UIHandlers::CheckBox, &DisplayMapperAcesParameters::m_alterSurround, "Alter Surround",
AZ::Edit::UIHandlers::CheckBox, &AcesParameterOverrides::m_alterSurround, "Alter Surround",
"Apply gamma adjustment to compensate for dim surround")
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(
AZ::Edit::UIHandlers::CheckBox, &DisplayMapperAcesParameters::m_applyDesaturation, "Alter Desaturation",
AZ::Edit::UIHandlers::CheckBox, &AcesParameterOverrides::m_applyDesaturation, "Alter Desaturation",
"Apply desaturation to compensate for luminance difference")
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(
AZ::Edit::UIHandlers::CheckBox, &DisplayMapperAcesParameters::m_applyCATD60toD65, "Alter CAT D60 to D65",
AZ::Edit::UIHandlers::CheckBox, &AcesParameterOverrides::m_applyCATD60toD65, "Alter CAT D60 to D65",
"Apply Color appearance transform (CAT) from ACES white point to assumed observer adapted white point")
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(
Edit::UIHandlers::Default, &DisplayMapperAcesParameters::m_cinemaLimitsBlack,
Edit::UIHandlers::Default, &AcesParameterOverrides::m_cinemaLimitsBlack,
"Cinema Limit (black)",
"Reference black luminance value")
->DataElement(
Edit::UIHandlers::Default, &DisplayMapperAcesParameters::m_cinemaLimitsWhite,
Edit::UIHandlers::Default, &AcesParameterOverrides::m_cinemaLimitsWhite,
"Cinema Limit (white)",
"Reference white luminance value")
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(
Edit::UIHandlers::Vector2, &DisplayMapperAcesParameters::m_minPoint, "Min Point (luminance)",
Edit::UIHandlers::Vector2, &AcesParameterOverrides::m_minPoint, "Min Point (luminance)",
"Linear extension below this")
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(
Edit::UIHandlers::Vector2, &DisplayMapperAcesParameters::m_midPoint, "Mid Point (luminance)",
Edit::UIHandlers::Vector2, &AcesParameterOverrides::m_midPoint, "Mid Point (luminance)",
"Middle gray")
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(
Edit::UIHandlers::Vector2, &DisplayMapperAcesParameters::m_maxPoint, "Max Point (luminance)",
Edit::UIHandlers::Vector2, &AcesParameterOverrides::m_maxPoint, "Max Point (luminance)",
"Linear extension above this")
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(
AZ::Edit::UIHandlers::Default, &DisplayMapperAcesParameters::m_surroundGamma, "Surround Gamma",
AZ::Edit::UIHandlers::Default, &AcesParameterOverrides::m_surroundGamma, "Surround Gamma",
"Gamma adjustment to be applied to compensate for the condition of the viewing environment")
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(
AZ::Edit::UIHandlers::Default, &DisplayMapperAcesParameters::m_gamma, "Gamma",
AZ::Edit::UIHandlers::Default, &AcesParameterOverrides::m_gamma, "Gamma",
"Optional gamma value that is applied as basic gamma curve OETF")
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
@@ -108,14 +108,14 @@ namespace AZ
->ClassElement(AZ::Edit::ClassElements::Group, "Load Preset")
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
->DataElement(
Edit::UIHandlers::ComboBox, &DisplayMapperAcesParameters::m_preset, "Preset Selection",
Edit::UIHandlers::ComboBox, &AcesParameterOverrides::m_preset, "Preset Selection",
"Allows specifying default preset for different ODT modes")
->EnumAttribute(OutputDeviceTransformType::OutputDeviceTransformType_48Nits, "48 Nits")
->EnumAttribute(OutputDeviceTransformType::OutputDeviceTransformType_1000Nits, "1000 Nits")
->EnumAttribute(OutputDeviceTransformType::OutputDeviceTransformType_2000Nits, "2000 Nits")
->EnumAttribute(OutputDeviceTransformType::OutputDeviceTransformType_4000Nits, "4000 Nits")
->UIElement(AZ::Edit::UIHandlers::Button, "Load", "Load default preset")
->Attribute(AZ::Edit::Attributes::ChangeNotify, &DisplayMapperAcesParameters::LoadPreset)
->Attribute(AZ::Edit::Attributes::ChangeNotify, &AcesParameterOverrides::LoadPreset)
->Attribute(AZ::Edit::Attributes::ButtonText, "Load")
;