SkinMetaAssetCreator.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <AzCore/Asset/AssetManager.h>
  9. #include <Atom/RPI.Reflect/Model/SkinMetaAssetCreator.h>
  10. namespace AZ
  11. {
  12. namespace RPI
  13. {
  14. void SkinMetaAssetCreator::Begin(const Data::AssetId& assetId)
  15. {
  16. BeginCommon(assetId);
  17. }
  18. void SkinMetaAssetCreator::SetJointNameToIndexMap(const AZStd::unordered_map<AZStd::string, AZ::u16>& jointNameToIndexMap)
  19. {
  20. if (ValidateIsReady())
  21. {
  22. m_asset->SetJointNameToIndexMap(jointNameToIndexMap);
  23. }
  24. }
  25. bool SkinMetaAssetCreator::End(Data::Asset<SkinMetaAsset>& result)
  26. {
  27. if (!ValidateIsReady())
  28. {
  29. return false;
  30. }
  31. m_asset->SetReady();
  32. return EndCommon(result);
  33. }
  34. } // namespace RPI
  35. } // namespace AZ