X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-scene-loader%2Fpublic-api%2Fblend-shape-details.cpp;h=110f28cfb94cd503ae587880a0e875cd507e8559;hb=refs%2Fchanges%2F64%2F275164%2F10;hp=3308d3795feeab93caa983272be99fcc85b058de;hpb=02557f62f8d171115d885c87c138faec2a3cb923;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-scene-loader/public-api/blend-shape-details.cpp b/dali-scene-loader/public-api/blend-shape-details.cpp index 3308d37..110f28c 100644 --- a/dali-scene-loader/public-api/blend-shape-details.cpp +++ b/dali-scene-loader/public-api/blend-shape-details.cpp @@ -1,6 +1,6 @@ /* -* Copyright (c) 2020 Samsung Electronics Co., Ltd. +* Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,20 +17,19 @@ */ // FILE HEADER -#include "dali-scene-loader/public-api/blend-shape-details.h" +#include // EXTERNAL INCLUDES -#include "dali/public-api/animation/constraints.h" -#include "dali/public-api/object/property.h" +#include +#include // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/resource-bundle.h" +#include namespace Dali { namespace SceneLoader { - const std::string BlendShapes::NUMBER_OF_BLEND_SHAPES("uNumberOfBlendShapes"); const std::string BlendShapes::UNNORMALIZE_FACTOR("uBlendShapeUnnormalizeFactor"); const std::string BlendShapes::COMPONENT_SIZE("uBlendShapeComponentSize"); @@ -43,43 +42,46 @@ void BlendShapes::ConfigureProperties(const std::pair(index))); - shader.RegisterProperty(COMPONENT_SIZE, Property::Value(static_cast(mesh.second.blendShapeBufferOffset))); + shader.RegisterProperty(NUMBER_OF_BLEND_SHAPES, Property::Value(static_cast(index))); + shader.RegisterProperty(COMPONENT_SIZE, Property::Value(static_cast(mesh.second.blendShapeBufferOffset))); - // Create a read only property to preserve the components of the blend shape. - int32_t components = 0x0; - for (auto& bs : mesh.first.mBlendShapes) - { - components |= (bs.deltas.IsDefined() * Component::POSITIONS) | - (bs.normals.IsDefined() * Component::NORMALS) | (bs.tangents.IsDefined() * Component::TANGENTS); + // Create a read only property to preserve the components of the blend shape. + int32_t components = 0x0; + for(auto& bs : mesh.first.mBlendShapes) + { + components |= (bs.deltas.IsDefined() * Component::POSITIONS) | + (bs.normals.IsDefined() * Component::NORMALS) | (bs.tangents.IsDefined() * Component::TANGENTS); + } + shader.RegisterProperty(COMPONENTS, components, Property::AccessMode::READ_ONLY); } - shader.RegisterProperty(COMPONENTS, components, Property::AccessMode::READ_ONLY); } -} -} +} // namespace SceneLoader +} // namespace Dali