dc598a8b3c
• Moved all of the common save and load code to the document base class • Moved undo and redo support to document base class but will probably extract to its own class or replace with one from AzTF • Streamlined material editor, shader management console, and other tools with updated document code • Cleaned up some of shader management console loading code, added support for saving, as well as getting and setting the shader variant list source data structure Signed-off-by: Guthrie Adams <guthadam@amazon.com>
47 lines
1.8 KiB
C++
47 lines
1.8 KiB
C++
/*
|
|
* Copyright (c) Contributors to the Open 3D Engine Project.
|
|
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
*
|
|
*/
|
|
#pragma once
|
|
|
|
#include <Atom/RPI.Edit/Shader/ShaderSourceData.h>
|
|
#include <Atom/RPI.Edit/Shader/ShaderVariantListSourceData.h>
|
|
#include <Atom/RPI.Reflect/Shader/ShaderOptionGroupLayout.h>
|
|
#include <AzCore/Asset/AssetCommon.h>
|
|
|
|
namespace ShaderManagementConsole
|
|
{
|
|
|
|
class ShaderManagementConsoleDocumentRequests
|
|
: public AZ::EBusTraits
|
|
{
|
|
public:
|
|
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple;
|
|
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById;
|
|
typedef AZ::Uuid BusIdType;
|
|
|
|
//! Set the shader variant list
|
|
virtual void SetShaderVariantListSourceData(const AZ::RPI::ShaderVariantListSourceData& sourceData) = 0;
|
|
|
|
//! Get the shader variant list
|
|
virtual const AZ::RPI::ShaderVariantListSourceData& GetShaderVariantListSourceData() const = 0;
|
|
|
|
//! Get the number of shader variants
|
|
virtual size_t GetShaderVariantCount() const = 0;
|
|
|
|
//! Get the information for the shader variant at the specified index
|
|
virtual const AZ::RPI::ShaderVariantListSourceData::VariantInfo& GetShaderVariantInfo(size_t index) const = 0;
|
|
|
|
//! Get the number of options
|
|
virtual size_t GetShaderOptionCount() const = 0;
|
|
|
|
//! Get the descriptor for the shader option at the specified index
|
|
virtual const AZ::RPI::ShaderOptionDescriptor& GetShaderOptionDescriptor(size_t index) const = 0;
|
|
};
|
|
|
|
using ShaderManagementConsoleDocumentRequestBus = AZ::EBus<ShaderManagementConsoleDocumentRequests>;
|
|
} // namespace ShaderManagementConsole
|