parent
724add6365
commit
e80de63d55
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <AzCore/Memory/Memory.h>
|
||||
#include <AzCore/RTTI/RTTI.h>
|
||||
#include <AzCore/RTTI/ReflectContext.h>
|
||||
#include <AzCore/UserSettings/UserSettings.h>
|
||||
#endif
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
struct MaterialDocumentSettings
|
||||
: public AZ::UserSettings
|
||||
{
|
||||
AZ_RTTI(MaterialDocumentSettings, "{FA4F4BF3-BF39-4753-AAF7-AF383B868881}", AZ::UserSettings);
|
||||
AZ_CLASS_ALLOCATOR(MaterialDocumentSettings, AZ::SystemAllocator, 0);
|
||||
|
||||
static void Reflect(AZ::ReflectContext* context);
|
||||
|
||||
bool m_showReloadDocumentPrompt = true;
|
||||
};
|
||||
} // namespace MaterialEditor
|
||||
@ -1,49 +0,0 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/EBus/EBus.h>
|
||||
#include <AzCore/std/any.h>
|
||||
#include <AzCore/Outcome/Outcome.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
class MaterialEditorSettingsRequests
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
public:
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
|
||||
|
||||
virtual AZ::Outcome<AZStd::any> GetProperty(AZStd::string_view name) const = 0;
|
||||
virtual AZ::Outcome<AZStd::string> GetStringProperty(AZStd::string_view name) const = 0;
|
||||
virtual AZ::Outcome<bool> GetBoolProperty(AZStd::string_view name) const = 0;
|
||||
|
||||
virtual void SetProperty(AZStd::string_view name, const AZStd::any& value) = 0;
|
||||
virtual void SetStringProperty(AZStd::string_view name, AZStd::string_view stringValue) = 0;
|
||||
virtual void SetBoolProperty(AZStd::string_view name, bool boolValue) = 0;
|
||||
};
|
||||
using MaterialEditorSettingsRequestBus = AZ::EBus<MaterialEditorSettingsRequests>;
|
||||
|
||||
class MaterialEditorSettingsNotifications
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
public:
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple;
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
|
||||
|
||||
virtual void OnPropertyChanged(AZStd::string_view name, const AZStd::any& value) = 0;
|
||||
};
|
||||
using MaterialEditorSettingsNotificationBus = AZ::EBus<MaterialEditorSettingsNotifications>;
|
||||
|
||||
} // namespace MaterialEditor
|
||||
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <ACES/Aces.h>
|
||||
#include <AzCore/Memory/Memory.h>
|
||||
#include <AzCore/RTTI/RTTI.h>
|
||||
#include <AzCore/RTTI/ReflectContext.h>
|
||||
#include <AzCore/UserSettings/UserSettings.h>
|
||||
#endif
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
struct MaterialViewportSettings
|
||||
: public AZ::UserSettings
|
||||
{
|
||||
AZ_RTTI(MaterialViewportSettings, "{16150503-A314-4765-82A3-172670C9EA90}", AZ::UserSettings);
|
||||
AZ_CLASS_ALLOCATOR(MaterialViewportSettings, AZ::SystemAllocator, 0);
|
||||
|
||||
static void Reflect(AZ::ReflectContext* context);
|
||||
|
||||
bool m_enableGrid = true;
|
||||
bool m_enableShadowCatcher = true;
|
||||
bool m_enableAlternateSkybox = false;
|
||||
float m_fieldOfView = 90.0f;
|
||||
AZ::Render::DisplayMapperOperationType m_displayMapperOperationType = AZ::Render::DisplayMapperOperationType::Aces;
|
||||
AZStd::string m_selectedModelPresetName = "Shader Ball";
|
||||
AZStd::string m_selectedLightingPresetName = "Neutral Urban";
|
||||
};
|
||||
} // namespace MaterialEditor
|
||||
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <AzCore/Memory/Memory.h>
|
||||
#include <AzCore/RTTI/RTTI.h>
|
||||
#include <AzCore/RTTI/ReflectContext.h>
|
||||
#include <AzCore/UserSettings/UserSettings.h>
|
||||
#endif
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
struct MaterialEditorWindowSettings
|
||||
: public AZ::UserSettings
|
||||
{
|
||||
AZ_RTTI(MaterialEditorWindowSettings, "{BB9DEB77-B7BE-4DF5-9FDD-6D9F3136C4EA}", AZ::UserSettings);
|
||||
AZ_CLASS_ALLOCATOR(MaterialEditorWindowSettings, AZ::SystemAllocator, 0);
|
||||
|
||||
static void Reflect(AZ::ReflectContext* context);
|
||||
|
||||
bool m_enableGrid = true;
|
||||
bool m_enableShadowCatcher = true;
|
||||
bool m_enableAlternateSkybox = false;
|
||||
float m_fieldOfView = 90.0f;
|
||||
};
|
||||
} // namespace MaterialEditor
|
||||
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Atom/Document/MaterialDocumentSettings.h>
|
||||
#include <AzCore/RTTI/BehaviorContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
void MaterialDocumentSettings::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
{
|
||||
serializeContext->Class<MaterialDocumentSettings, AZ::UserSettings>()
|
||||
->Version(1)
|
||||
->Field("showReloadDocumentPrompt", &MaterialDocumentSettings::m_showReloadDocumentPrompt)
|
||||
;
|
||||
|
||||
if (auto editContext = serializeContext->GetEditContext())
|
||||
{
|
||||
editContext->Class<MaterialDocumentSettings>(
|
||||
"MaterialDocumentSettings", "")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &MaterialDocumentSettings::m_showReloadDocumentPrompt, "Show Reload Document Prompt", "")
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
if (auto behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
|
||||
{
|
||||
behaviorContext->Class<MaterialDocumentSettings>("MaterialDocumentSettings")
|
||||
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
|
||||
->Attribute(AZ::Script::Attributes::Category, "Editor")
|
||||
->Attribute(AZ::Script::Attributes::Module, "render")
|
||||
->Constructor()
|
||||
->Constructor<const MaterialDocumentSettings&>()
|
||||
->Property("showReloadDocumentPrompt", BehaviorValueProperty(&MaterialDocumentSettings::m_showReloadDocumentPrompt))
|
||||
;
|
||||
}
|
||||
}
|
||||
} // namespace MaterialEditor
|
||||
@ -1,73 +0,0 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Document/MaterialEditorSettings.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
MaterialEditorSettings::MaterialEditorSettings()
|
||||
{
|
||||
MaterialEditorSettingsRequestBus::Handler::BusConnect();
|
||||
}
|
||||
|
||||
MaterialEditorSettings::~MaterialEditorSettings()
|
||||
{
|
||||
MaterialEditorSettingsRequestBus::Handler::BusDisconnect();
|
||||
}
|
||||
|
||||
AZ::Outcome<AZStd::any> MaterialEditorSettings::GetProperty(AZStd::string_view name) const
|
||||
{
|
||||
const auto it = m_propertyMap.find(name);
|
||||
if (it != m_propertyMap.end())
|
||||
{
|
||||
return AZ::Success(it->second);
|
||||
}
|
||||
AZ_Warning("MaterialEditorSettings", false, "Failed to find property [%s].", name.data());
|
||||
return AZ::Failure();
|
||||
}
|
||||
|
||||
AZ::Outcome<AZStd::string> MaterialEditorSettings::GetStringProperty(AZStd::string_view name) const
|
||||
{
|
||||
AZ::Outcome<AZStd::any> outcome = GetProperty(name);
|
||||
if (!outcome || !outcome.GetValue().is<AZStd::string>())
|
||||
{
|
||||
return AZ::Failure();
|
||||
}
|
||||
return AZ::Success(AZStd::any_cast<AZStd::string>(outcome.GetValue()));
|
||||
}
|
||||
|
||||
AZ::Outcome<bool> MaterialEditorSettings::GetBoolProperty(AZStd::string_view name) const
|
||||
{
|
||||
AZ::Outcome<AZStd::any> outcome = GetProperty(name);
|
||||
if (!outcome || !outcome.GetValue().is<bool>())
|
||||
{
|
||||
return AZ::Failure();
|
||||
}
|
||||
return AZ::Success(AZStd::any_cast<bool>(outcome.GetValue()));
|
||||
}
|
||||
|
||||
void MaterialEditorSettings::SetProperty(AZStd::string_view name, const AZStd::any& value)
|
||||
{
|
||||
m_propertyMap[name] = value;
|
||||
MaterialEditorSettingsNotificationBus::Broadcast(&MaterialEditorSettingsNotifications::OnPropertyChanged, name, value);
|
||||
}
|
||||
|
||||
void MaterialEditorSettings::SetStringProperty(AZStd::string_view name, AZStd::string_view stringValue)
|
||||
{
|
||||
SetProperty(name, AZStd::any(AZStd::string(stringValue)));
|
||||
}
|
||||
|
||||
void MaterialEditorSettings::SetBoolProperty(AZStd::string_view name, bool boolValue)
|
||||
{
|
||||
SetProperty(name, AZStd::any(boolValue));
|
||||
}
|
||||
}
|
||||
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/RTTI/RTTI.h>
|
||||
#include <AzCore/Memory/SystemAllocator.h>
|
||||
#include <AzCore/std/any.h>
|
||||
|
||||
#include <Atom/Document/MaterialEditorSettingsBus.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
class MaterialEditorSettings
|
||||
: public MaterialEditorSettingsRequestBus::Handler
|
||||
{
|
||||
public:
|
||||
AZ_RTTI(MaterialEditorSettings, "{9C6B6E20-A28E-45DD-85BE-68CA35E9305E}");
|
||||
AZ_CLASS_ALLOCATOR(MaterialEditorSettings, AZ::SystemAllocator, 0);
|
||||
|
||||
MaterialEditorSettings();
|
||||
~MaterialEditorSettings();
|
||||
|
||||
AZ::Outcome<AZStd::any> GetProperty(AZStd::string_view name) const override;
|
||||
AZ::Outcome<AZStd::string> GetStringProperty(AZStd::string_view name) const override;
|
||||
AZ::Outcome<bool> GetBoolProperty(AZStd::string_view name) const override;
|
||||
|
||||
void SetProperty(AZStd::string_view name, const AZStd::any& value) override;
|
||||
void SetStringProperty(AZStd::string_view name, AZStd::string_view stringValue) override;
|
||||
void SetBoolProperty(AZStd::string_view name, bool boolValue) override;
|
||||
|
||||
private:
|
||||
AZStd::unordered_map<AZStd::string, AZStd::any> m_propertyMap;
|
||||
};
|
||||
|
||||
} // namespace MaterialEditor
|
||||
@ -0,0 +1,72 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Atom/Viewport/MaterialViewportSettings.h>
|
||||
#include <AzCore/RTTI/BehaviorContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
void MaterialViewportSettings::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
{
|
||||
serializeContext->Class<MaterialViewportSettings, AZ::UserSettings>()
|
||||
->Version(1)
|
||||
->Field("enableGrid", &MaterialViewportSettings::m_enableGrid)
|
||||
->Field("enableShadowCatcher", &MaterialViewportSettings::m_enableShadowCatcher)
|
||||
->Field("enableAlternateSkybox", &MaterialViewportSettings::m_enableAlternateSkybox)
|
||||
->Field("fieldOfView", &MaterialViewportSettings::m_fieldOfView)
|
||||
->Field("displayMapperOperationType", &MaterialViewportSettings::m_displayMapperOperationType)
|
||||
->Field("selectedModelPresetName", &MaterialViewportSettings::m_selectedModelPresetName)
|
||||
->Field("selectedLightingPresetName", &MaterialViewportSettings::m_selectedLightingPresetName)
|
||||
;
|
||||
|
||||
if (auto editContext = serializeContext->GetEditContext())
|
||||
{
|
||||
editContext->Class<MaterialViewportSettings>(
|
||||
"MaterialViewportSettings", "")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &MaterialViewportSettings::m_enableGrid, "Enable Grid", "")
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &MaterialViewportSettings::m_enableShadowCatcher, "Enable Shadow Catcher", "")
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &MaterialViewportSettings::m_enableAlternateSkybox, "Enable Alternate Skybox", "")
|
||||
->DataElement(AZ::Edit::UIHandlers::Slider, &MaterialViewportSettings::m_fieldOfView, "Field Of View", "")
|
||||
->Attribute(AZ::Edit::Attributes::Min, 60.0f)
|
||||
->Attribute(AZ::Edit::Attributes::Max, 120.0f)
|
||||
->DataElement(AZ::Edit::UIHandlers::ComboBox, &MaterialViewportSettings::m_displayMapperOperationType, "Display Mapper Type", "")
|
||||
->EnumAttribute(AZ::Render::DisplayMapperOperationType::Aces, "Aces")
|
||||
->EnumAttribute(AZ::Render::DisplayMapperOperationType::AcesLut, "AcesLut")
|
||||
->EnumAttribute(AZ::Render::DisplayMapperOperationType::Passthrough, "Passthrough")
|
||||
->EnumAttribute(AZ::Render::DisplayMapperOperationType::GammaSRGB, "GammaSRGB")
|
||||
->EnumAttribute(AZ::Render::DisplayMapperOperationType::Reinhard, "Reinhard")
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
if (auto behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
|
||||
{
|
||||
behaviorContext->Class<MaterialViewportSettings>("MaterialViewportSettings")
|
||||
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
|
||||
->Attribute(AZ::Script::Attributes::Category, "Editor")
|
||||
->Attribute(AZ::Script::Attributes::Module, "render")
|
||||
->Constructor()
|
||||
->Constructor<const MaterialViewportSettings&>()
|
||||
->Property("enableGrid", BehaviorValueProperty(&MaterialViewportSettings::m_enableGrid))
|
||||
->Property("enableShadowCatcher", BehaviorValueProperty(&MaterialViewportSettings::m_enableShadowCatcher))
|
||||
->Property("enableAlternateSkybox", BehaviorValueProperty(&MaterialViewportSettings::m_enableAlternateSkybox))
|
||||
->Property("fieldOfView", BehaviorValueProperty(&MaterialViewportSettings::m_fieldOfView))
|
||||
->Property("displayMapperOperationType", BehaviorValueProperty(&MaterialViewportSettings::m_displayMapperOperationType))
|
||||
;
|
||||
}
|
||||
}
|
||||
} // namespace MaterialEditor
|
||||
@ -0,0 +1,62 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Atom/Window/MaterialEditorWindowSettings.h>
|
||||
#include <AzCore/RTTI/BehaviorContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
void MaterialEditorWindowSettings::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
{
|
||||
serializeContext->Class<MaterialEditorWindowSettings, AZ::UserSettings>()
|
||||
->Version(1)
|
||||
->Field("enableGrid", &MaterialEditorWindowSettings::m_enableGrid)
|
||||
->Field("enableShadowCatcher", &MaterialEditorWindowSettings::m_enableShadowCatcher)
|
||||
->Field("enableAlternateSkybox", &MaterialEditorWindowSettings::m_enableAlternateSkybox)
|
||||
->Field("fieldOfView", &MaterialEditorWindowSettings::m_fieldOfView)
|
||||
;
|
||||
|
||||
if (auto editContext = serializeContext->GetEditContext())
|
||||
{
|
||||
editContext->Class<MaterialEditorWindowSettings>(
|
||||
"MaterialEditorWindowSettings", "")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &MaterialEditorWindowSettings::m_enableGrid, "Enable Grid", "")
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &MaterialEditorWindowSettings::m_enableShadowCatcher, "Enable Shadow Catcher", "")
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &MaterialEditorWindowSettings::m_enableAlternateSkybox, "Enable Alternate Skybox", "")
|
||||
->DataElement(AZ::Edit::UIHandlers::Slider, &MaterialEditorWindowSettings::m_fieldOfView, "Field Of View", "")
|
||||
->Attribute(AZ::Edit::Attributes::Min, 60.0f)
|
||||
->Attribute(AZ::Edit::Attributes::Max, 120.0f)
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
if (auto behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
|
||||
{
|
||||
behaviorContext->Class<MaterialEditorWindowSettings>("MaterialEditorWindowSettings")
|
||||
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
|
||||
->Attribute(AZ::Script::Attributes::Category, "Editor")
|
||||
->Attribute(AZ::Script::Attributes::Module, "render")
|
||||
->Constructor()
|
||||
->Constructor<const MaterialEditorWindowSettings&>()
|
||||
->Property("enableGrid", BehaviorValueProperty(&MaterialEditorWindowSettings::m_enableGrid))
|
||||
->Property("enableShadowCatcher", BehaviorValueProperty(&MaterialEditorWindowSettings::m_enableShadowCatcher))
|
||||
->Property("enableAlternateSkybox", BehaviorValueProperty(&MaterialEditorWindowSettings::m_enableAlternateSkybox))
|
||||
->Property("fieldOfView", BehaviorValueProperty(&MaterialEditorWindowSettings::m_fieldOfView))
|
||||
;
|
||||
}
|
||||
}
|
||||
} // namespace MaterialEditor
|
||||
Loading…
Reference in New Issue