/* * 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 * */ #include #include #include namespace AZ::Render { RPI::Ptr EditorStateParentPass::Create(const RPI::PassDescriptor& descriptor) { RPI::Ptr pass = aznew EditorStateParentPass(descriptor); return AZStd::move(pass); } EditorStateParentPass::EditorStateParentPass(const RPI::PassDescriptor& descriptor) : AZ::RPI::ParentPass(descriptor) , m_passDescriptor(descriptor) { } bool EditorStateParentPass::IsEnabled() const { const RPI::EditorStateParentPassData* passData = RPI::PassUtils::GetPassData(m_passDescriptor); if (passData == nullptr) { AZ_Error( "EditorStateParentPass", false, "[EditorStateParentPassData '%s']: Trying to construct without valid EditorStateParentPassData!", GetPathName().GetCStr()); return false; } return passData->editorStatePass->IsEnabled(); } } // namespace AZ::Render