80 lines
2.1 KiB
C++
80 lines
2.1 KiB
C++
/*
|
|
* 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/Asset/AssetCommon.h>
|
|
#include <AzCore/RTTI/RTTI.h>
|
|
#include <AzCore/RTTI/ReflectContext.h>
|
|
#include <AzCore/Serialization/SerializeContext.h>
|
|
#include <AzCore/Serialization/EditContext.h>
|
|
|
|
namespace GradientSignal
|
|
{
|
|
enum class ChannelExportTransform : AZ::u8
|
|
{
|
|
AVERAGE,
|
|
MIN,
|
|
MAX,
|
|
TERRARIUM
|
|
};
|
|
|
|
enum class AlphaExportTransform : AZ::u8
|
|
{
|
|
MULTIPLY,
|
|
ADD,
|
|
SUBTRACT
|
|
};
|
|
|
|
enum class ExportFormat : AZ::u8
|
|
{
|
|
U8,
|
|
U16,
|
|
U32,
|
|
F32
|
|
};
|
|
|
|
enum ChannelMask : AZ::u8
|
|
{
|
|
R = 0x01,
|
|
G = 0x02,
|
|
B = 0x04,
|
|
A = 0x08
|
|
};
|
|
|
|
class ImageSettings
|
|
: public AZ::Data::AssetData
|
|
{
|
|
public:
|
|
AZ_RTTI(ImageSettings, "{B36FEB5C-41B6-4B58-A212-21EF5AEF523C}", AZ::Data::AssetData);
|
|
AZ_CLASS_ALLOCATOR(ImageSettings, AZ::SystemAllocator, 0);
|
|
static void Reflect(AZ::ReflectContext* context);
|
|
static bool VersionConverter(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement);
|
|
|
|
bool m_shouldProcess = true;
|
|
|
|
ChannelExportTransform m_rgbTransform = ChannelExportTransform::MAX;
|
|
AlphaExportTransform m_alphaTransform = AlphaExportTransform::MULTIPLY;
|
|
ExportFormat m_format = ExportFormat::U8;
|
|
|
|
bool m_useR = true;
|
|
bool m_useG = false;
|
|
bool m_useB = false;
|
|
bool m_useA = false;
|
|
|
|
bool m_autoScale = true;
|
|
|
|
float m_scaleRangeMin = 0.0f;
|
|
float m_scaleRangeMax = 255.0f;
|
|
};
|
|
}// namespace GradientSignal
|